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>
32 [[nodiscard]] callback_type
subscribe(Func&& func, callback_flags flags = callback_flags::synchronous)
noexcept
The HikoGUI namespace.
Definition recursive_iterator.hpp:15
The HikoGUI API version 1.
Definition recursive_iterator.hpp:16
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