11namespace hi::inline v1 {
12class abstract_button_widget;
26 return _notifier.subscribe(flags,
hi_forward(callback));
33 return subscribe(sender, callback_flags::synchronous,
hi_forward(callback));
44 return button_state::off;
#define hi_forward(x)
Forward a value, based on the decltype of the value.
Definition required.hpp:29
button_state
The state of a button.
Definition button_state.hpp:13
A notifier which can be used to call a set of registered callbacks.
Definition notifier.hpp:24
Definition abstract_button_widget.hpp:23
Definition button_delegate.hpp:14
virtual button_state state(abstract_button_widget const &sender) const noexcept
Used by the widget to check the state of the button.
Definition button_delegate.hpp:42
virtual void activate(abstract_button_widget &sender) noexcept
Called when the button is pressed by the user.
Definition button_delegate.hpp:38
auto subscribe(abstract_button_widget &sender, std::invocable<> auto &&callback) noexcept
Subscribe a callback for notifying the widget of a data change.
Definition button_delegate.hpp:31
auto subscribe(abstract_button_widget &sender, callback_flags flags, std::invocable<> auto &&callback) noexcept
Subscribe a callback for notifying the widget of a data change.
Definition button_delegate.hpp:24