<!DOCTYPE template>
<!--
  Description:
    Sample deck container widget.
-->
<Template>
  <SingletonDefinition>
    <ObjectName>SamplerRow1</ObjectName>
    <Children>
      <Template src="skin:../Tango/mic_aux_sampler/sampler_row.xml">
        <SetVariable name="row">1</SetVariable>
        <SetVariable name="sampler1">1</SetVariable>
        <SetVariable name="sampler2">2</SetVariable>
        <SetVariable name="sampler3">3</SetVariable>
        <SetVariable name="sampler4">4</SetVariable>
        <SetVariable name="sampler5">5</SetVariable>
        <SetVariable name="sampler6">6</SetVariable>
        <SetVariable name="sampler7">7</SetVariable>
        <SetVariable name="sampler8">8</SetVariable>
      </Template>
    </Children>
  </SingletonDefinition>

  <SingletonDefinition>
    <ObjectName>SamplerRow2</ObjectName>
    <Children>
      <Template src="skin:../Tango/mic_aux_sampler/sampler_row.xml">
        <SetVariable name="row">2</SetVariable>
        <SetVariable name="sampler1">9</SetVariable>
        <SetVariable name="sampler2">10</SetVariable>
        <SetVariable name="sampler3">11</SetVariable>
        <SetVariable name="sampler4">12</SetVariable>
        <SetVariable name="sampler5">13</SetVariable>
        <SetVariable name="sampler6">14</SetVariable>
        <SetVariable name="sampler7">15</SetVariable>
        <SetVariable name="sampler8">16</SetVariable>
      </Template>
    </Children>
  </SingletonDefinition>

  <WidgetGroup>
    <Layout>vertical</Layout>
    <!-- I don't now why this works but a WidgetGroup wrapper around a
         WidgetStack with a 'fixed' size policy makes the group track the
         minimum size of the current stack widget. -->
    <SizePolicy>me,f</SizePolicy>
    <Children>

      <WidgetStack currentpage="[Skin],sampler_rows" persist="true">
        <ObjectName>SampleDecksContainer</ObjectName>
        <NextControl>[Skin],sampler_row_next</NextControl>
        <PrevControl>[Skin],sampler_row_prev</PrevControl>
        <Children>

          <WidgetGroup trigger="[Skin],sampler_row_1">
            <ObjectName>SamplerRows</ObjectName>
            <Layout>vertical</Layout>
            <SizePolicy>me,min</SizePolicy>
            <Children>
              <SingletonContainer>
                <ObjectName>SamplerRow1</ObjectName>
              </SingletonContainer>
            </Children>
          </WidgetGroup>

          <WidgetGroup trigger="[Skin],sampler_row_2">
            <ObjectName>SamplerRows</ObjectName>
            <Layout>vertical</Layout>
            <SizePolicy>me,min</SizePolicy>
            <Children>
              <SingletonContainer>
                <ObjectName>SamplerRow1</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>SamplerRow2</ObjectName>
              </SingletonContainer>
            </Children>
          </WidgetGroup>

        </Children>
      </WidgetStack>

    </Children>
    <Connection>
      <ConfigKey persist="true">[Samplers],show_samplers</ConfigKey>
      <BindProperty>visible</BindProperty>
    </Connection>
  </WidgetGroup>
</Template>
