Class Led
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Indicator LED with a lens highlight and a glow proportional to its brightness. Drive it with
IsOn, Brightness, or a BrightnessSource polled every frame
(signal present, clip, MIDI activity...). iPlug2 ILEDControl.
public class Led : Control
- Inheritance
-
Led
- Inherited Members
Constructors
Led()
Creates an LED.
public Led()
Properties
Brightness
Brightness 0..1.
public float Brightness { get; set; }
Property Value
BrightnessSource
Polled every frame while attached (audio-thread safe values only, e.g. a volatile field).
[Browsable(false)]
public Func<float>? BrightnessSource { get; set; }
Property Value
Color
LED color (null = theme accent).
public Color? Color { get; set; }
Property Value
DecayPerSecond
Decay of the brightness in units per second when the source drops (0 = follow instantly).
public float DecayPerSecond { get; set; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
Glow
Draws a halo around a lit LED.
public bool Glow { get; set; }
Property Value
IsOn
On/off state (sets Brightness to 1 or 0).
public bool IsOn { get; set; }
Property Value
Shape
Shape.
public LedShape Shape { get; set; }
Property Value
Methods
OnAttached()
Called when the element joins a host (subscribe to external events here).
protected override void OnAttached()
OnDetached()
Called when the element leaves its host (unsubscribe here).
protected override void OnDetached()
RenderVector(DrawingContext, Rect, VectorStyle)
Vector rendering of the widget area.
protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)
Parameters
dcDrawingContextwidgetRectstyleVectorStyle