|
HikoGUI
A low latency retained GUI
|
#include <hikogui/widgets/default_button_delegate.hpp>
Public Types | |
| using | value_type = T |
Public Member Functions | |
| default_button_delegate (auto &&value, auto &&on_value, auto &&off_value) noexcept | |
| Construct a delegate. | |
| default_button_delegate (auto &&value, auto &&on_value) noexcept | |
| Construct a delegate. | |
| default_button_delegate (auto &&value) noexcept | |
| Construct a delegate. | |
Public Member Functions inherited from v1::button_delegate | |
| virtual void | init (abstract_button_widget &sender) noexcept |
| virtual void | deinit (abstract_button_widget &sender) noexcept |
| auto | subscribe (abstract_button_widget &sender, std::invocable<> auto &&callback) noexcept |
| Subscribe a callback for notifying the widget of a data change. | |
Data Fields | |
| observable< value_type > | value |
| observable< value_type > | on_value |
| observable< value_type > | off_value |
Static Public Attributes | |
| static constexpr button_type | button_type = ButtonType |
| static constexpr bool | can_make_defaults |
A default button delegate.
The default button delegate manages the state of a button widget using observable values.
| ButtonType | The type of button this delegate manages, either a button_type::radio or button_type::toggle. |
| T | The type of the observable value. |
|
inlinenoexcept |
Construct a delegate.
| value | A value or observable-value used as a representation of the state. |
| on_value | The value or observable-value that mean 'on'. |
| off_value | The value or observable-value that mean 'off'. |
|
inlinenoexcept |
Construct a delegate.
| value | A value or observable-value used as a representation of the state. |
| on_value | The value or observable-value that mean 'on'. |
|
inlinenoexcept |
Construct a delegate.
| value | A value or observable-value used as a representation of the state. |
|
staticconstexpr |