10#include "../label.hpp"
12namespace hi::inline v1 {
13class text_field_widget;
23 auto subscribe(
text_field_widget &sender, std::invocable<>
auto &&callback)
noexcept
25 return _notifier.subscribe(
hi_forward(callback));
#define hi_forward(x)
Forward a value, based on the decltype of the value.
Definition required.hpp:29
A label consisting of localizable text and an icon.
Definition label.hpp:27
A notifier which can be used to call a set of registered callbacks.
Definition notifier.hpp:23
Definition text_field_delegate.hpp:15
virtual std::string text(text_field_widget &sender) noexcept
Get the text to show in the text field.
Definition text_field_delegate.hpp:43
virtual void set_text(text_field_widget &sender, std::string_view text) noexcept
Set the text as entered by the user.
Definition text_field_delegate.hpp:57
virtual label validate(text_field_widget &sender, std::string_view text) noexcept
Validate the text field.
Definition text_field_delegate.hpp:32
A single line text field.
Definition text_field_widget.hpp:55