<Template>
  <WidgetGroup>
    <ObjectName>ToolBar</ObjectName>
    <Layout>horizontal</Layout>
    <SizePolicy>e,min</SizePolicy>
    <Children>

      <Template src="skin:button_2state.xml">
        <SetVariable name="TooltipId">maximize_library</SetVariable>
        <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
        <SetVariable name="Size">84f,24f</SetVariable>
        <SetVariable name="state_0_text">BIG LIBRARY</SetVariable>
        <SetVariable name="state_1_text">BIG LIBRARY</SetVariable>
        <SetVariable name="ConfigKey">[Master],maximize_library</SetVariable>
      </Template>

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

          <WidgetGroup>
            <ObjectName>ToolbarDivider</ObjectName>
            <Size>13f,9min</Size>
          </WidgetGroup>

          <Template src="skin:button_2state_persist.xml">
            <SetVariable name="TooltipId">show_mixer</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">48f,24f</SetVariable>
            <SetVariable name="state_0_text">MIXER</SetVariable>
            <SetVariable name="state_1_text">MIXER</SetVariable>
            <SetVariable name="ConfigKey">[Master],show_mixer</SetVariable>
          </Template>

          <Template src="skin:button_2state_persist.xml">
            <SetVariable name="TooltipId">show_effects</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">59f,24f</SetVariable>
            <SetVariable name="state_0_text">EFFECTS</SetVariable>
            <SetVariable name="state_1_text">EFFECTS</SetVariable>
            <SetVariable name="ConfigKey">[EffectRack1],show</SetVariable>
          </Template>

          <Template src="skin:button_2state_persist.xml">
            <SetVariable name="TooltipId">show_microphone</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">61f,24f</SetVariable>
            <SetVariable name="state_0_text">MIC/AUX</SetVariable>
            <SetVariable name="state_1_text">MIC/AUX</SetVariable>
            <SetVariable name="ConfigKey">[Microphone],show_microphone</SetVariable>
          </Template>

          <Template src="skin:button_2state_persist.xml">
            <SetVariable name="TooltipId">show_samplers</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">71f,24f</SetVariable>
            <SetVariable name="state_0_text">SAMPLERS</SetVariable>
            <SetVariable name="state_1_text">SAMPLERS</SetVariable>
            <SetVariable name="ConfigKey">[Samplers],show_samplers</SetVariable>
          </Template>

        </Children>
        <Connection>
          <ConfigKey>[Master],maximize_library</ConfigKey>
          <Transform><Not/></Transform>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup>

      <!-- Spacer -->
      <WidgetGroup>
        <Layout>horizontal</Layout>
        <Size>me,min</Size>
        <Children/>
      </WidgetGroup>

      <WidgetGroup><!-- Recording button & recording duration label -->
        <ObjectName>RecBox</ObjectName>
        <Layout>stacked</Layout>
        <Size>72f,24f</Size>
        <!-- minus 1px border
            = 70x18 available for text -->
        <Children>
          <!-- invisible Rec button -->
          <Template src="skin:button_2state.xml">
            <SetVariable name="ObjectName">RecButton</SetVariable>
            <SetVariable name="TooltipId">toggle_recording</SetVariable>
            <SetVariable name="Size">68f,20f</SetVariable>
            <SetVariable name="ConfigKey">[Recording],toggle_recording</SetVariable>
          </Template>

          <WidgetGroup><!-- Rec dot + RecDuration -->
            <Layout>horizontal</Layout>
            <Size>68f,18f</Size>
            <Children>
              <Label>
                <ObjectName>RecDot</ObjectName>
                <Size>15f,18f</Size>
              </Label>  

              <RecordingDuration>
                <ObjectName>RecDuration</ObjectName>
                <Size>53f,18f</Size>
                <InactiveText>REC</InactiveText>
                <Alignment>center</Alignment>
              </RecordingDuration>
            </Children>
          </WidgetGroup><!-- /Rec dot + RecDuration -->

          <!-- invisible Rec button -->
          <Template src="skin:button_3state_display.xml">
            <SetVariable name="ObjectName">RecFeedback</SetVariable>
            <SetVariable name="TooltipId">toggle_recording</SetVariable>
            <SetVariable name="Size">65f,18f</SetVariable>
            <SetVariable name="ConfigKey">[Recording],toggle_recording</SetVariable>
            <SetVariable name="ConfigKeyDisp">[Recording],status</SetVariable>
          </Template>
        </Children>
      </WidgetGroup><!-- /Recording button & recording duration label -->

      <PushButton>
        <Size>82f,24f</Size>
        <TooltipId>skin_settings</TooltipId>
        <ObjectName>BroadcastButton</ObjectName>
        <NumberStates>4</NumberStates>
        <State>
          <Number>0</Number>
          <Text>Broadcast</Text>
        </State>
        <State>
          <Number>1</Number>
          <Text>Broadcast</Text>
        </State>
        <State>
          <Number>2</Number>
          <Text>Broadcast</Text>
        </State>
        <State>
          <Number>3</Number>
          <Text>Broadcast</Text>
        </State>
        <Connection>
          <ConfigKey persist="true">[Shoutcast],enabled</ConfigKey>
          <ButtonState>LeftButton</ButtonState>
        </Connection>
        <Connection>
          <ConfigKey persist="true">[Shoutcast],status</ConfigKey>
        </Connection>
      </PushButton>

      <WidgetGroup>
        <ObjectName>ToolbarDivider</ObjectName>
        <Size>13f,9min</Size>
      </WidgetGroup>

      <PushButton>
        <Size>80f,24f</Size>
        <TooltipId>skin_settings</TooltipId>
        <ObjectName>SettingsButton</ObjectName>
        <NumberStates>2</NumberStates>
        <State>
          <Number>0</Number>
          <Text>     SETTINGS</Text>
        </State>
        <State>
          <Number>1</Number>
          <Text>     SETTINGS</Text>
        </State>
        <Connection>
          <ConfigKey persist="true">[Master],skin_settings</ConfigKey>
        </Connection>
      </PushButton>

      <WidgetGroup> <!-- Spacer -->
        <Layout>horizontal</Layout>
        <Size>7f,min</Size>
        <Children/>
      </WidgetGroup>

      <Label>
        <ObjectName>ToolbarLogo</ObjectName>
        <Size>72f,24f</Size>
      </Label>

      <WidgetGroup> <!-- Spacer -->
        <Layout>horizontal</Layout>
        <Size>7f,min</Size>
        <Children/>
      </WidgetGroup>

      <WidgetGroup>
        <ObjectName>ClockWidget</ObjectName>
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>
          <Time>
            <TooltipId>time</TooltipId>
            <ShowSeconds>false</ShowSeconds>
          </Time>
        </Children>
      </WidgetGroup>

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

      <WidgetGroup>
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>
          <Label>
            <ObjectName>LatencyLabel</ObjectName>
            <Text>CPU</Text>
          </Label>

          <VuMeter>
            <TooltipId>audio_latency_usage</TooltipId>
            <ObjectName>LatencyMeter</ObjectName>
            <Size>63f,7f</Size>
            <PathBack>style/latency_bg.svg</PathBack>
            <PathVu>style/latency_over.svg</PathVu>
            <Horizontal>true</Horizontal>
            <PeakHoldSize>5</PeakHoldSize>
            <PeakHoldTime>1000</PeakHoldTime>
            <PeakFallTime>100</PeakFallTime>
            <PeakFallStep>1</PeakFallStep>
            <Connection>
              <ConfigKey>[Master],audio_latency_usage</ConfigKey>
            </Connection>
          </VuMeter>

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

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