<Template>
  <WidgetGroup>
    <ObjectName>Border58</ObjectName>
    <SizePolicy>max,min</SizePolicy>
    <Layout>vertical</Layout>
    <Children>
      <!-- This container gives the Master/Headphone
            a continuous background image -->
      <WidgetGroup>
        <ObjectName>MasterHeadphoneMixer</ObjectName>
        <BackPath>style/background_tile.png</BackPath>
        <SizePolicy>min,min</SizePolicy>
        <Layout>vertical</Layout>
        <Children>

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

              <WidgetGroup><Size>0min,3f</Size></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:knob_textless.xml">
                        <SetVariable name="Size">35f,30f</SetVariable>
                        <SetVariable name="TooltipId">master_gain</SetVariable>
                        <SetVariable name="group">[Master]</SetVariable>
                        <SetVariable name="control">gain</SetVariable>
                      </Template>
                    </Children>
                  </WidgetGroup>

                  <WidgetGroup>
                    <Layout>horizontal</Layout>
                    <SizePolicy>me,min</SizePolicy>
                    <Children>
                      <Template src="skin:knob_textless.xml">
                        <SetVariable name="Size">35f,30f</SetVariable>
                        <SetVariable name="TooltipId">balance</SetVariable>
                        <SetVariable name="group">[Master]</SetVariable>
                        <SetVariable name="control">balance</SetVariable>
                      </Template>
                    </Children>
                  </WidgetGroup>
                </Children>
              </WidgetGroup>

              <!-- Master knob labels -->
              <WidgetGroup>
                <Layout>horizontal</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <Label>
                    <ObjectName>KnobLabel</ObjectName>
                    <SizePolicy>min,min</SizePolicy>
                    <Alignment>left</Alignment>
                    <Text> master</Text>
                  </Label>

                  <Label>
                    <ObjectName>KnobLabel</ObjectName>
                    <SizePolicy>me,min</SizePolicy>
                    <Alignment>right</Alignment>
                    <Text>l / r</Text>
                  </Label>
                </Children>
              </WidgetGroup>

              <WidgetGroup><Size>0min,4f</Size></WidgetGroup>

              <WidgetGroup><!-- FX buttons 1/2 -->
                <Layout>horizontal</Layout>
                <SizePolicy>me,min</SizePolicy>
                <Children>
                  <Template src="skin:button_2state.xml">
                    <SetVariable name="TooltipId">EffectUnit_master_enabled</SetVariable>
                    <SetVariable name="ObjectName">FxAssignButton</SetVariable>
                    <SetVariable name="Size">35me,22f</SetVariable>
                    <SetVariable name="state_0_text">FX&#8202;1</SetVariable>
                    <SetVariable name="state_1_text">FX&#8202;1</SetVariable>
                    <SetVariable name="ConfigKey">[EffectRack1_EffectUnit1],group_[Master]_enable</SetVariable>
                  </Template>

                  <Template src="skin:button_2state.xml">
                    <SetVariable name="TooltipId">EffectUnit_master_enabled</SetVariable>
                    <SetVariable name="ObjectName">FxAssignButton</SetVariable>
                    <SetVariable name="Size">35me,22f</SetVariable>
                    <SetVariable name="state_0_text">FX&#8202;2</SetVariable>
                    <SetVariable name="state_1_text">FX&#8202;2</SetVariable>
                    <SetVariable name="ConfigKey">[EffectRack1_EffectUnit2],group_[Master]_enable</SetVariable>
                  </Template>
                </Children>
              </WidgetGroup><!-- /FX buttons 1/2 -->

              <!-- FX buttons 3/4 -->
              <WidgetGroup>
                <Layout>horizontal</Layout>
                <SizePolicy>me,min</SizePolicy>
                <Children>
                  <Template src="skin:button_2state.xml">
                    <SetVariable name="TooltipId">EffectUnit_master_enabled</SetVariable>
                    <SetVariable name="ObjectName">FxAssignButton</SetVariable>
                    <SetVariable name="Size">35me,22f</SetVariable>
                    <SetVariable name="state_0_text">FX&#8202;3</SetVariable>
                    <SetVariable name="state_1_text">FX&#8202;3</SetVariable>
                    <SetVariable name="ConfigKey">[EffectRack1_EffectUnit3],group_[Master]_enable</SetVariable>
                  </Template>

                  <Template src="skin:button_2state.xml">
                    <SetVariable name="TooltipId">EffectUnit_master_enabled</SetVariable>
                    <SetVariable name="ObjectName">FxAssignButton</SetVariable>
                    <SetVariable name="Size">35me,22f</SetVariable>
                    <SetVariable name="state_0_text">FX&#8202;4</SetVariable>
                    <SetVariable name="state_1_text">FX&#8202;4</SetVariable>
                    <SetVariable name="ConfigKey">[EffectRack1_EffectUnit4],group_[Master]_enable</SetVariable>
                  </Template>
                </Children>
                <Connection>
                  <ConfigKey persist="true">[Master],show_4effectunits</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup><!-- /FX buttons 3/4 -->

              <WidgetGroup><Size>0min,5f</Size></WidgetGroup>

              <WidgetGroup>
                <Layout>vertical</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <Template src="skin:knob_textless.xml">
                    <SetVariable name="Size">35f,30f</SetVariable>
                    <SetVariable name="TooltipId">booth_gain</SetVariable>
                    <SetVariable name="group">[Master]</SetVariable>
                    <SetVariable name="control">booth_gain</SetVariable>
                  </Template>

                  <Label>
                    <ObjectName>KnobLabel</ObjectName>
                    <SizePolicy>min,min</SizePolicy>
                    <Alignment>right</Alignment>
                    <Text>Booth</Text>
                  </Label>
                </Children>
                <Connection>
                  <ConfigKey>[Master],booth_enabled</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup>

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

                  <WidgetGroup><!-- Peak indicator L + R -->
                    <ObjectName>Spacer1e</ObjectName>
                    <Layout>horizontal</Layout>
                    <SizePolicy>max,max</SizePolicy>
                    <Children>
                      <StatusLight>
                        <TooltipId>master_PeakIndicator</TooltipId>
                        <PathStatusLight>style/clipping_deck_over.png</PathStatusLight>
                        <PathBack>style/clipping_deck.png</PathBack>
                        <Connection>
                          <ConfigKey>[Master],PeakIndicatorL</ConfigKey>
                        </Connection>
                      </StatusLight>
                      <StatusLight>
                        <TooltipId>master_PeakIndicator</TooltipId>
                        <PathStatusLight>style/clipping_deck_over.png</PathStatusLight>
                        <PathBack>style/clipping_deck.png</PathBack>
                        <Connection>
                          <ConfigKey>[Master],PeakIndicatorR</ConfigKey>
                        </Connection>
                      </StatusLight>
                    </Children>
                  </WidgetGroup><!-- /Peak indicator L + R -->

                  <WidgetGroup><!-- Level L + R -->
                    <ObjectName>Spacer1e</ObjectName>
                    <Layout>horizontal</Layout>
                    <SizePolicy>max,max</SizePolicy>
                    <Children>
                      <VuMeter>
                        <TooltipId>master_VuMeterL</TooltipId>
                        <PathVu>style/volume_display_deck_over.png</PathVu>
                        <PathBack>style/volume_display_deck.png</PathBack>
                        <Horizontal>false</Horizontal>
                        <PeakHoldSize>5</PeakHoldSize>
                        <PeakHoldTime>500</PeakHoldTime>
                        <PeakFallTime>50</PeakFallTime>
                        <PeakFallStep>2</PeakFallStep>
                        <Connection>
                          <ConfigKey>[Master],VuMeterL</ConfigKey>
                        </Connection>
                      </VuMeter>
                      <VuMeter>
                        <TooltipId>master_VuMeterR</TooltipId>
                        <PathVu>style/volume_display_deck_over.png</PathVu>
                        <PathBack>style/volume_display_deck.png</PathBack>
                        <Horizontal>false</Horizontal>
                        <PeakHoldSize>5</PeakHoldSize>
                        <PeakHoldTime>500</PeakHoldTime>
                        <PeakFallTime>50</PeakFallTime>
                        <PeakFallStep>2</PeakFallStep>
                        <Connection>
                          <ConfigKey>[Master],VuMeterR</ConfigKey>
                        </Connection>
                      </VuMeter>
                    </Children>
                  </WidgetGroup><!-- /Level L + R -->
                </Children>
                <Connection>
                  <ConfigKey persist="true">[Master],show_4decks</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup><!-- /MasterVuMeter4ch -->

            </Children>
          </WidgetGroup>

          <WidgetGroup>
            <ObjectName>MasterHeadphoneDivider</ObjectName>
            <Size>,11f</Size>
          </WidgetGroup>

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

              <!-- Headphone 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:knob_textless.xml">
                        <SetVariable name="Size">35f,30f</SetVariable>
                        <SetVariable name="TooltipId">headphone_gain</SetVariable>
                        <SetVariable name="group">[Master]</SetVariable>
                        <SetVariable name="control">headGain</SetVariable>
                      </Template>
                    </Children>
                  </WidgetGroup>

                  <WidgetGroup>
                    <Layout>horizontal</Layout>
                    <SizePolicy>me,min</SizePolicy>
                    <Children>
                      <Template src="skin:knob_textless.xml">
                        <SetVariable name="Size">35f,30f</SetVariable>
                        <SetVariable name="TooltipId">headMix</SetVariable>
                        <SetVariable name="group">[Master]</SetVariable>
                        <SetVariable name="control">headMix</SetVariable>
                      </Template>
                    </Children>
                  </WidgetGroup>
                </Children>
              </WidgetGroup>

              <WidgetGroup><!-- Headphone knob labels -->
                <Layout>horizontal</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <Label>
                    <ObjectName>KnobLabel</ObjectName>
                    <SizePolicy>me,min</SizePolicy>
                    <Alignment>left</Alignment>
                    <Text>  Head   </Text>
                  </Label>

                  <Label>
                    <ObjectName>KnobLabel</ObjectName>
                    <SizePolicy>me,min</SizePolicy>
                    <Alignment>right</Alignment>
                    <Text>CUE/MST</Text>
                  </Label>
                </Children>
              </WidgetGroup>

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

              <WidgetGroup><!-- HeadSplit button -->
                <Layout>horizontal</Layout>
                <SizePolicy>me,min</SizePolicy>
                <Children>
                  <Template src="skin:button_2state.xml">
                    <SetVariable name="TooltipId">headSplit</SetVariable>
                    <SetVariable name="ObjectName">FxAssignButton</SetVariable>
                    <SetVariable name="Size">68f,22f</SetVariable>
                    <SetVariable name="state_0_text">Split Cue</SetVariable>
                    <SetVariable name="state_1_text">Split Cue</SetVariable>
                    <SetVariable name="ConfigKey">[Master],headSplit</SetVariable>
                  </Template>
                </Children>
              </WidgetGroup><!-- /HeadSplit button -->

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

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