<!DOCTYPE template>
<!--
  Description:
    Deck controls row (transport, beatgrid, looping, hotcue, etc.).
  Variables:
    group: the group to connect to
-->
<Template>
  <WidgetGroup>
    <ObjectName>ControlsRow</ObjectName>
    <Layout>horizontal</Layout>
    <SizePolicy>me,max</SizePolicy>
    <Children>

      <!-- Play / Cue -->
      <WidgetGroup>
        <ObjectName>PlayCueContainer</ObjectName>
        <Layout>vertical</Layout>
        <MinimumSize>32,42</MinimumSize>
        <MaximumSize>60, -1</MaximumSize>
        <SizePolicy>me,me</SizePolicy>
        <Children>
          <Template src="skin:left_right_display_2state_button.xml">
            <SetVariable name="TooltipId">cue_default_cue_gotoandstop</SetVariable>
            <SetVariable name="ObjectName">DeckCue</SetVariable>
            <SetVariable name="MinimumSize"><Variable name="HorizontalStretchButtonMinimumSize"/></SetVariable>
            <SetVariable name="MaximumSize"><Variable name="HorizontalStretchButtonMaximumSize"/></SetVariable>
            <SetVariable name="SizePolicy"><Variable name="HorizontalStretchButtonSizePolicy"/></SetVariable>
            <SetVariable name="LeftClickIsPushButton">true</SetVariable>
            <SetVariable name="state_0_text">CUE</SetVariable>
            <SetVariable name="state_1_text">CUE</SetVariable>
            <SetVariable name="left_connection_control"><Variable name="group"/>,cue_default</SetVariable>
            <SetVariable name="right_connection_control"><Variable name="group"/>,cue_gotoandstop</SetVariable>
            <SetVariable name="display_connection_control"><Variable name="group"/>,cue_indicator</SetVariable>
          </Template>

          <WidgetGroup><!-- Play button + play_indicator -->
            <Layout>stacked</Layout>
            <SizePolicy>me,me</SizePolicy>
            <Children>
              <Template src="skin:left_right_display_2state_button.xml">
                <SetVariable name="TooltipId">play_cue_set</SetVariable>
                <SetVariable name="ObjectName">PlayToggle</SetVariable>
                <SetVariable name="MinimumSize"><Variable name="HorizontalStretchButtonMinimumSize"/></SetVariable>
                <SetVariable name="MaximumSize"><Variable name="HorizontalStretchButtonMaximumSize"/></SetVariable>
                <SetVariable name="SizePolicy"><Variable name="HorizontalStretchButtonSizePolicy"/></SetVariable>
                <SetVariable name="left_connection_control"><Variable name="group"/>,play</SetVariable>
                <SetVariable name="right_connection_control"><Variable name="group"/>,cue_set</SetVariable>
                <SetVariable name="display_connection_control"><Variable name="group"/>,play_latched</SetVariable>
              </Template>
              <Template src="skin:left_2state_button.xml">
                <SetVariable name="ObjectName">PreviewIndicator</SetVariable>
                <SetVariable name="MinimumSize"><Variable name="HorizontalStretchButtonMinimumSize"/></SetVariable>
                <SetVariable name="MaximumSize"><Variable name="HorizontalStretchButtonMaximumSize"/></SetVariable>
                <SetVariable name="SizePolicy"><Variable name="HorizontalStretchButtonSizePolicy"/></SetVariable>
                <SetVariable name="left_connection_control"><Variable name="group"/>,play</SetVariable>
              </Template>
              <Template src="skin:left_2state_button.xml">
                <SetVariable name="MinimumSize"><Variable name="HorizontalStretchButtonMinimumSize"/></SetVariable>
                <SetVariable name="MaximumSize"><Variable name="HorizontalStretchButtonMaximumSize"/></SetVariable>
                <SetVariable name="SizePolicy"><Variable name="HorizontalStretchButtonSizePolicy"/></SetVariable>
                <SetVariable name="left_connection_control"><Variable name="group"/>,play_indicator</SetVariable>
              </Template>
            </Children>
          </WidgetGroup>
        </Children>
      </WidgetGroup>

      <WidgetGroup>
        <Size>3min,1min</Size>
        <MaximumSize>12,-1</MaximumSize>
      </WidgetGroup>

      <Template src="skin:hotcues.xml"/>

      <WidgetGroup>
        <Size>3min,1min</Size>
        <MaximumSize>12,-1</MaximumSize>
      </WidgetGroup>

      <Template src="skin:special_cues.xml"/>

      <!-- Expanding spacers in between control contexts -->
      <WidgetGroup><Size>3min,1min</Size></WidgetGroup>

      <Template src="skin:deck_looping_controls.xml"/>

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

      <Template src="skin:deck_beatjump_controls.xml"/>

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

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