<!-- =======================================================================================================

  This file implements the following objects :

    - Wasabi:StandardFrame:Status
    - Wasabi:StandardFrame:NoStatus
    - Wasabi:StandardFrame:Modal
    - Wasabi:StandardFrame:Static

    Available parameters :

      padtitleleft  : resizes the title from the left by the specified amount of pixels
      padtitleright : resizes the title from the right by the specified amount of pixels
      content       : tells the object which group to instantiate in its client area

======================================================================================================== -->

<!-- <include file="standardframe-elements.xml" /> -->

<elements>

<bitmap id="wasabi.frame.top.left" file="skin/gen.bmp" w="25" h="20"/>
<bitmap id="wasabi.frame.top" file="skin/gen.bmp" x="52" w="25" h="20"/>
<bitmap id="wasabi.frame.top.right" file="skin/gen.bmp" x="130" w="25" h="20"/>

<bitmap id="wasabi.frame.bottom.left" file="skin/gen.bmp" x="0" y="42" w="125" h="14"/>
<bitmap id="wasabi.frame.bottom" file="skin/gen.bmp" x="127" y="72" w="25" h="14"/>
<bitmap id="wasabi.frame.bottom.right" file="skin/gen.bmp" x="0" y="57" w="125" h="14"/>

<bitmap id="wasabi.frame.top.left.inactive" file="skin/gen.bmp" y="21" w="25" h="20"/>
<bitmap id="wasabi.frame.top.inactive" file="skin/gen.bmp" x="52" y="21" w="25" h="20"/>
<bitmap id="wasabi.frame.top.right.inactive" file="skin/gen.bmp" x="130" y="21" w="25" h="20"/>

<bitmap id="wasabi.frame.left" file="skin/gen.bmp" x="127" y="42" w="11" h="29"/>
<bitmap id="wasabi.frame.left2" file="skin/gen.bmp" x="158" y="42" w="11" h="24"/>
<bitmap id="wasabi.frame.right" file="skin/gen.bmp" x="139" y="42" w="8" h="29"/>
<bitmap id="wasabi.frame.right2" file="skin/gen.bmp" x="170" y="42" w="8" h="24"/>

<bitmap id="wasabi.button.close" file="skin/gen.bmp" x="144" y="3" w="9" h="9"/>
<bitmap id="wasabi.button.close.pressed" file="skin/gen.bmp" x="148" y="42" w="9" h="9"/>

<bitmap id="wasabi.frame.basetexture" file="$solid" h="64" w="64" color="33,33,57"/>

</elements>

<!-- =======================================================================================================

  This group serves as a template for all the Wasabi:StandardFrame objects

======================================================================================================== -->

<groupdef id="wasabi.frame.layout">

<!-- active starts here -->

  <layer
    id="window.top.left"
    x="0" y="0"
    image="wasabi.frame.top.left"
    inactivealpha="0"
  />
  <layer
    id="window.top"
    x="25" y="0"
    w="-50"
    relatw="1"
    image="wasabi.frame.top"
    inactivealpha="0" tile="1"
  />
  <layer
    id="window.top.right"
    x="-25" y="0"
    relatx="1"
    image="wasabi.frame.top.right"
    inactivealpha="0"
  />

<!-- active ends here -->

<!-- inactive starts here -->
  <layer
    id="window.top.left"
    x="0" y="0"
    image="wasabi.frame.top.left.inactive"
    activealpha="0"
  />
  <layer
    id="window.top"
    x="25" y="0"
    w="-30"
    relatw="1"
    image="wasabi.frame.top.inactive"
    activealpha="0" tile="1"
  />
  <layer
    id="window.top.right"
    x="-25" y="0"
    relatx="1"
    image="wasabi.frame.top.right.inactive"
    activealpha="0"
  />

<!-- inactive ends here -->

  <layer
    id="window.left"
    x="0" y="20"
    h="-53"
    relath="1"
    image="wasabi.frame.left"
    tile="1"
  />
  <layer
    id="window.left"
    x="0" y="-33"
    relaty="1" 
    image="wasabi.frame.left2"
  />
  <layer
    id="window.right"
    x="-8" y="20"
    h="-53"
    relatx="1" relath="1"
    image="wasabi.frame.right"
    tile="1"
  />

  <layer
  id="window.right"
  x="-8" y="-33"
  relatx="1" relaty="1" 
  image="wasabi.frame.right2"
  />

  <layer id="window.resize.disabler" x="5" y="5" w="-10" h="-10" relatw="1" relath="1"/>

  <LayoutStatus id="sysmenu.status" bg="0" x="5" y="3" w="14" h="9" includeonly="{system}" />
  <hideobject target="sysmenu.status"/>
  <button
      id="Close"
      action="CLOSE"
      x="-11" y="3"
      relatx="1"
      image="wasabi.button.close"
      downImage="wasabi.button.close.pressed"
      inactiveAlpha="0"
  />
  <Wasabi:TitleBar
    id="wasabi.titlebar"
    x="15" y="0"
    w="-32" h="20"
    relatw="1"
  />

