<!DOCTYPE template>
<!--
  Description:
    A row of three buttons which set the deck's crossfader
    orientation directly: L | M | R
  Variables:
    group:
    xfaderLeft, xfaderRight: default | warning | off
          Picks a colored icon for L,M,R depending on whether
          the deck's orientation is the default, set to Master
          or to the opposite side
-->
<Template>
  <WidgetGroup>
    <ObjectName>CrossfaderButtonContainer_Deck</ObjectName>
    <Layout>horizontal</Layout>
    <SizePolicy>min,min</SizePolicy>
    <Children>
      <!-- L -->
      <PushButton>
        <ObjectName>CrossfaderButton</ObjectName>
        <TooltipId>orientation</TooltipId>
        <Size>11f,15f</Size>
        <NumberStates>2</NumberStates>
        <RightClickIsPushButton>false</RightClickIsPushButton>
        <State>
          <Number>0</Number>
          <Pressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_left_off.svg</Pressed>
          <Unpressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_left_off.svg</Unpressed>
        </State>
        <State>
          <Number>1</Number>
          <Pressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_left_<Variable name="xfaderLeft"/>.svg</Pressed>
          <Unpressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_left_<Variable name="xfaderLeft"/>.svg</Unpressed>
        </State>
        <Connection>
          <ConfigKey><Variable name="Group"/>,orientation</ConfigKey>
          <Transform>
            <IsEqual>0</IsEqual>
          </Transform>
          <ButtonState>LeftButton</ButtonState>
        </Connection>
      </PushButton>
      <!-- M -->
      <PushButton>
        <ObjectName>CrossfaderButton</ObjectName>
        <TooltipId>orientation</TooltipId>
        <Size>11f,15f</Size>
        <NumberStates>2</NumberStates>
        <RightClickIsPushButton>false</RightClickIsPushButton>
        <State>
          <Number>0</Number>
          <Pressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_mid_off.svg</Pressed>
          <Unpressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_mid_off.svg</Unpressed>
        </State>
        <State>
          <Number>1</Number>
          <Pressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_mid_warning.svg</Pressed>
          <Unpressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_mid_warning.svg</Unpressed>
        </State>
        <Connection>
          <ConfigKey><Variable name="Group"/>,orientation</ConfigKey>
          <Transform>
            <IsEqual>1</IsEqual>
          </Transform>
          <ButtonState>LeftButton</ButtonState>
        </Connection>
      </PushButton>
      <!-- R -->
      <PushButton>
        <ObjectName>CrossfaderButton</ObjectName>
        <TooltipId>orientation</TooltipId>
        <Size>11f,15f</Size>
        <NumberStates>2</NumberStates>
        <RightClickIsPushButton>false</RightClickIsPushButton>
        <State>
          <Number>0</Number>
          <Pressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_right_off.svg</Pressed>
          <Unpressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_right_off.svg</Unpressed>
        </State>
        <State>
          <Number>1</Number>
          <Pressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_right_<Variable name="xfaderRight"/>.svg</Pressed>
          <Unpressed scalemode="STRETCH_ASPECT">skin:/<Variable name="BtnScheme"/>/buttons/btn__xfader_deck_right_<Variable name="xfaderRight"/>.svg</Unpressed>
        </State>
        <Connection>
          <ConfigKey><Variable name="Group"/>,orientation</ConfigKey>
          <Transform>
            <IsEqual>2</IsEqual>
          </Transform>
          <ButtonState>LeftButton</ButtonState>
        </Connection>
      </PushButton>
    </Children>
  </WidgetGroup><!-- CrossfaderButtonContainer_Deck -->
</Template>
