<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE window SYSTEM "box://toaster/resources/strings.dtd">

<?import href="box://toaster/theme/toastGadgetStyles.box"?>
<?import href="box://boxelyToolkit/content/gadgets.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">
	<script id="main" language="jscript" href="box://toaster/content/toaster.js"/>
	
	<gadget id="toastWindow" type="window">
		<attributes chromeless="true" resizable="false"  accRole="window" icon="#icon" dragMode="window" destroyed="false"/>
	</gadget>
	
	
	<gadget id="toastHeader" type="box">
		<attributes focusMode="defer" blockEvents="false" dragMode="window" brandingText="" screenname="" date=""/>
		<parts>
			<box:hbox id="Header" style="Header">
						<box:image id="icon" style="brandingIcon" src="#message.alert" collapsed="true"/>
            <box:vbox s:flex="1" s:maxHeight="30" s:valign="center">
							<box:hbox s:minHeight="15" s:maxHeight="15" s:valign="end">
              <box:aolLabel id="brand" style="TitleText"  dragMode="window" inherits="value=brandingText, accName=brandingText" accRole="staticText"/>
              <box:aolLabel id="date" style="DateText" inherits="value=date" />
            </box:hbox>
							<box:hbox id="screennameBox" s:minHeight="15" s:maxHeight="15" s:valign="start">
								<box:aolLabel id="screenname" style="SubText"  dragMode="window" inherits="value=screenname, accName=screename" accRole="staticText"/>
            </box:hbox>
            </box:vbox>
						<box:vbox s:minWidth="11" s:valign="start" s:height="22" >
            <box:closeButton id="closer" style="close" tabIndex="2"/>
            </box:vbox>
			</box:hbox>
		</parts>
	</gadget>
			
	<gadget id="toastMessageBoxHeader" type="box" script="box://toaster/content/toastHeader">
		<attributes focusMode="defer" blockEvents="false" dragMode="window" brandingText="" screenname="" date="" alertType="#message.alert" accRole="dialog"/>
		<parts>
			<box:hbox style="Header" s:flex="1">
          <box:hbox s:flex="1" s:vAlign="center">
						<box:image id="alert" style="alertImage" inherits="src=alertType"/>
            <box:aolLabel id="brand" style="TitleText" dragMode="window" inherits="value=brandingText, accName=brandingText"/>
            <box:aolLabel id="date" style="DateText" inherits="value=date" />
          </box:hbox>
          <box:hbox s:width="20" s:vAlign="center" s:hAlign="center">
            <box:messageCloseButton id="closer" style="close" focused="false"/>
          </box:hbox>
			</box:hbox>
		</parts>
	</gadget>

	<gadget id="closeButton" type="box" script="box://toaster/content/toastWindowClose.js">
	<attributes blockEvents="false" focusMode="normal" accName="&toast.close;" tooltip="&toast.close;" accRole="pushButton"/>
	<behavior>
			<reaction event="click" button="1" action="gadget:Close()"/>
	    <reaction event="keypress" keyCode="ENTER" action="gadget:Close()"/>
	    <reaction event="keypress" keyCode="SPACE" action="gadget:Close()"/>
        </behavior>
	</gadget>

  <gadget id="messageCloseButton" type="box" script="box://toaster/content/buttonGadget.js" >
	<attributes blockEvents="false" focusMode="normal" accName="&toast.close;" tooltip="&toast.close;" accRole="pushButton" />
	<behavior>
			<reaction event="click" button="1" action="gadget:respond(0);"/>
	    <reaction event="keypress" keyCode="ENTER" action="gadget:respond(0);"/>
	    <reaction event="keypress" keyCode="SPACE" action="gadget:respond(0);"/>
  </behavior>
	</gadget>

  <gadget id="normalTab" type="control" script="box://toaster/content/normalTab.js">
        <attributes selectableMode="item" focusMode="defer" accRole="pageTab" blockEvents="false"/>
        <parts>
            <box:aolLabel id="label" ornament="true" flex="1" justify="left" inherits="value=label" />
            <box:aolImageButton focusMode="defer" id="closeButton" inherits="preLight=selected,focused" on:mouseDown="toolkit:StopEventPropagation" on:click="gadget:close()" icon="#close.normal" /> 
        </parts>
  </gadget>

<gadget id="buttonRow" type="box" script="box://toaster/content/buttonGadget.js">
		<attributes focusMode="defer" dragMode="window" button1="true" button2="true" button3="true"  button4="true" b1caption="&message.ok;" b2caption="&message.yes;" b3caption="&message.no;" b4caption="&message.cancel;" accRole="none"/>
		<parts>
			<box:toastButton id="ok" inherits="title=b1caption, collapsed=button1, accName=b1caption, tooltip=b1caption" on:click="gadget:respond(1);"/>
			<box:toastButton id="yes" inherits="title=b2caption, collapsed=button2, accName=b2caption, tooltip=b2caption" on:click="gadget:respond(2);"/>
			<box:toastButton id="no" inherits="title=b3caption, collapsed=button3, accName=b3caption, tooltip=b3caption" on:click="gadget:respond(3);"/>
			<box:toastButton id="cancel" inherits="title=b4caption, collapsed=button4, accName=b4caption, tooltip=b4caption" on:click="gadget:respond(4);"/>
		</parts>
	</gadget>
	
	<gadget id="toastButton" type="control" >
		<attributes focusMode="normal" title="" accRole="pushButton"/>
		<parts>
			<box:aolLabel style="buttonText" inherits="value=title"/>
		</parts>
	</gadget>
  
  <gadget id="message" type="box">
    <attributes text="empty"  focusMode="ignore" overflow="auto" />
		<parts>
			<box:aolMultilineStatic id="inputText" style="messageText" inherits="value=text, tooltip=text, accName=text" s:justify="center"/>
		</parts>
  </gadget>

</library>
