<!--
Description:
	The mixerbar, containing collapsible sections for
	* Master
	* Headphones (if enabled)
	* Microphones (if enabled)
	* Auxiliary (if enabled)
	Mixerbar is alsways at bottom edge of screen.
	It is centered if Library is hidden.
	With Library visible, it can either show up below tracks table to save
	space for treeview on the left, or full-width below Library if many
	Mics/AUX are enabled.
-->
<Template>
  <WidgetGroup><!-- Headphone Mixer -->
    <Layout>stacked</Layout>
    <SizePolicy>max,max</SizePolicy>
    <Children>
      <!-- index 0 due to bug -->
      <WidgetGroup><Size>0f,0f</Size></WidgetGroup>

      <!-- Headphone controls greyed out if no headphone device configured -->
      <WidgetGroup>
        <ObjectName>GuiCover</ObjectName>
        <Layout>vertical</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>
          <Label>
            <ObjectName>UnconfiguredHeadphoneText</ObjectName>
            <SizePolicy>min,min</SizePolicy>
            <Text>No Headphone</Text>
          </Label>
          <Label>
            <ObjectName>UnconfiguredHeadphoneText</ObjectName>
            <SizePolicy>min,min</SizePolicy>
            <Text>device configured!</Text>
          </Label>
        </Children>
        <Connection>
          <ConfigKey>[Master],headEnabled</ConfigKey>
          <BindProperty>visible</BindProperty>
          <Transform><Not/></Transform>
        </Connection>
      </WidgetGroup>

      <!-- actual headphone controls -->
      <WidgetGroup>
        <ObjectName>MixerbarSection</ObjectName>
        <Size>-1min,28f</Size>
        <Layout>horizontal</Layout>
        <Children>

          <WidgetGroup>
            <ObjectName>HeadphoneMixerLabel</ObjectName>
            <Size>28f,24f</Size>
          </WidgetGroup>

          <Template src="skin:knob_textless.xml">
            <SetVariable name="TooltipId">headphone_gain</SetVariable>
            <SetVariable name="ObjectName">MixerbarKnob</SetVariable>
            <SetVariable name="Size">28f,28f</SetVariable>
            <SetVariable name="group">[Master]</SetVariable>
            <SetVariable name="ConfigKey">headGain</SetVariable>
            <SetVariable name="Color">yellow</SetVariable>
          </Template>

          <SliderComposed>
            <TooltipId>headMix</TooltipId>
            <Size>60f,24f</Size>
            <ObjectName>MixerbarSlider</ObjectName>
            <Handle scalemode="STRETCH_ASPECT">knobs_sliders/headMix_handle.svg</Handle>
            <Slider scalemode="STRETCH_ASPECT">knobs_sliders/headMix_scale.svg</Slider>
            <Horizontal>true</Horizontal>
            <Connection>
              <ConfigKey>[Master],headMix</ConfigKey>
            </Connection>
          </SliderComposed>

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

          <Template src="skin:button_2state.xml">
            <SetVariable name="TooltipId">headSplit</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">32f,24f</SetVariable>
            <SetVariable name="state_0_icon">headSplit_off.svg</SetVariable>
            <SetVariable name="state_1_icon">headSplit_on.svg</SetVariable>
            <SetVariable name="ConfigKey">[Master],headSplit</SetVariable>
          </Template>

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

        </Children>
      </WidgetGroup><!-- /actual headphone controls -->
    </Children>
    <Connection>
      <ConfigKey>[Tango],master_mixer</ConfigKey>
      <BindProperty>visible</BindProperty>
    </Connection>
  </WidgetGroup><!-- /Headphone Mixer -->
</Template>
