Class XYPad
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Two-dimensional pad editing X and Y at once (filter cutoff/resonance, vector mixing, panning). Click jumps the handle, drag moves it (Shift = fine, relative), double-click resets both axes. Each axis can be bound to a parameter; both gestures run together.
public class XYPad : Control
- Inheritance
-
XYPad
- Inherited Members
Constructors
XYPad()
Creates a pad centered at (0.5, 0.5).
public XYPad()
Properties
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
DefaultX
Default X (reset).
public double DefaultX { get; set; }
Property Value
DefaultY
Default Y (reset).
public double DefaultY { get; set; }
Property Value
FineFactor
Sensitivity multiplier while Shift is held.
public float FineFactor { get; set; }
Property Value
GridDivisions
Grid divisions per axis (0 = no grid).
public int GridDivisions { get; set; }
Property Value
HandleRadius
Handle radius in DIPs.
public float HandleRadius { get; set; }
Property Value
ShowCrosshair
Draws crosshair lines through the handle.
public bool ShowCrosshair { get; set; }
Property Value
ValueText
Text drawn in the value area (null = no value area).
public override string? ValueText { get; }
Property Value
X
Horizontal value (normalized, 0 = left).
public double X { get; set; }
Property Value
XFormatter
Formatter of the X axis value.
[Browsable(false)]
public Func<double, string>? XFormatter { get; set; }
Property Value
XParameter
Parameter bound to X.
public IParameter? XParameter { get; set; }
Property Value
Y
Vertical value (normalized, 0 = bottom).
public double Y { get; set; }
Property Value
YFormatter
Formatter of the Y axis value.
[Browsable(false)]
public Func<double, string>? YFormatter { get; set; }
Property Value
YParameter
Parameter bound to Y.
public IParameter? YParameter { get; set; }
Property Value
Methods
HandlePosition(Rect)
Handle center for the current values inside a widget rectangle.
public Point HandlePosition(Rect widget)
Parameters
widgetRect
Returns
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
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
PositionChanged
Raised when X or Y changes.
public event Action<XYPad, double, double>? PositionChanged