<!DOCTYPE template>
<!--
  Description:
    An effect parameter knob.
  Variables:
    EffectRack: the rack
    EffectUnit: the unit
    Effect: the effect
    EffectParameter: the parameter
-->
<Template>
  <SetVariable name="FxRack_FxUnit_FxNum"><Variable name="FxRack_FxUnit"/>_Effect<Variable name="FxNum"/></SetVariable>

  <WidgetGroup>
    <ObjectName>FxParameterKnobBox</ObjectName>
    <Layout>vertical</Layout>
    <MinimumSize>40,35</MinimumSize>
    <MaximumSize>60,</MaximumSize>
    <SizePolicy>me,min</SizePolicy>
    <Children>
      <WidgetGroup>
        <ObjectName>FxParameterKnob</ObjectName>
        <Layout>horizontal</Layout>
        <Size>26me,26f</Size>
        <Children>
          <EffectParameterKnobComposed>
            <Size>26f,26f</Size>
            <Knob>skin:/<Variable name="KnobScheme"/>/knobs/knob_indicator_fx_<Variable name="KnobColorFxParameter"/>.svg</Knob>
            <BackPath>skin:/<Variable name="KnobScheme"/>/knobs/knob_bg_fx.svg</BackPath>
            <MinAngle><Variable name="PotiMinAngle"/></MinAngle>
            <MaxAngle><Variable name="PotiMaxAngle"/></MaxAngle>
            <ArcRadius><Variable name="ArcRadius"/></ArcRadius>
            <ArcColor><Variable name="ArcColorFxParameter"/></ArcColor>
            <ArcThickness><Variable name="ArcThickness"/></ArcThickness>
            <ArcRoundCaps><Variable name="ArcRoundCaps"/></ArcRoundCaps>
            <ArcUnipolar>true</ArcUnipolar>
            <Connection>
              <ConfigKey>[<Variable name="FxRack_FxUnit_FxNum"/>],parameter<Variable name="FxParameter"/></ConfigKey>
            </Connection>
          </EffectParameterKnobComposed>
        </Children>
      </WidgetGroup>

      <WidgetGroup>
        <ObjectName>AlignBottom</ObjectName>
        <Layout>horizontal</Layout>
        <SizePolicy>me,f</SizePolicy>
        <MinimumSize>40,10</MinimumSize>
        <MaximumSize>58,10</MaximumSize>
        <Children>
          <WidgetGroup><Size>1me,0min</Size></WidgetGroup>
          <EffectParameterName>
            <ObjectName>FxKnobLabel</ObjectName>
            <EffectRack>1</EffectRack>
            <EffectUnit><Variable name="FxUnit"/></EffectUnit>
            <Effect><Variable name="FxNum"/></Effect>
            <EffectParameter><Variable name="FxParameter"/></EffectParameter>
            <Alignment>center</Alignment>
          </EffectParameterName>
          <WidgetGroup><Size>1me,0min</Size></WidgetGroup>
        </Children>
      </WidgetGroup>

      <WidgetGroup>
        <ObjectName>FxLinkButtons</ObjectName>
        <Layout>horizontal</Layout>
        <SizePolicy>min,min</SizePolicy>
        <Children>
          <WidgetGroup><Size>0min,0min</Size></WidgetGroup>
          <!-- Meta knob link invert button -->
          <Template src="skin:/controls/button_2state.xml">
            <SetVariable name="TooltipId">EffectSlot_parameter_inversion</SetVariable>
            <SetVariable name="ObjectName">FxSuperLinkInvertButton</SetVariable>
            <SetVariable name="Size">8f,7f</SetVariable>
            <SetVariable name="ConfigKey">[<Variable name="FxRack_FxUnit_FxNum"/>],parameter<Variable name="FxParameter"/>_link_inverse</SetVariable>
          </Template>

          <!-- Meta knob link button -->
          <Template src="skin:/controls/button_5state.xml">
            <SetVariable name="TooltipId">EffectSlot_parameter_link_type</SetVariable>
            <SetVariable name="ObjectName">FxSuperLinkButton</SetVariable>
            <SetVariable name="Size">34,7f</SetVariable>
            <SetVariable name="ConfigKey">[<Variable name="FxRack_FxUnit_FxNum"/>],parameter<Variable name="FxParameter"/>_link_type</SetVariable>
          </Template>
          <WidgetGroup><Size>0min,0min</Size></WidgetGroup>
        </Children>
      </WidgetGroup>

    </Children>
    <Connection>
      <ConfigKey>[<Variable name="FxRack_FxUnit_FxNum"/>],parameter<Variable name="FxParameter"/>_loaded</ConfigKey>
      <BindProperty>visible</BindProperty>
    </Connection>
  </WidgetGroup>
</Template>
