Table of Contents

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

bool

DefaultSize

Natural size used when no explicit size is given.

protected override Size DefaultSize { get; }

Property Value

Size

IsEditable

Allows typing a value (double-click or Enter).

public bool IsEditable { get; set; }

Property Value

bool

IsTextEditing

true while the in-place editor is open.

[Browsable(false)]
public bool IsTextEditing { get; }

Property Value

bool

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

Func<string, double?>

ShowFrame

Draws the background box and frame.

public bool ShowFrame { get; set; }

Property Value

bool

TextStyle

Text style of the value (null = style's value text at normal size).

public TextStyle? TextStyle { get; set; }

Property Value

TextStyle

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

style VectorStyle

Returns

TextStyle

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

style VectorStyle
label Rect
widget Rect
value Rect

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

e KeyEventArgs

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

StartDrag(float)

Prepares a vertical drag (the gesture starts on the first movement).

protected void StartDrag(float y)

Parameters

y float

TryParseValue(string, out double)

Parses typed text into a normalized value.

protected virtual bool TryParseValue(string text, out double normalized)

Parameters

text string
normalized double

Returns

bool

ValueArea(Rect)

Area of the value text inside the widget.

protected virtual Rect ValueArea(Rect widget)

Parameters

widget Rect

Returns

Rect