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

      <Template src="skin:/controls/button_2state.xml">
        <SetVariable name="TooltipId">maximize_library</SetVariable>
        <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
        <SetVariable name="Size">80f,20f</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>
        <ObjectName>ToolbarSeparator</ObjectName>
        <Size>12f,9min</Size>
      </WidgetGroup>

      <WidgetGroup><!-- GUI toggles with regular library -->
        <ObjectName>ToolBarSection</ObjectName>
        <SizePolicy>min,min</SizePolicy>
        <Layout>horizontal</Layout>
        <Children>

          <Template src="skin:/controls/button_2state.xml">
            <SetVariable name="TooltipId">show_waveforms</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">80f,20f</SetVariable>
            <SetVariable name="state_0_text">WAVEFORMS</SetVariable>
            <SetVariable name="state_1_text">WAVEFORMS</SetVariable>
            <SetVariable name="ConfigKey">[Skin],show_waveforms</SetVariable>
          </Template>

          <Template src="skin:/controls/button_2state_persist.xml">
            <SetVariable name="TooltipId">toggle_4decks</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">52f,20f</SetVariable>
            <SetVariable name="state_0_text">4 DECKS</SetVariable>
            <SetVariable name="state_1_text">4 DECKS</SetVariable>
            <SetVariable name="ConfigKey">[Skin],show_4decks</SetVariable>
          </Template>

          <Template src="skin:/controls/button_2state_persist.xml">
            <SetVariable name="TooltipId">show_mixer</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">48f,20f</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:/controls/button_2state_persist.xml">
            <SetVariable name="TooltipId">show_effects</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">59f,20f</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:/controls/button_2state_persist.xml">
            <SetVariable name="TooltipId">show_samplers</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">71f,20f</SetVariable>
            <SetVariable name="state_0_text">SAMPLERS</SetVariable>
            <SetVariable name="state_1_text">SAMPLERS</SetVariable>
            <SetVariable name="ConfigKey">[Samplers],show_samplers</SetVariable>
          </Template>

          <Template src="skin:/controls/button_2state_persist.xml">
            <SetVariable name="TooltipId">show_microphone</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">61f,20f</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>

        </Children>
        <Connection>
          <ConfigKey>[Master],maximize_library</ConfigKey>
          <Transform><Not/></Transform>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup><!-- GUI toggles with regular library -->

      <WidgetGroup><!-- GUI toggles with maximized library -->
        <ObjectName>ToolBarSection</ObjectName>
        <SizePolicy>min,min</SizePolicy>
        <Layout>horizontal</Layout>
        <Children>

          <Template src="skin:/controls/button_2state.xml">
            <SetVariable name="TooltipId">show_waveforms</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">80f,20f</SetVariable>
            <SetVariable name="state_0_text">DECKS</SetVariable>
            <SetVariable name="state_1_text">DECKS</SetVariable>
            <SetVariable name="ConfigKey">[LateNight],max_lib_show_decks</SetVariable>
          </Template>

          <Template src="skin:/controls/button_2state_persist.xml">
            <SetVariable name="TooltipId">toggle_4decks</SetVariable>
            <SetVariable name="ObjectName">GuiToggleButton</SetVariable>
            <SetVariable name="Size">52f,20f</SetVariable>
            <SetVariable name="state_0_text">4 DECKS</SetVariable>
            <SetVariable name="state_1_text">4 DECKS</SetVariable>
            <SetVariable name="ConfigKey">[Skin],show_4decks</SetVariable>
          </Template>

        </Children>
        <Connection>
          <ConfigKey>[Master],maximize_library</ConfigKey>
          <BindProperty>visible</BindProperty>
        </Connection>
      </WidgetGroup><!-- GUI toggles with maximized library -->

      <WidgetGroup><Size>me,min</Size></WidgetGroup>

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

      <StatusLight>
        <TooltipId>autodj_status</TooltipId>
        <ObjectName>AutoDjStatus</ObjectName>
        <Size>30f,22f</Size>
        <NumberPos>3</NumberPos>
        <PathStatusLight1>skin:<Variable name="StyleScheme"/>/style/autodj_status.svg</PathStatusLight1>
        <PathStatusLight2>skin:<Variable name="StyleScheme"/>/style/autodj_status.svg</PathStatusLight2>
        <PathStatusLight3>skin:<Variable name="StyleScheme"/>/style/autodj_status.svg</PathStatusLight3>
        <Connection>
          <ConfigKey>[AutoDJ],enabled</ConfigKey>
        </Connection>
        <Connection>
          <ConfigKey>[AutoDJ],enabled</ConfigKey>
          <BindProperty>visible</BindProperty>
        </Connection>
      </StatusLight>

      <WidgetGroup>
        <ObjectName>ClockWidget</ObjectName>
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>
          <Time>
            <TooltipId>time</TooltipId>
            <CustomFormat>hh:mm</CustomFormat>
          </Time>
        </Children>
      </WidgetGroup>

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

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

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

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

          <WidgetGroup>
            <ObjectName></ObjectName>
            <Layout>vertical</Layout>
            <Children>
              <WidgetGroup><Size>,0min</Size></WidgetGroup>
              <WidgetGroup>
                <ObjectName>LatencyMeterBox</ObjectName>
                <Size>61f,7f</Size>
                <Layout>vertical</Layout>
                <Children>
                  <VuMeter>
                    <TooltipId>audio_latency_usage</TooltipId>
                    <Size>59f,5f</Size>
                    <PathBack>skin:/<Variable name="StyleScheme"/>/style/latency_bg.png</PathBack>
                    <PathVu>skin:/<Variable name="StyleScheme"/>/style/latency_over.png</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>
                </Children>
              </WidgetGroup><!-- LatencyMeterBox -->
              <Label>
                <ObjectName>LatencyLabel</ObjectName>
                <TooltipId>audio_latency_usage</TooltipId>
                <Size>0min,10f</Size>
                <Alignment>center</Alignment>
                <Text>CPU Load</Text>
              </Label>
            </Children>
          </WidgetGroup><!-- LatencyMeterBox -->
        </Children>
      </WidgetGroup><!-- LatencyBatteryContainer -->

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

      <WidgetGroup>
        <ObjectName>BatteryBox</ObjectName>
        <Layout>horizontal</Layout>
        <Children>
          <Battery>
            <ObjectName>Battery</ObjectName>
            <Size>24,24</Size>
            <SizePolicy>f,f</SizePolicy>
            <PixmapCharged scalemode="STRETCH_ASPECT">skin:/<Variable name="StyleScheme"/>/style/batt/ic_battery_charged.svg</PixmapCharged>
            <NumberStates>8</NumberStates>
            <PixmapsCharging scalemode="STRETCH_ASPECT">skin:/<Variable name="StyleScheme"/>/style/batt/ic_battery_charging_%1.svg</PixmapsCharging>
            <PixmapsDischarging scalemode="STRETCH_ASPECT">skin:/<Variable name="StyleScheme"/>/style/batt/ic_battery_discharging_%1.svg</PixmapsDischarging>
          </Battery>
        </Children>
      </WidgetGroup><!-- BatteryBox -->

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

      <WidgetGroup><!-- Recording button & recording duration label -->
        <ObjectName>RecBox</ObjectName>
        <Layout>stacked</Layout>
        <Size>72f,20f</Size>
        <!-- minus 1px border
            = 70x18 available for text -->
        <Children>
          <!-- invisible Rec button -->
          <Template src="skin:/controls/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,20f</Size>
            <Children>
              <Label>
                <ObjectName>RecDot</ObjectName>
                <Size>15f,20f</Size>
                <Connection>
                  <ConfigKey>[Recording],status</ConfigKey>
                  <BindProperty>highlight</BindProperty>
                </Connection>
              </Label>

              <RecordingDuration>
                <ObjectName>RecDuration</ObjectName>
                <Size>53f,20f</Size>
                <InactiveText>REC</InactiveText>
                <Alignment>center</Alignment>
                <Connection>
                  <ConfigKey>[Recording],status</ConfigKey>
                  <BindProperty>highlight</BindProperty>
                </Connection>
              </RecordingDuration>
            </Children>
          </WidgetGroup><!-- /Rec dot + RecDuration -->

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

      <PushButton>
        <Size>72f,20f</Size>
        <TooltipId>broadcast_enabled</TooltipId>
        <ObjectName>BroadcastButton</ObjectName>
        <NumberStates>4</NumberStates>
        <State>
          <Number>0</Number>
          <Text>      ON AIR</Text>
        </State>
        <State>
          <Number>1</Number>
          <Text>       ...</Text>
        </State>
        <State>
          <Number>2</Number>
          <Text>      ON AIR</Text>
        </State>
        <State>
          <Number>3</Number>
          <Text>       ---</Text>
        </State>
        <Connection>
          <ConfigKey>[Shoutcast],enabled</ConfigKey>
          <ButtonState>LeftButton</ButtonState>
        </Connection>
        <Connection>
          <ConfigKey>[Shoutcast],status</ConfigKey>
        </Connection>
      </PushButton>

      <WidgetGroup>
        <ObjectName>ToolbarSeparator</ObjectName>
        <Size>12f,9min</Size>
      </WidgetGroup>

      <PushButton>
        <Size>80f,20f</Size>
        <TooltipId>skin_settings</TooltipId>
        <ObjectName>SkinSettingsToggle</ObjectName>
        <NumberStates>2</NumberStates>
        <State>
          <Number>0</Number>
          <Text>      SETTINGS</Text>
        </State>
        <State>
          <Number>1</Number>
          <Text>      SETTINGS</Text>
        </State>
        <Connection>
          <ConfigKey>[Master],skin_settings</ConfigKey>
        </Connection>
      </PushButton>

    </Children>
    <Connection>
      <ConfigKey>[Skin],show_waveforms</ConfigKey>
      <BindProperty>highlight</BindProperty>
    </Connection>
  </WidgetGroup>
</Template>
