<Template>
  <SetVariable name="group">[Sampler<Variable name="samplernum"/>]</SetVariable>
  <WidgetGroup>
    <ObjectName>SamplerDeck</ObjectName>
    <Layout>horizontal</Layout>
    <SizePolicy>me,min</SizePolicy>
    <Children>

      <WidgetGroup>
        <ObjectName>SamplerPlaySmall</ObjectName>
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>
          <Template src="skin:button_2state_right_display.xml">
            <SetVariable name="TooltipId">cue_gotoandplay_cue_default</SetVariable>
            <SetVariable name="Size">34f,34f</SetVariable>
            <SetVariable name="state_0_pressed">play_sampler_down.svg</SetVariable>
            <SetVariable name="state_0_unpressed">play_sampler.svg</SetVariable>
            <SetVariable name="state_1_pressed">play_sampler_overdown.svg</SetVariable>
            <SetVariable name="state_1_unpressed">play_sampler_over.svg</SetVariable>
            <SetVariable name="ConfigKey"><Variable name="group"/>,cue_gotoandplay</SetVariable>
            <SetVariable name="ConfigKeyRight"><Variable name="group"/>,cue_default</SetVariable>
            <SetVariable name="ConfigKeyDisp"><Variable name="group"/>,play_indicator</SetVariable>
          </Template>
        </Children>
      </WidgetGroup>

      <WidgetGroup>
        <Layout>vertical</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>

          <!-- First row -->
          <WidgetGroup>
            <ObjectName>SamplerTextSmall</ObjectName>
            <Layout>horizontal</Layout>
            <SizePolicy>min,min</SizePolicy>
            <Children>
              <TrackProperty>
                <TooltipId>track_title</TooltipId>
                <ObjectName>SamplerTitleSmall</ObjectName>
                <SizePolicy>me,min</SizePolicy>
                <Property>title</Property>
                <Group><Variable name="group"/></Group>
                <Elide>right</Elide>
              </TrackProperty>
            </Children>
          </WidgetGroup>
          <!-- /First row -->

          <!-- Second row -->
          <WidgetGroup>
            <ObjectName>AlignLeft</ObjectName>
            <Layout>horizontal</Layout>
            <Children>

              <WidgetGroup><Size>2f,0min</Size></WidgetGroup>

              <Number>
                <TooltipId>visual_bpm</TooltipId>
                <Group>[Sampler<Variable name="samplernum"/>]</Group>
                <!--CSS alignments not respected see bug lp:605530 , lets call <Alignment>-->
                <Alignment>left</Alignment>
                <Connection>
                  <ConfigKey>[Sampler<Variable name="samplernum"/>],visual_bpm</ConfigKey>
                </Connection>
                <Connection>
                  <ConfigKey>[Sampler<Variable name="samplernum"/>],track_loaded</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </Number>

              <WidgetGroup><SizePolicy>me,min</SizePolicy></WidgetGroup>

              <PushButton>
                <TooltipId>orientation</TooltipId>
                <NumberStates>3</NumberStates>
                <State>
                  <Number>0</Number>
                  <Pressed>buttons/btn_orientation_sampler_left.svg</Pressed>
                  <Unpressed>buttons/btn_orientation_sampler_left.svg</Unpressed>
                </State>
                <State>
                  <Number>1</Number>
                  <Pressed>buttons/btn_orientation_sampler_master.svg</Pressed>
                  <Unpressed>buttons/btn_orientation_sampler_master.svg</Unpressed>
                </State>
                <State>
                  <Number>2</Number>
                  <Pressed>buttons/btn_orientation_sampler_right.svg</Pressed>
                  <Unpressed>buttons/btn_orientation_sampler_right.svg</Unpressed>
                </State>
                <Connection>
                  <ConfigKey><Variable name="group"/>,orientation</ConfigKey>
                  <ButtonState>LeftButton</ButtonState>
                </Connection>
              </PushButton>

              <Template src="skin:button_2state_nohover.xml">
                <SetVariable name="TooltipId">keylock</SetVariable>
                <SetVariable name="icon">keylock_sampler</SetVariable>
                <SetVariable name="ConfigKey"><Variable name="group"/>,keylock</SetVariable>
                <SetVariable name="Size">21,18</SetVariable>
              </Template>

              <Template src="skin:button_2state_nohover.xml">
                <SetVariable name="TooltipId">eject</SetVariable>
                <SetVariable name="icon">eject_sampler</SetVariable>
                <SetVariable name="ConfigKey"><Variable name="group"/>,eject</SetVariable>
                <SetVariable name="Size">21,18</SetVariable>
              </Template>

            </Children>
          </WidgetGroup>
          <!-- /Second row -->


        </Children>
      </WidgetGroup>

    </Children>
  </WidgetGroup>
</Template>
