<?xml version="1.0" encoding="UTF-8"?>
<!--
****************************************************************************

     File Name:   windowGadgets.box

****************************************************************************
   C O P Y R I G H T   A N D   C O N F I D E N T I A L I T Y   N O T I C E
****************************************************************************

//      Copyright (c) 2006 AOL LLC.  All rights reserved.
//      This software contains valuable confidential and proprietary
//      information of AOL LLC. and is subject to applicable
//      licensing agreements.  Unauthorized reproduction, transmission or
//      distribution of this file and its contents is a violation of
//      applicable laws.
//
//            A O L   C O N F I D E N T I A L

****************************************************************************
-->


<?boxely version="1.0"?>

<!DOCTYPE window SYSTEM "box://aimToolkit/resources/localization.dtd">



<?import href="box://aimToolkit/content/menuPack/menuGadgets.box"?>

<library xmlns="http://www.aol.com/boxely/resource.xsd"
         xmlns:box="http://www.aol.com/boxely/box.xsd"
         xmlns:s="http://www.aol.com/boxely/style.xsd"
         xmlns:on="http://www.aol.com/boxely/reaction.xsd"
         persists="true">


    <gadget id="aolTitleBar" type="box">
        <attributes dragMode="window" accRole="titleBar" />
    </gadget>


    <gadget id="aolDialog" type="window" language="jscript" code="box://aimToolkit/content/windowingPack/aolDialog.js" >
        <attributes focusMode="defer" resizable="false" icon="#bmp.icon.default.small" nativeIcon="box://imApp/resources/aim.ico"
                    minimizable="false" maximizable="false" closable="true" accRole="dialog" isFlashing="false" flash="false"/>
        <parts>
            <box:hbox id="titleGroup" >
                <box:vbox s:vAlign="center">
                    <box:image id="titleBarIcon" inherits="src=icon" s:padding="0 0 0 5" on:doubleClick="gadget:onDoubleClickSystemMenu();" on:mouseDown="gadget:onClickSystemMenu();"/>
                </box:vbox>
                <box:vbox s:flex="1" id="windowBar">
                    <box:aolTitleBar id="titleBar" s:flex="0" on:mouseDown="gadget:onClickTitleBar();">
                        <box:aolLabel dragMode="window" id="titleBarLabel" inherits="active,flash,isFlashing,value=title" autoTooltip="none"/>
                        <box:hbox id="windowControls">
                            <box:binding elementSource="_gadget" targetProperty="minimizable" path="minimizable" />
                            <box:aimTitleBarButton id="titleBarMin" message="minimize" icon="#bmp.aimWindow.minimize" accName="Minimize" tooltip="&windowControl.minimize;" leftmost="true" inherits="active,flash,isFlashing">
                                <box:binding elementSource="_gadget" targetProperty="collapsed" path="minimizable"
                                            method="twoWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not"/>
                            </box:aimTitleBarButton>
                            <box:box> 
                                <box:binding elementSource="_gadget" targetProperty="collapsed" path="maximizable"
                                            method="twoWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not"/>
                                <box:aimTitleBarButton id="titleBarMax" message="maximize"  icon="#bmp.aimWindow.maximize" accName="Maximize" tooltip="&windowControl.maximize;" inherits="active,flash,isFlashing">
                                    <box:binding elementSource="_gadget" targetProperty="collapsed" path="maximized" method="twoWay"/>
                                    <box:binding elementSource="_gadget" targetProperty="hidden" path="maximized" method="twoWay"/>
                                </box:aimTitleBarButton>
                                <box:aimTitleBarButton id="titleBarRestore" message="restore"  icon="#bmp.aimWindow.restore" accName="Restore" tooltip="&windowControl.restore;" inherits="active,flash,isFlashing">
                                    <box:binding elementSource="_gadget" targetProperty="collapsed" path="maximized"
                                                method="twoWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not"/>
                                    <box:binding elementSource="_gadget" targetProperty="hidden" path="maximized"
                                                method="twoWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not"/>
                                </box:aimTitleBarButton>
                            </box:box>
                            <box:aimTitleBarButton id="titleBarClose"  icon="#bmp.aimWindow.close" accName="Close" tooltip="&windowControl.close;" rightmost="true" inherits="active,flash,isFlashing" on:click="toolkit:Close">
                                <box:binding elementSource="_gadget" targetProperty="collapsed" path="closable"
                                            method="twoWay" sourceTransformer="toolkit:not" targetTransformer="toolkit:not"/>
                            </box:aimTitleBarButton>
                        </box:hbox>
                    </box:aolTitleBar>
                </box:vbox>
            </box:hbox>

            <box:hbox id="titleBarSpacer" />
            <box:vbox id="windowContent">
                <box:vbox id="windowInnerContent" inherits="$overflow=overflow,$padding=internalPadding">
                    <box:content/>
                </box:vbox>
            </box:vbox>
        </parts>
        <behavior inherits="box://aimToolkit/content/behaviors.box#dialog">
            <reaction event="doubleclick" action="gadget:onDoubleClickWindow();"/>
            <reaction event="attributeSet" attributeName="accTheme" action="gadget:onAccThemeChange();"/>
        </behavior>
    </gadget>


</library>