<!--
Description:
  Container for auxiliary controls in mixerbar
  * talkover/mute button
  * level meter
  * Pregain knob
Variables:
  auxNum : text shown on talkover button and internal auxiliary number
-->
<Template>
  <SetVariable name="sourceType">auxiliary</SetVariable>
  <SetVariable name="group">[Auxiliary<Variable name="auxNum"/>]</SetVariable>
  <SetVariable name="FxRack">1</SetVariable>
  <WidgetGroup>
    <ObjectName>AlignCenter</ObjectName>
    <Layout>horizontal</Layout>
    <SizePolicy>min,min</SizePolicy>
    <Children>
      <WidgetGroup>
        <ObjectName>AuxUnit</ObjectName>
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>

          <Label>
            <ObjectName>AuxUnitIcon</ObjectName>
            <Size>17f,32f</Size>
          </Label>

          <Label>
            <ObjectName>AuxUnitLabel</ObjectName>
            <Size>13f,32f</Size>
            <Text><Variable name="auxNum"/></Text>
            <Alignment>right</Alignment>
          </Label>

          <Template src="skin:button_2state_persist.xml">
            <SetVariable name="TooltipId">mute</SetVariable>
            <SetVariable name="ObjectName">AuxMute</SetVariable>
            <SetVariable name="Size">20f,29f</SetVariable>
            <SetVariable name="ConfigKey"><Variable name="group"/>,mute</SetVariable>
          </Template>

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

          <Template src="skin:vumeter_mini.xml">
            <SetVariable name="Size">5f,29f</SetVariable>
          </Template>

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

          <Template src="skin:knob_textless.xml">
            <SetVariable name="TooltipId"></SetVariable>
            <SetVariable name="ObjectName">MicAuxKnob</SetVariable>
            <SetVariable name="Size">28f,28f</SetVariable>
            <SetVariable name="group"><Variable name="group"/></SetVariable>
            <SetVariable name="ConfigKey">pregain</SetVariable>
            <SetVariable name="Color">yellow</SetVariable>
          </Template>

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

          <WidgetGroup><!-- Pfl + xFader orientation -->
            <SizePolicy>max,max</SizePolicy>
            <Layout>vertical</Layout>
            <Children>

              <WidgetGroup><!-- Pfl button + cover -->
                <Size>18f,18f</Size>
                <Layout>stacked</Layout>
                <Children>
                  <!-- index 0 due to bug -->
                  <WidgetGroup><Size>0f,0f</Size></WidgetGroup>

                  <!-- Greyed out if no headphone device is configured -->
                  <Template src="skin:pfl_cover.xml"/>

                  <Template src="skin:button_2state.xml">
                    <SetVariable name="TooltipId">pfl</SetVariable>
                    <SetVariable name="ObjectName">PflButton</SetVariable>
                    <SetVariable name="Size">18f,18f</SetVariable>
                    <SetVariable name="state_0_icon">pfl_off.svg</SetVariable>
                    <SetVariable name="state_1_icon">pfl_on.svg</SetVariable>
                    <SetVariable name="ConfigKey"><Variable name="group"/>,pfl</SetVariable>
                  </Template>
                </Children>
              </WidgetGroup><!-- /Pfl button + cover -->

              <Template src="skin:button_3state_persist.xml">
                <SetVariable name="TooltipId">orientation</SetVariable>
                <SetVariable name="ObjectName">AuxXfaderButton</SetVariable>
                <SetVariable name="Size">18f,15f</SetVariable>
                <SetVariable name="state_0_icon">aux_xfader_left.svg</SetVariable>
                <SetVariable name="state_1_icon">aux_xfader_center.svg</SetVariable>
                <SetVariable name="state_2_icon">aux_xfader_right.svg</SetVariable>
                <SetVariable name="ConfigKey"><Variable name="group"/>,orientation</SetVariable>
              </Template>
            </Children>
          </WidgetGroup><!-- /Pfl + xFader orientation -->

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

          <WidgetGroup><!-- FX assignment buttons -->
            <ObjectName>Spacer0f</ObjectName>
            <Layout>horizontal</Layout>
            <SizePolicy>min,min</SizePolicy>
            <Children>

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

              <WidgetGroup>
                <Layout>vertical</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <Template src="skin:fx_assign_button.xml">
                    <SetVariable name="Size">26f,16f</SetVariable>
                    <SetVariable name="FxUnit">1</SetVariable>
                  </Template>
                    <WidgetGroup><Size>1min,1f</Size></WidgetGroup>
                  <Template src="skin:fx_assign_button.xml">
                    <SetVariable name="Size">26f,16f</SetVariable>
                    <SetVariable name="FxUnit">3</SetVariable>
                  </Template>
                </Children>
              </WidgetGroup>

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

              <WidgetGroup>
                <Layout>vertical</Layout>
                <SizePolicy>min,min</SizePolicy>
                <Children>
                  <Template src="skin:fx_assign_button.xml">
                    <SetVariable name="Size">26f,16f</SetVariable>
                    <SetVariable name="FxUnit">2</SetVariable>
                  </Template>
                    <WidgetGroup><Size>1min,1f</Size></WidgetGroup>
                  <Template src="skin:fx_assign_button.xml">
                    <SetVariable name="Size">26f,16f</SetVariable>
                    <SetVariable name="FxUnit">4</SetVariable>
                  </Template>
                </Children>
              </WidgetGroup>

            </Children>
          </WidgetGroup><!-- /FX assignment buttons -->

        </Children>
      </WidgetGroup>
    </Children>
    <Connection>
      <ConfigKey><Variable name="group"/>,enabled</ConfigKey>
      <BindProperty>visible</BindProperty>
    </Connection>
  </WidgetGroup>
</Template>
