6#include "../dispatch/dispatch.hpp"
7#include "../utility/utility.hpp"
8#include "../GUI/GUI.hpp"
10namespace hi {
inline namespace v1 {
13 using notifier_type = notifier<
void()>;
14 using callback_type = notifier_type::callback_type;
16 notifier_type _notifier;
31 template<forward_of<
void()> Func>
34 return _notifier.subscribe(std::forward<Func>(
func), flags);
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
The HikoGUI namespace.
Definition recursive_iterator.hpp:15
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:378
Definition widget_intf.hpp:24
Definition widget_delegate.hpp:12
virtual void init(widget_intf const &sender) noexcept
This function is called when a widget takes ownership of a delegate.
Definition widget_delegate.hpp:22
callback_type subscribe(Func &&func, callback_flags flags=callback_flags::synchronous) noexcept
Subscribe a callback for notifying the widget of a data change.
Definition widget_delegate.hpp:32
virtual void deinit(widget_intf const &sender) noexcept
This function is called when a widget drops ownership of a delegate.
Definition widget_delegate.hpp:26