<!DOCTYPE template>
<!--
  Description:
    An effect unit widget.
  Variables:
    group: The group for the controls.
    FxRack
    FxUnit
-->
<Template>
  <SetVariable name="FxRack_FxUnit">EffectRack<Variable name="FxRack"/>_EffectUnit<Variable name="FxUnit"/></SetVariable>

  <WidgetGroup>
    <ObjectName>EffectUnit<Variable name="FxUnit"/></ObjectName>
    <Layout>vertical</Layout>
    <Size>635me,170min</Size>
    <Children>

      <WidgetGroup><!-- Fx Parameters -->
        <SizePolicy>me,me</SizePolicy>
        <Layout>horizontal</Layout>
        <Children>
          <WidgetGroup>
            <ObjectName>EffectRows</ObjectName>
            <SizePolicy>me,me</SizePolicy>
            <Layout>vertical</Layout>
            <BackPath>style/background_tile.png</BackPath>
            <Children>
              <Template src="skin:fx_slot.xml">
                <SetVariable name="FxNum">1</SetVariable>
              </Template>

              <WidgetGroup><ObjectName>Spacer58</ObjectName><Size>1me,1f</Size></WidgetGroup>

              <Template src="skin:fx_slot.xml">
                <SetVariable name="FxNum">2</SetVariable>
              </Template>

              <WidgetGroup><ObjectName>Spacer58</ObjectName><Size>1me,1f</Size></WidgetGroup>

              <Template src="skin:fx_slot.xml">
                <SetVariable name="FxNum">3</SetVariable>
              </Template>
            </Children>
          </WidgetGroup>

          <WidgetGroup><!-- Expand/Collapse + Mix/Super + Pfl -->
            <ObjectName>EffectUnitControls</ObjectName>
            <Layout>vertical</Layout>
            <SizePolicy>max,min</SizePolicy>
            <Children>

              <SingletonContainer>
                <ObjectName>FxUnit<Variable name="FxUnit"/>_ExpandCollapseButton</ObjectName>
              </SingletonContainer>

              <SingletonContainer>
                <ObjectName>FxUnit<Variable name="FxUnit"/>_MixModeButton</ObjectName>
              </SingletonContainer>

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

              <SingletonContainer>
                <ObjectName>FxUnit<Variable name="FxUnit"/>_DryWetKnob</ObjectName>
              </SingletonContainer>

              <WidgetGroup><!-- Super knob, optional -->
                <Layout>vertical</Layout>
                <SizePolicy>min,me</SizePolicy>
                <Children>
                  <WidgetGroup><Size>,1f</Size></WidgetGroup>
                  <SingletonContainer>
                    <ObjectName>FxUnit<Variable name="FxUnit"/>_SuperKnob</ObjectName>
                  </SingletonContainer>
                </Children>
                <Connection>
                  <ConfigKey persist="true">[Master],show_superknobs</ConfigKey>
                  <BindProperty>visible</BindProperty>
                </Connection>
              </WidgetGroup>

              <WidgetGroup>
                <MinimumSize>,2</MinimumSize>
                <MaximumSize>,7</MaximumSize>
                <SizePolicy>min,me</SizePolicy>
              </WidgetGroup>

              <SingletonContainer>
                <ObjectName>FxUnit<Variable name="FxUnit"/>_PflButton</ObjectName>
              </SingletonContainer>

              <WidgetGroup><Size>,0me</Size></WidgetGroup>
            </Children>
          </WidgetGroup><!-- /Expand/Collapse + Mix/Super + Pfl -->
        </Children>
      </WidgetGroup>

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