<Template>
  <SetVariable name="BtnType"><Variable name="SubRegion_BtnType"/></SetVariable>
  <SetVariable name="Group">[Master]</SetVariable>
  <SetVariable name="KnobBg">main</SetVariable>
  <SetVariable name="KnobIndicator">main</SetVariable>
  <SetVariable name="ArcRadius"><Variable name="ArcRadiusCompact"/></SetVariable>
  <SetVariable name="ArcThickness"><Variable name="ArcThicknessBig"/></SetVariable>

  <WidgetGroup>
    <SizePolicy>max,min</SizePolicy>
    <Layout>horizontal</Layout>
    <Children>

      <WidgetGroup><!--sized and styled in css -->
        <ObjectName>MainMixerSeparator</ObjectName>
        <Layout>horizontal</Layout>
        <Children/>
      </WidgetGroup>

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

          <WidgetGroup>
            <ObjectName>MainControls</ObjectName>
            <SizePolicy>min,me</SizePolicy>
            <Layout>vertical</Layout>
            <Children>

              <WidgetGroup>
                <MinimumSize>0,0</MinimumSize>
                <!-- <MaximumSize>,20</MaximumSize> -->
                <SizePolicy>min,me</SizePolicy>
              </WidgetGroup>

              <!-- Main knobs
                  Labels are separate so knobs are spaced equally -->
              <WidgetGroup>
                <Layout>horizontal</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <WidgetGroup>
                    <Layout>horizontal</Layout>
                    <SizePolicy>me,min</SizePolicy>
                    <Children>
                      <Template src="skins:LateNight/controls/knob_with_label.xml">
                        <SetVariable name="TooltipId">main_gain</SetVariable>
                        <SetVariable name="Size">35f,30f</SetVariable>
                        <SetVariable name="KnobColor">orange</SetVariable>
                        <SetVariable name="ArcColor"><Variable name="ArcColorGainLow"/></SetVariable>
                        <SetVariable name="ArcUnipolar">true</SetVariable>
                        <SetVariable name="Control">gain</SetVariable>
                        <SetVariable name="Label">Main</SetVariable>
                      </Template>
                    </Children>
                  </WidgetGroup>

                  <WidgetGroup>
                    <Layout>horizontal</Layout>
                    <SizePolicy>me,min</SizePolicy>
                    <Children>
                      <Template src="skins:LateNight/controls/knob_with_label.xml">
                        <SetVariable name="TooltipId">balance</SetVariable>
                        <SetVariable name="Size">35f,30f</SetVariable>
                        <SetVariable name="KnobColor">red</SetVariable>
                        <SetVariable name="ArcColor"><Variable name="ArcColorMstBal"/></SetVariable>
                        <SetVariable name="Control">balance</SetVariable>
                        <SetVariable name="Label"> Bal</SetVariable>
                      </Template>
                    </Children>
                  </WidgetGroup>
                </Children>
              </WidgetGroup>

              <WidgetGroup>
                <MinimumSize>0,0</MinimumSize>
                <MaximumSize>,2</MaximumSize>
                <SizePolicy>min,me</SizePolicy>
              </WidgetGroup>

              <WidgetGroup>
                <ObjectName>BoothKnobBox</ObjectName>
                <Layout>horizontal</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <WidgetGroup><Size>5f,0min</Size></WidgetGroup>
                  <Template src="skins:LateNight/controls/knob.xml">
                    <SetVariable name="TooltipId">booth_gain</SetVariable>
                    <SetVariable name="Size">35f,30f</SetVariable>
                    <SetVariable name="KnobColor">orange</SetVariable>
                    <SetVariable name="ArcColor"><Variable name="ArcColorGainLow"/></SetVariable>
                    <SetVariable name="ArcUnipolar">true</SetVariable>
                    <SetVariable name="Control">booth_gain</SetVariable>
                  </Template>
                  <WidgetGroup>
                    <ObjectName>BoothLabelBox</ObjectName>
                    <Layout>vertical</Layout>
                    <SizePolicy>me,min</SizePolicy>
                    <Children>
                      <Label>
                        <ObjectName>KnobLabel</ObjectName>
                        <SizePolicy>max,max</SizePolicy>
                        <Alignment>left</Alignment>
                        <Text>Booth</Text>
                      </Label>
                    </Children>
                  </WidgetGroup><!-- BoothLabelBox -->
                </Children>
                <Connection>
                  <ConfigKey>[Master],booth_enabled</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup><!-- BoothKnobBox -->

              <WidgetGroup>
                <MinimumSize>0,2</MinimumSize>
                <MaximumSize>,20</MaximumSize>
                <SizePolicy>min,me</SizePolicy>
              </WidgetGroup>

              <WidgetGroup>
                <ObjectName>AlignCenter</ObjectName>
                <Layout>vertical</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <Template src="skins:LateNight/fx/assign_buttons_main.xml">
                    <SetVariable name="Type">main</SetVariable>
                  </Template>
                </Children>
              </WidgetGroup>

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

                  <WidgetGroup>
                    <MinimumSize>0,10</MinimumSize>
                    <MaximumSize>,10</MaximumSize>
                    <SizePolicy>min,me</SizePolicy>
                  </WidgetGroup>

                  <WidgetGroup>
                    <ObjectName>VuMeterMain_4Decks</ObjectName>
                    <Layout>horizontal</Layout>
                    <SizePolicy>max,max</SizePolicy>
                    <Children>
                      <SingletonContainer>
                        <ObjectName>VuMeterMain_Light</ObjectName>
                      </SingletonContainer>
                    </Children>
                  </WidgetGroup><!-- VuMeterMain_4Decks -->

                  <WidgetGroup>
                    <MinimumSize>0,20</MinimumSize>
                    <MaximumSize>,20</MaximumSize>
                    <SizePolicy>min,me</SizePolicy>
                  </WidgetGroup>

                </Children>
                <Connection>
                  <ConfigKey persist="true">[Skin],show_4decks</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup><!-- /MainVuMeter4ch -->

            </Children>
          </WidgetGroup><!-- MainControls -->

          <WidgetGroup><!-- sized and styled in css -->
            <ObjectName>MainHeadphoneSeparator</ObjectName>
            <Layout>horizontal</Layout>
            <Children/>
          </WidgetGroup>

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

              <WidgetGroup>
                <MinimumSize>0,0</MinimumSize>
                <!-- <MaximumSize>,20</MaximumSize> -->
                <SizePolicy>min,me</SizePolicy>
              </WidgetGroup>

              <WidgetGroup><!-- Headphone knobs -->
                <Layout>horizontal</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <WidgetGroup>
                    <Layout>horizontal</Layout>
                    <SizePolicy>me,min</SizePolicy>
                    <Children>
                      <Template src="skins:LateNight/controls/knob_with_label.xml">
                        <SetVariable name="TooltipId">headphone_gain</SetVariable>
                        <SetVariable name="Size">35f,30f</SetVariable>
                        <SetVariable name="KnobColor">orange</SetVariable>
                        <SetVariable name="ArcColor"><Variable name="ArcColorGainLow"/></SetVariable>
                        <SetVariable name="ArcUnipolar">true</SetVariable>
                        <SetVariable name="Control">headGain</SetVariable>
                        <SetVariable name="Label">Head</SetVariable>
                      </Template>
                    </Children>
                  </WidgetGroup>

                  <WidgetGroup>
                    <Layout>horizontal</Layout>
                    <SizePolicy>me,min</SizePolicy>
                    <Children>
                      <Template src="skins:LateNight/controls/knob_with_label.xml">
                        <SetVariable name="TooltipId">headMix</SetVariable>
                        <SetVariable name="Size">35f,30f</SetVariable>
                        <SetVariable name="KnobColor">red</SetVariable>
                        <SetVariable name="ArcColor"><Variable name="ArcColorMstBal"/></SetVariable>
                        <SetVariable name="Control">headMix</SetVariable>
                        <SetVariable name="Label">Mix</SetVariable>
                      </Template>
                    </Children>
                  </WidgetGroup>
                </Children>
              </WidgetGroup>

              <WidgetGroup>
                <MinimumSize>0,0</MinimumSize>
                <MaximumSize>,5</MaximumSize>
                <SizePolicy>min,me</SizePolicy>
              </WidgetGroup>

              <WidgetGroup><!-- HeadSplit button -->
                <Layout>horizontal</Layout>
                <SizePolicy>me,min</SizePolicy>
                <Children>
                  <PushButton>
                    <TooltipId>headSplit</TooltipId>
                    <ObjectName>SplitCue</ObjectName>
                    <Size>48f,22f</Size>
                    <NumberStates>2</NumberStates>
                    <RightClickIsPushButton>false</RightClickIsPushButton>
                    <State>
                      <Number>0</Number>
                      <Unpressed scalemode="STRETCH">skins:LateNight/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_headsplit.svg</Unpressed>
                      <Pressed scalemode="STRETCH">skins:LateNight/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_headsplit.svg</Pressed>
                    </State>
                    <State>
                      <Number>1</Number>
                      <Unpressed scalemode="STRETCH">skins:LateNight/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_headsplit_active.svg</Unpressed>
                      <Pressed scalemode="STRETCH">skins:LateNight/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_headsplit_active.svg</Pressed>
                    </State>
                    <Connection>
                      <ConfigKey>[Master],headSplit</ConfigKey>
                      <ButtonState>LeftButton</ButtonState>
                    </Connection>
                  </PushButton>
                </Children>
              </WidgetGroup>

              <WidgetGroup>
                <MinimumSize>0,2</MinimumSize>
                <MaximumSize>,5</MaximumSize>
                <SizePolicy>min,me</SizePolicy>
              </WidgetGroup>

              <WidgetGroup>
                <ObjectName>AlignCenter</ObjectName>
                <Layout>vertical</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <Template src="skins:LateNight/fx/assign_buttons_main.xml">
                    <SetVariable name="Group">[Headphone]</SetVariable>
                    <SetVariable name="Type">headphones</SetVariable>
                  </Template>
                </Children>
              </WidgetGroup>

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

            </Children>
          </WidgetGroup><!-- HeadphoneControls -->

        </Children>
      </WidgetGroup><!-- MixerMainHeadphone -->

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