Class CheckBox
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Check box with a caption on the right. Clicking the box or the caption toggles the value.
public class CheckBox : ValueControl
- Inheritance
-
CheckBox
- Inherited Members
Constructors
CheckBox()
Creates a check box.
public CheckBox()
CheckBox(string, bool)
Creates a check box with a caption.
public CheckBox(string text, bool isChecked = false)
Parameters
Properties
BoxSize
Box size in DIPs.
public float BoxSize { get; set; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
IsChecked
true when checked.
public bool IsChecked { get; set; }
Property Value
Text
Caption (null = Label or the parameter name).
public string? Text { get; set; }
Property Value
ValueText
Text drawn in the value area (null = no value area).
public override string? ValueText { get; }
Property Value
Methods
LayoutParts(VectorStyle, out Rect, out Rect, out Rect)
Splits the bounds into label (top), widget and value (bottom) areas according to the style. Override to change the arrangement (e.g. label on the left for sliders).
protected override void LayoutParts(VectorStyle style, out Rect label, out Rect widget, out Rect value)
Parameters
styleVectorStylelabelRectwidgetRectvalueRect
OnAttached()
Called when the element joins a host (subscribe to external events here).
protected override void OnAttached()
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
OnMouseUp(MouseEventArgs)
Mouse button released.
protected override void OnMouseUp(MouseEventArgs e)
Parameters
OnRenderOverlay(DrawingContext)
Draws the keyboard focus ring.
protected override void OnRenderOverlay(DrawingContext dc)
Parameters
Remarks
Adds the modulation drop highlight and the MIDI learn outline.
OnValueChanged()
Called after every value change; raises ValueChanged and repaints.
protected override void OnValueChanged()
RenderVector(DrawingContext, Rect, VectorStyle)
Vector rendering of the widget area.
protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)
Parameters
dcDrawingContextwidgetRectstyleVectorStyle