<!--
Description:
  Container for Vinyl control options next to waveform overview in decks.
  Visibility is toggled by VinylTogglerLeft.
  Contains spacers for when decks' overview waveforms are stacked like
  scrolling waveforms and track comment is displayed.
Variables:
  group   : [ChannelN]
  chanNum : channel number
-->
<Template>
  <WidgetGroup>
    <ObjectName>Spacer0f</ObjectName>
    <Layout>vertical</Layout>
    <Size>-1max,50f</Size>
    <Children>

      <!-- Vinyl / Passthrough -->
      <WidgetGroup>
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>

          <WidgetGroup><!-- Toggle Vinyl Control, statuslight underneath -->
            <Layout>stacked</Layout>
            <SizePolicy>min,min</SizePolicy>
            <Children>
              <Template src="skin:../Tango/controls/button_2state.xml">
                <SetVariable name="TooltipId">vinylcontrol_enabled</SetVariable>
                <SetVariable name="ObjectName">VinylControlButton</SetVariable>
                <SetVariable name="Size">40f,27f</SetVariable>
                <SetVariable name="state_0_text">VINYL</SetVariable>
                <SetVariable name="state_1_text">VINYL</SetVariable>
                <SetVariable name="ConfigKey"><Variable name="group"/>,vinylcontrol_enabled</SetVariable>
                <SetVariable name="ConfigKeyDisp"><Variable name="group"/>,vinylcontrol_status</SetVariable>
              </Template>
              <Template src="skin:../Tango/controls/statuslight_4state.xml">
                <SetVariable name="ObjectName">VinylControlStatus</SetVariable>
                <SetVariable name="Size">40f,27f</SetVariable>
                <SetVariable name="ConfigKeyDisp"><Variable name="group"/>,vinylcontrol_status</SetVariable>
              </Template>
            </Children>
          </WidgetGroup><!-- /Toggle Vinyl Control, statuslight underneath -->

          <WidgetGroup><Size>1f,1min</Size></WidgetGroup>

          <Template src="skin:../Tango/controls/button_2state.xml">
            <SetVariable name="TooltipId">passthrough_enabled</SetVariable>
            <SetVariable name="ObjectName">PassthroughButton</SetVariable>
            <SetVariable name="Size">40f,27f</SetVariable>
            <SetVariable name="state_0_text">PASS</SetVariable>
            <SetVariable name="state_1_text">PASS</SetVariable>
            <SetVariable name="ConfigKey"><Variable name="group"/>,passthrough</SetVariable>
          </Template>

          <WidgetGroup><Size>1f,1min</Size></WidgetGroup>

        </Children>
      </WidgetGroup><!-- Vinyl / Passthrough -->

      <WidgetGroup><Size>1f,1f</Size></WidgetGroup>

      <!-- Vinyl mode / Cue mode -->
      <WidgetGroup>
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>

          <Template src="skin:../Tango/controls/button_3state_persist.xml">
            <SetVariable name="TooltipId">vinylcontrol_mode</SetVariable>
            <SetVariable name="ObjectName">VinylModeButton</SetVariable>
            <SetVariable name="Size">40f,21f</SetVariable>
            <SetVariable name="state_0_text">ABS</SetVariable>
            <SetVariable name="state_1_text">REL</SetVariable>
            <SetVariable name="state_2_text">CONST</SetVariable>
            <SetVariable name="ConfigKey"><Variable name="group"/>,vinylcontrol_mode</SetVariable>
          </Template>

          <WidgetGroup><Size>1f,1f</Size></WidgetGroup>

          <!-- Cue mode button. Active only if Vinyl mode is not RELATIVE -->
          <WidgetGroup>
            <Layout>stacked</Layout>
            <Size>40f,21f</Size>
            <Children>
              <WidgetGroup>
                <TooltipId>vinylcontrol_cueing</TooltipId>
                <ObjectName>SubmenuCover</ObjectName>
                <Layout>vertical</Layout>
                <Size>40f,21f</Size>
                <Connection>
                  <ConfigKey persist="true"><Variable name="group"/>,vinylcontrol_mode</ConfigKey>
                  <Transform><IsEqual>1</IsEqual><Not/></Transform>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup>
              <Template src="skin:../Tango/controls/button_3state_persist.xml">
                <SetVariable name="TooltipId">vinylcontrol_cueing</SetVariable>
                <SetVariable name="ObjectName">VinylModeButton</SetVariable>
                <SetVariable name="Size">40f,21f</SetVariable>
                <SetVariable name="state_0_text">CUE</SetVariable>
                <SetVariable name="state_1_text">CUE</SetVariable>
                <SetVariable name="state_2_text">HOT</SetVariable>
                <SetVariable name="ConfigKey"><Variable name="group"/>,vinylcontrol_cueing</SetVariable>
              </Template>
            </Children>
          </WidgetGroup><!-- /Cue mode button -->

          <WidgetGroup><Size>1f,1min</Size></WidgetGroup>

        </Children>
      </WidgetGroup> <!-- /Vinyl mode / Cue mode -->

      <WidgetGroup><Size>1,1f</Size></WidgetGroup>

    </Children>
    <Connection>
      <ConfigKey persist="true">[Tango],vinylControlsDeck<Variable name="chanNum"/></ConfigKey>
      <BindProperty>visible</BindProperty>
    </Connection>
  </WidgetGroup>
</Template>