</groupdef>


<!-- =======================================================================================================

  <Wasabi:StandardFrame:Status /> implementation

======================================================================================================== -->

<groupdef id="wasabi.standardframe.statusbar" background="wasabi.frame.basetexture" sysregion="1" xuitag="Wasabi:StandardFrame:Status">

    <group id="wasabi.frame.layout" x="0" y="0" w="0" relatw="1" h="-5" relath="1"/>

  <layer
    id="window.bottom.left"
    x="0" y="-14"
    relaty="1"
    image="wasabi.frame.bottom.left"
  />

  <layer
    id="window.bottom"
    x="125" y="-14"
    w="-250"
    relatw="1" relaty="1"
    image="wasabi.frame.bottom"
    tile="1"
  />

  <layer
    id="window.bottom.right"
    x="-125" y="-14"
    relatx="1" relaty="1"
    image="wasabi.frame.bottom.right"
  />

  <layer
    x="-20" y="-14"
    relatx="1" relaty="1" w="19" h="13"
    resize="bottomright" rectrgn="1"
  />

  <LayoutStatus id="standardframe.layoutstatus" x="11" y="-29" relaty="1" w="-19" relatw="1" h="15" exclude="{system}" />
  <script id="standardframe.script" file="scripts/standardframe.maki" param="11,20,-19,-49,0,0,1,1" />

</groupdef>


<!-- =======================================================================================================

  <Wasabi:StandardFrame:NoStatus /> implementation

======================================================================================================== -->

<groupdef id="wasabi.standardframe.nostatusbar" background="wasabi.frame.basetexture" sysregion="1" xuitag="Wasabi:StandardFrame:NoStatus">

  <group id="wasabi.frame.layout" x="0" y="0" w="0" h="-5" relatw="1" relath="1"/>

  <layer
    id="window.bottom.left"
    x="0" y="-14"
    relaty="1"
    image="wasabi.frame.bottom.left"
  />

  <layer
    id="window.bottom"
    x="125" y="-14"
    w="-250"
    relatw="1" relaty="1"
    image="wasabi.frame.bottom"
    tile="1"
  />

  <layer
    id="window.bottom.right"
    x="-125" y="-14"
    relatx="1" relaty="1"
    image="wasabi.frame.bottom.right"
  />

  <layer
    x="-20" y="-14"
    relatx="1" relaty="1" w="19" h="13"
    resize="bottomright" rectrgn="1"
  />

  <script id="standardframe.script" file="scripts/standardframe.maki" param="11,20,-19,-34,0,0,1,1" />

</groupdef>


<!-- =======================================================================================================

  <Wasabi:StandardFrame:Modal /> implementation

======================================================================================================== -->

<groupdef id="wasabi.standardframe.modal" inherit_group="wasabi.standardframe.nostatusbar" sysregion="1" xuitag="Wasabi:StandardFrame:Modal">
  <group 
    id="wasabi.panel"
    x="5" y="15"
    w="-10" h="-20"
    relatw="1" relath="1"
  />
  <hideobject target="controlmenu;controlmenu.inactive"/>
  <sendparams target="wasabi.titlebar" x="4" w="-24" relatw="1" />
  <sendparams target="window.top.left;window.top;window.top.right;window.left;window.right;window.bottom.left.top;window.bottom.left;window.bottom.left.bottom;window.bottom.top;window.bottom;window.bottom.bottom;window.bottom.right.top;window.bottom.right;window.bottom.right.bottom" resize="0" />
</groupdef>


<!-- =======================================================================================================

  <Wasabi:StandardFrame:Static /> implementation

======================================================================================================== -->

<groupdef id="wasabi.standardframe.static" inherit_group="wasabi.standardframe.nostatusbar" sysregion="1" xuitag="Wasabi:StandardFrame:Static">
  <group 
    id="wasabi.panel"
    x="5" y="15"
    w="-10" h="-20"
    relatw="1" relath="1"
  />
  <sendparams target="window.top.left;window.top;window.top.right;window.left;window.right;window.bottom.left.top;window.bottom.left;window.bottom.left.bottom;window.bottom.top;window.bottom;window.bottom.bottom;window.bottom.right.top;window.bottom.right;window.bottom.right.bottom" resize="0" />
<!--  <hideobject target="controlmenu;controlmenu.inactive"/> -->
</groupdef>
