12class abstract_button_widget;
33 template<
typename Callback>
34 requires(std::is_invocable_v<Callback>) [[nodiscard]] callback_ptr_type
52 return button_state::off;
button_state
The state of a button.
Definition button_state.hpp:13
Definition abstract_button_widget.hpp:23
Definition button_delegate.hpp:14
callback_ptr_type subscribe(abstract_button_widget &sender, Callback &&callback) noexcept
Subscribe a callback for notifying the widget of a data change.
Definition button_delegate.hpp:35
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:50
virtual void unsubscribe(abstract_button_widget &sender, callback_ptr_type const &callback) noexcept
Unsubscribe a callback.
Definition button_delegate.hpp:42
virtual callback_ptr_type subscribe(abstract_button_widget &sender, callback_ptr_type const &callback) noexcept
Subscribe a callback for notifying the widget of a data change.
Definition button_delegate.hpp:26
virtual void activate(abstract_button_widget &sender) noexcept
Called when the button is pressed by the user.
Definition button_delegate.hpp:46