12class abstract_button_widget;
31 template<
typename Callback>
32 requires(std::is_invocable_v<Callback>) [[nodiscard]] callback_ptr_type
50 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:33
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:48
virtual void unsubscribe(abstract_button_widget &sender, callback_ptr_type const &callback) noexcept
Unsubscribe a callback.
Definition button_delegate.hpp:40
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:24
virtual void activate(abstract_button_widget &sender) noexcept
Called when the button is pressed by the user.
Definition button_delegate.hpp:44