Class ValueDisplay
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Shows a value as text (the parameter's display string with units). Double-click or Enter to type a new value,
optional vertical drag, arrow keys and wheel to step it. VSTGUI CParamDisplay / iPlug2 ICaptionControl.
public class ValueDisplay : ValueControl
- Inheritance
-
ValueDisplay
- Derived
- Inherited Members
Constructors
ValueDisplay()
Creates a value display.
public ValueDisplay()
Properties
AllowDrag
Allows changing the value by dragging vertically.
public bool AllowDrag { get; set; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
IsEditable
Allows typing a value (double-click or Enter).
public bool IsEditable { get; set; }
Property Value
IsTextEditing
true while the in-place editor is open.
[Browsable(false)]
public bool IsTextEditing { get; }
Property Value
Parser
Parses typed text into a normalized value for unbound controls (bound controls use TryParse(string, out double)). Default: a percentage (0–100).
[Browsable(false)]
public Func<string, double?>? Parser { get; set; }
Property Value
ShowFrame
Draws the background box and frame.
public bool ShowFrame { get; set; }
Property Value
TextStyle
Text style of the value (null = style's value text at normal size).
public TextStyle? TextStyle { get; set; }
Property Value
Methods
BeginValueEdit()
Opens the in-place text editor over the value.
public void BeginValueEdit()
EffectiveValueTextStyle(VectorStyle)
Text style in effect for the value.
protected TextStyle EffectiveValueTextStyle(VectorStyle style)
Parameters
styleVectorStyle
Returns
LayoutParts(VectorStyle, out Rect, out Rect, out Rect)
Label on top, the rest is the value box (no separate value strip).
protected override void LayoutParts(VectorStyle style, out Rect label, out Rect widget, out Rect value)
Parameters
styleVectorStylelabelRectwidgetRectvalueRect
OnCaptureLost()
The mouse capture was lost without a button release.
protected override void OnCaptureLost()
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
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
StartDrag(float)
Prepares a vertical drag (the gesture starts on the first movement).
protected void StartDrag(float y)
Parameters
yfloat
TryParseValue(string, out double)
Parses typed text into a normalized value.
protected virtual bool TryParseValue(string text, out double normalized)
Parameters
Returns
ValueArea(Rect)
Area of the value text inside the widget.
protected virtual Rect ValueArea(Rect widget)
Parameters
widgetRect