Class WheelControl
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Vertical performance wheel, as on the left of a keyboard: a ridged cylinder turned by dragging. Base class of
PitchWheel (springs back to the center) and ModWheel (stays where it is left).
iPlug2 IWheelControl.
public class WheelControl : ValueControl
- Inheritance
-
WheelControl
- Derived
- Inherited Members
Remarks
Bind it to the parameter that the plugin maps to pitch bend or modulation (in VST3, pitch bend and CCs reach
the processor as parameters through IMidiMapping). Dragging is relative and vertical (Shift = fine); the
mouse wheel also turns it.
With SpringReturn, releasing the mouse animates the value back to DefaultValue in ReturnTime seconds inside the same edit gesture, so the host records the return in the automation.
Constructors
WheelControl()
Creates a wheel.
public WheelControl()
Properties
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
IsBipolar
Draws the value as a bar from the center (bipolar) instead of from the bottom.
public bool IsBipolar { get; set; }
Property Value
ReturnTime
Duration of the return animation in seconds (0 = instant).
public float ReturnTime { get; set; }
Property Value
RidgeCount
Number of ridges visible on the cylinder.
public int RidgeCount { get; set; }
Property Value
ShowCenterMark
Draws the center detent mark (bipolar wheels).
public bool ShowCenterMark { get; set; }
Property Value
SpringReturn
Returns to the default value when released (pitch bend behavior).
public bool SpringReturn { get; set; }
Property Value
Methods
FinishReturn()
Completes a running return animation immediately (tests, offscreen hosts).
public void FinishReturn()
OnCaptureLost()
The mouse capture was lost without a button release.
protected override void OnCaptureLost()
OnDetached()
Called when the element leaves its host (unsubscribe here).
protected override void OnDetached()
OnMouseDown(MouseEventArgs)
Mouse button pressed over the element (or captured).
protected override void OnMouseDown(MouseEventArgs e)
Parameters
OnMouseMove(MouseEventArgs)
Mouse moved over the element (or captured).
protected override void OnMouseMove(MouseEventArgs e)
Parameters
OnMouseUp(MouseEventArgs)
Mouse button released.
protected override void OnMouseUp(MouseEventArgs e)
Parameters
RenderVector(DrawingContext, Rect, VectorStyle)
Vector rendering of the widget area.
protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)
Parameters
dcDrawingContextwidgetRectstyleVectorStyle