Button Class
Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI
Clickable push button with text, color, and font-size properties.
class Button : public Widget {};
Constructors
Button(Widget parent)
Button(const Widget& parent);
Create a button inside parent.
| Parameter | Type | Description |
|---|---|---|
parent | Widget | Containing widget. |
Properties
BackgroundColor
uint32_t BackgroundColor() const;
void BackgroundColor(uint32_t value);
Button background color as 0x00RRGGBB. Getter returns the last value set.
Returns uint
FontSize
int32_t FontSize() const;
void FontSize(int32_t value);
Caption font size in pixels. Getter returns the last value set.
Returns int
Text
std::string Text() const;
void Text(std::string value);
Button caption. null is treated as empty. Getter returns the last value set.
Returns string
TextColor
uint32_t TextColor() const;
void TextColor(uint32_t value);
Caption color as 0x00RRGGBB. Getter returns the last value set.
Returns uint
Events
Clicked
Core::Event<...> Clicked;
Fires when the button is clicked (press-and-release inside its bounds). Runs on the UI thread.