<Template>
  <SetVariable name="BtnType"><Variable name="SubRegion_BtnType"/></SetVariable>
  <SetVariable name="Group">[Master]</SetVariable>
  <SetVariable name="KnobBg">master</SetVariable>
  <SetVariable name="KnobIndicator">master</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>MasterMixerSeparator</ObjectName>
        <Layout>horizontal</Layout>
        <Children/>
      </WidgetGroup>

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

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

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

              <!-- Master 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="skin:/controls/knob_with_label.xml">
                        <SetVariable name="TooltipId">master_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="skin:/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="skin:/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="skin:/fx/assign_buttons_master.xml">
                    <SetVariable name="Type">master</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>VuMeterMaster_4Decks</ObjectName>
                    <Layout>horizontal</Layout>
                    <SizePolicy>max,max</SizePolicy>
                    <Children>
                      <SingletonContainer>
                        <ObjectName>VuMeterMaster_Light</ObjectName>
                      </SingletonContainer>
                    </Children>
                  </WidgetGroup><!-- VuMeterMaster_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><!-- /MasterVuMeter4ch -->

            </Children>
          </WidgetGroup><!-- MasterControls -->

          <WidgetGroup><!-- sized and styled in css -->
            <ObjectName>MasterHeadphoneSeparator</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="skin:/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="skin:/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">skin:/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_sync.svg</Unpressed>
                      <Pressed scalemode="STRETCH">skin:/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_sync.svg</Pressed>
                    </State>
                    <State>
                      <Number>1</Number>
                      <Unpressed scalemode="STRETCH">skin:/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_sync_active.svg</Unpressed>
                      <Pressed scalemode="STRETCH">skin:/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_sync_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="skin:/fx/assign_buttons_master.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><!-- MixerMasterHeadphone -->

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