Table of Contents

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

float

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

Func<float>

Color

LED color (null = theme accent).

public Color? Color { get; set; }

Property Value

Color?

DecayPerSecond

Decay of the brightness in units per second when the source drops (0 = follow instantly).

public float DecayPerSecond { get; set; }

Property Value

float

DefaultSize

Natural size used when no explicit size is given.

protected override Size DefaultSize { get; }

Property Value

Size

Glow

Draws a halo around a lit LED.

public bool Glow { get; set; }

Property Value

bool

IsOn

On/off state (sets Brightness to 1 or 0).

public bool IsOn { get; set; }

Property Value

bool

Shape

Shape.

public LedShape Shape { get; set; }

Property Value

LedShape

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

dc DrawingContext
widget Rect
style VectorStyle