morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::Button Struct Reference

A push button. More...

#include <view.hpp>

Public Attributes

Prop< std::string > label
 The caption.
ButtonEmphasis emphasis = ButtonEmphasis::Normal
 How much it stands out; set once.
Action onClick
 Called on activation.
Common common {}
 Visibility, enablement, layout, drag-and-drop.
std::string icon
 The name of an icon in the theme's icon set, drawn beside the caption; empty shows none. Set once.
ButtonStyle style = ButtonStyle::Push
 A push button or a list entry; set once.
Prop< bool > selected = false
 Whether a list entry is the current one. Only an Item takes it: the mount refuses a bound or true value on a push button.

Detailed Description

A push button.

Definition at line 418 of file view.hpp.

Member Data Documentation

◆ label

Prop<std::string> morph::ui::Button::label

The caption.

Definition at line 420 of file view.hpp.

◆ emphasis

ButtonEmphasis morph::ui::Button::emphasis = ButtonEmphasis::Normal

How much it stands out; set once.

Definition at line 422 of file view.hpp.

◆ onClick

Action morph::ui::Button::onClick

Called on activation.

Definition at line 424 of file view.hpp.

◆ common

Common morph::ui::Button::common {}

Visibility, enablement, layout, drag-and-drop.

Definition at line 426 of file view.hpp.

◆ icon

std::string morph::ui::Button::icon

The name of an icon in the theme's icon set, drawn beside the caption; empty shows none. Set once.

Definition at line 428 of file view.hpp.

◆ style

ButtonStyle morph::ui::Button::style = ButtonStyle::Push

A push button or a list entry; set once.

Definition at line 430 of file view.hpp.

◆ selected

Prop<bool> morph::ui::Button::selected = false

Whether a list entry is the current one. Only an Item takes it: the mount refuses a bound or true value on a push button.

Definition at line 433 of file view.hpp.


The documentation for this struct was generated from the following file: