<!DOCTYPE template>
<!--
  Description:
    An effect parameter knob.
  Variables:
    EffectRack: the rack
    EffectUnit: the unit
    Effect: the effect
    EffectParameter: the parameter
-->
<Template>
  <SetVariable name="FxUnitGroup">[EffectRack1_EffectUnit<Variable name="FxUnit"/>]</SetVariable>
  <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>skins:LateNight/<Variable name="KnobScheme"/>/knobs/knob_indicator_fx_<Variable name="KnobColorFxParameter"/>.svg</Knob>
            <BackPath>skins:LateNight/<Variable name="KnobScheme"/>/knobs/knob_bg_fx.svg</BackPath>
            <MinAngle><Variable name="PotiMinAngle"/></MinAngle>
            <MaxAngle><Variable name="PotiMaxAngle"/></MaxAngle>
            <EffectUnitGroup><Variable name="FxUnitGroup"/></EffectUnitGroup>
            <Effect><Variable name="FxNum"/></Effect>
            <EffectParameter><Variable name="FxParameter"/></EffectParameter>
            <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>

      <EffectParameterName>
        <ObjectName>FxKnobLabel</ObjectName>
        <SizePolicy>me,f</SizePolicy>
        <MinimumSize>40,10</MinimumSize>
        <MaximumSize>60,10</MaximumSize>
        <EffectRack>1</EffectRack>
        <EffectUnit><Variable name="FxUnit"/></EffectUnit>
        <Effect><Variable name="FxNum"/></Effect>
        <EffectParameter><Variable name="FxParameter"/></EffectParameter>
        <Elide>right</Elide>
      </EffectParameterName>

      <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="skins:LateNight/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="skins:LateNight/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>
