Skip to main content

Switch Class

Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI

Binary on/off toggle. ValueChanged fires on each flip.

class Switch : public Widget {};

Constructors​

Switch(Widget parent)​

Switch(const Widget& parent);

Create a switch inside parent.

ParameterTypeDescription
parentWidgetContaining widget.

Properties​

IsChecked​

bool IsChecked() const;
void IsChecked(bool value);

On/off state. Read-back is supported by LVGL.

Returns bool

Events​

ValueChanged​

Core::Event<...> ValueChanged;

Fires on every flip of Switch.IsChecked from user interaction. Runs on the UI thread.