|
template<forward_of< observer< value_type > > Value, forward_of< observer< value_type > > OnValue, forward_of< observer< value_type > > OffValue> |
| default_toggle_delegate (Value &&value, OnValue &&on_value, OffValue &&off_value) noexcept |
| Construct a delegate.
|
|
template<forward_of< observer< value_type > > Value, forward_of< observer< value_type > > OnValue>
requires can_make_defaults |
| default_toggle_delegate (Value &&value, OnValue &&on_value) noexcept |
| Construct a delegate.
|
|
template<forward_of< observer< value_type > > Value>
requires can_make_defaults |
| default_toggle_delegate (Value &&value) noexcept |
| Construct a delegate.
|
|
virtual void | init (widget_intf const &sender) noexcept |
|
virtual void | deinit (widget_intf const &sender) noexcept |
|
template<forward_of< void()> Func> |
callback< void()> | subscribe (Func &&func, callback_flags flags=callback_flags::synchronous) noexcept |
| Subscribe a callback for notifying the widget of a data change.
|
|
template<std::equality_comparable T>
class hi::v1::default_toggle_delegate< T >
A default toggle button delegate.
The default toggle button delegate manages the state of a button widget using observer values.
- Template Parameters
-
T | The type of the observer value. |