<?xml version="1.0" ?>

<Falagard>
   <!--
   ***************************************************
   This is a checkbox like we all know it, but it has
   some text on its left side, this text can be aligned
   to the left, centre or right, but the checkbox in person
   will alwasy be aligned to the right.
   ***************************************************
   -->

   <WidgetLook name="ArkanaLook/CheckboxLabelRight">

      <!-- The Property definitions. These are properties you can set in your layout/code. -->
      <!-- ******************************************************************************* -->

      <PropertyDefinition name="TextColourNormal"   initialValue="FF373737" redrawOnWrite="true" />
      <PropertyDefinition name="TextColourHover"    initialValue="FF606060" redrawOnWrite="true" />
      <PropertyDefinition name="TextColourPushed"   initialValue="FF606060" redrawOnWrite="true" />
      <PropertyDefinition name="TextColourDisabled" initialValue="FF7F7F7F" redrawOnWrite="true" />
      <PropertyDefinition name="TextColourNormalSel"   initialValue="FF373737" redrawOnWrite="true" />
      <PropertyDefinition name="TextColourHoverSel"    initialValue="FF606060" redrawOnWrite="true" />
      <PropertyDefinition name="TextColourPushedSel"   initialValue="FF606060" redrawOnWrite="true" />
      <PropertyDefinition name="TextColourDisabledSel" initialValue="FF7F7F7F" redrawOnWrite="true" />
      <PropertyDefinition name="TextVertFormat" initialValue="CentreAligned" redrawOnWrite="true" />
      <PropertyDefinition name="TextHorzFormat" initialValue="LeftAligned" redrawOnWrite="true" />
      <PropertyDefinition name="BoxVertAlignment" initialValue="CentreAligned" redrawOnWrite="true" />
      <PropertyDefinition name="BoxHorzAlignment" initialValue="LeftAligned" redrawOnWrite="true" />

      <Property name="UnifiedMinSize" value="{{0,24},{0,24}}" />
      <Property name="WantsMultiClickEvents" value="False" />
      <Property name="Font" value="old2" />

      <!-- The Imagery sections. This specifies how a section is drawn. -->
      <!-- ************************************************************ -->

      <!-- This is the label, just white so the color can be modulated to whatever, in selected state. -->
      <ImagerySection name="labelSelected">
         <TextComponent>
            <Area>
               <Dim type="LeftEdge">
                  <ImageDim imageset="ArkanaLook" image="CheckboxSelectedNormal" dimension="Width">
                     <DimOperator op="Add">
                        <ImageDim imageset="ArkanaLook" image="Conf_Checkbox_Textborder" dimension="XPosition" />
                     </DimOperator>
                  </ImageDim>
               </Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="RightEdge"><UnifiedDim scale="1" type="RightEdge" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <VertFormatProperty name="TextVertFormat" />
            <HorzFormatProperty name="TextHorzFormat" />
         </TextComponent>
      </ImagerySection>

      <!-- This is the label, just white so the color can be modulated to whatever, in unselected state. -->
      <ImagerySection name="labelUnselected">
         <TextComponent>
            <Area>
               <Dim type="LeftEdge">
                  <ImageDim imageset="ArkanaLook" image="CheckboxUnselectedNormal" dimension="Width">
                     <DimOperator op="Add">
                        <ImageDim imageset="ArkanaLook" image="Conf_Checkbox_Textborder" dimension="YPosition" />
                     </DimOperator>
                  </ImageDim>
               </Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="RightEdge"><UnifiedDim scale="1" type="RightEdge" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <VertFormatProperty name="TextVertFormat" />
            <HorzFormatProperty name="TextHorzFormat" />
         </TextComponent>
      </ImagerySection>

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

      <!-- This is for drawing the checkbox, unselected/normal state. -->
      <ImagerySection name="unselected_normal">
         <ImageryComponent>
            <Area>
               <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="Width"><ImageDim imageset="ArkanaLook" image="CheckboxUnselectedNormal" dimension="Width" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <Image imageset="ArkanaLook" image="CheckboxUnselectedNormal" />
            <VertFormatProperty name="BoxVertAlignment" />
            <HorzFormatProperty type="BoxHorzAlignment" />
         </ImageryComponent>
      </ImagerySection>

      <!-- This is for drawing the checkbox, unselected/hover state. -->
      <ImagerySection name="unselected_hover">
         <ImageryComponent>
            <Area>
               <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="Width"><ImageDim imageset="ArkanaLook" image="CheckboxUnselectedHover" dimension="Width" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <Image imageset="ArkanaLook" image="CheckboxUnselectedHover" />
            <VertFormatProperty name="BoxVertAlignment" />
            <HorzFormatProperty type="BoxHorzAlignment" />
         </ImageryComponent>
      </ImagerySection>

      <!-- This is for drawing the checkbox, unselected/pushed state. -->
      <ImagerySection name="unselected_pushed">
         <ImageryComponent>
            <Area>
               <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="Width"><ImageDim imageset="ArkanaLook" image="CheckboxUnselectedPushed" dimension="Width" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <Image imageset="ArkanaLook" image="CheckboxUnselectedPushed" />
            <VertFormatProperty name="BoxVertAlignment" />
            <HorzFormatProperty type="BoxHorzAlignment" />
         </ImageryComponent>
      </ImagerySection>

      <!-- This is for drawing the checkbox, unselected/disabled state. -->
      <ImagerySection name="unselected_disabled">
         <ImageryComponent>
            <Area>
               <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="Width"><ImageDim imageset="ArkanaLook" image="CheckboxUnselectedDisabled" dimension="Width" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <Image imageset="ArkanaLook" image="CheckboxUnselectedDisabled" />
            <VertFormatProperty name="BoxVertAlignment" />
            <HorzFormatProperty type="BoxHorzAlignment" />
         </ImageryComponent>
      </ImagerySection>

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

      <!-- This is for drawing the checkbox, selected/normal state. -->
      <ImagerySection name="selected_normal">
         <ImageryComponent>
            <Area>
               <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="Width"><ImageDim imageset="ArkanaLook" image="CheckboxSelectedNormal" dimension="Width" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <Image imageset="ArkanaLook" image="CheckboxSelectedNormal" />
            <VertFormatProperty name="BoxVertAlignment" />
            <HorzFormatProperty type="BoxHorzAlignment" />
         </ImageryComponent>
      </ImagerySection>

      <!-- This is for drawing the checkbox, selected/hover state. -->
      <ImagerySection name="selected_hover">
         <ImageryComponent>
            <Area>
               <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="Width"><ImageDim imageset="ArkanaLook" image="CheckboxSelectedHover" dimension="Width" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <Image imageset="ArkanaLook" image="CheckboxSelectedHover" />
            <VertFormatProperty name="BoxVertAlignment" />
            <HorzFormatProperty type="BoxHorzAlignment" />
         </ImageryComponent>
      </ImagerySection>

      <!-- This is for drawing the checkbox, selected/pushed state. -->
      <ImagerySection name="selected_pushed">
         <ImageryComponent>
            <Area>
               <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="Width"><ImageDim imageset="ArkanaLook" image="CheckboxSelectedPushed" dimension="Width" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <Image imageset="ArkanaLook" image="CheckboxSelectedPushed" />
            <VertFormatProperty name="BoxVertAlignment" />
            <HorzFormatProperty type="BoxHorzAlignment" />
         </ImageryComponent>
      </ImagerySection>

      <!-- This is for drawing the checkbox, selected/disabled state. -->
      <ImagerySection name="selected_disabled">
         <ImageryComponent>
            <Area>
               <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
               <Dim type="Width"><ImageDim imageset="ArkanaLook" image="CheckboxSelectedDisabled" dimension="Width" /></Dim>
               <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
            </Area>
            <Image imageset="ArkanaLook" image="CheckboxSelectedDisabled" />
            <VertFormatProperty name="BoxVertAlignment" />
            <HorzFormatProperty type="BoxHorzAlignment" />
         </ImageryComponent>
      </ImagerySection>

      <!-- The Imagery states. This specifies what sections are drawn in wich state. -->
      <!-- ************************************************************************* -->

      <!-- Normal -->
      <StateImagery name="Normal">
         <Layer><Section section="unselected_normal" /></Layer>
         <Layer><Section section="labelUnselected"><ColourProperty name="TextColourNormal" /></Section></Layer>
      </StateImagery>

      <!-- Hover -->
      <StateImagery name="Hover">
         <Layer><Section section="unselected_hover" /></Layer>
         <Layer><Section section="labelUnselected"><ColourProperty name="TextColourHover" /></Section></Layer>
      </StateImagery>

      <!-- Pushed -->
      <StateImagery name="Pushed">
         <Layer><Section section="unselected_pushed" /></Layer>
         <Layer><Section section="labelUnselected"><ColourProperty name="TextColourPushed" /></Section></Layer>
      </StateImagery>

      <!-- Disabled -->
      <StateImagery name="Disabled">
         <Layer><Section section="unselected_disabled" /></Layer>
         <Layer><Section section="labelUnselected"><ColourProperty name="TextColourDisabled" /></Section></Layer>
      </StateImagery>

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

      <!-- Normal -->
      <StateImagery name="SelectedNormal">
         <Layer><Section section="selected_normal" /></Layer>
         <Layer><Section section="labelSelected"><ColourProperty name="TextColourNormalSel" /></Section></Layer>
      </StateImagery>

      <!-- Hover -->
      <StateImagery name="SelectedHover">
         <Layer><Section section="selected_hover" /></Layer>
         <Layer><Section section="labelSelected"><ColourProperty name="TextColourHoverSel" /></Section></Layer>
      </StateImagery>

      <!-- Pushed -->
      <StateImagery name="SelectedPushed">
         <Layer><Section section="selected_pushed" /></Layer>
         <Layer><Section section="labelSelected"><ColourProperty name="TextColourPushedSel" /></Section></Layer>
      </StateImagery>

      <!-- Disabled -->
      <StateImagery name="SelectedDisabled">
         <Layer><Section section="selected_disabled" /></Layer>
         <Layer><Section section="labelSelected"><ColourProperty name="TextColourDisabledSel" /></Section></Layer>
      </StateImagery>

   </WidgetLook>
</Falagard>
