Class MultiToggle
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Row or grid of on/off cells, each bound to its own parameter (or to a local state array): step-sequencer gate rows, channel enables, harmonic switches. Press a cell to flip it and drag across the others to paint the same state. PlayPosition highlights the current step.
public class MultiToggle : Control
- Inheritance
-
MultiToggle
- Inherited Members
Constructors
MultiToggle(IReadOnlyList<IParameter>)
Creates a multi-toggle bound to parameters (one cell per parameter).
public MultiToggle(IReadOnlyList<IParameter> parameters)
Parameters
parametersIReadOnlyList<IParameter>
MultiToggle(int)
Creates a multi-toggle with count local cells.
public MultiToggle(int count = 16)
Parameters
countint
Properties
CellSpacing
Space between cells in DIPs.
public float CellSpacing { get; set; }
Property Value
Columns
Columns per row (0 = single row).
public int Columns { get; set; }
Property Value
Count
Number of cells.
public int Count { get; set; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
GroupSize
Highlights every n-th column more strongly (beats in a 16-step row). 0 = off.
public int GroupSize { get; set; }
Property Value
this[int]
State of a cell.
public bool this[int index] { get; set; }
Parameters
indexint
Property Value
Parameters
Bound parameters (null = local states).
[Browsable(false)]
public IReadOnlyList<IParameter>? Parameters { get; set; }
Property Value
PlayPosition
Index of the playing step (−1 = none).
public int PlayPosition { get; set; }
Property Value
Methods
OnAttached()
Called when the element joins a host (subscribe to external events here).
protected override void OnAttached()
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()
OnKeyDown(KeyEventArgs)
Key pressed while focused (bubbles to parents).
protected override void OnKeyDown(KeyEventArgs e)
Parameters
OnMouseDown(MouseEventArgs)
Mouse button pressed over the element (or captured).
protected override void OnMouseDown(MouseEventArgs e)
Parameters
OnMouseLeave()
The mouse left the element.
protected override void OnMouseLeave()
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
Events
CellChanged
Raised when the user changes a cell.
public event Action<MultiToggle, int, bool>? CellChanged
Event Type
- Action<MultiToggle, int, bool>