Table of Contents

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

Size

IsBipolar

Draws the value as a bar from the center (bipolar) instead of from the bottom.

public bool IsBipolar { get; set; }

Property Value

bool

ReturnTime

Duration of the return animation in seconds (0 = instant).

public float ReturnTime { get; set; }

Property Value

float

RidgeCount

Number of ridges visible on the cylinder.

public int RidgeCount { get; set; }

Property Value

int

ShowCenterMark

Draws the center detent mark (bipolar wheels).

public bool ShowCenterMark { get; set; }

Property Value

bool

SpringReturn

Returns to the default value when released (pitch bend behavior).

public bool SpringReturn { get; set; }

Property Value

bool

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

e MouseEventArgs

OnMouseMove(MouseEventArgs)

Mouse moved over the element (or captured).

protected override void OnMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseUp(MouseEventArgs)

Mouse button released.

protected override void OnMouseUp(MouseEventArgs e)

Parameters

e MouseEventArgs

RenderVector(DrawingContext, Rect, VectorStyle)

Vector rendering of the widget area.

protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)

Parameters

dc DrawingContext
widget Rect
style VectorStyle