10#include "../label.hpp"
13class text_field_widget;
30 template<
typename Callback>
37 virtual void unsubscribe(
text_field_widget &sender, callback_ptr_type
const &callback_ptr)
noexcept
Definition text_field_delegate.hpp:15
callback_ptr_type subscribe(text_field_widget &sender, Callback &&callback) noexcept
Subscribe a callback for notifying the widget of a data change.
Definition text_field_delegate.hpp:32
virtual std::optional< label > validate(text_field_widget &sender, std::string_view text) noexcept
Validate the text field.
Definition text_field_delegate.hpp:45
virtual std::string text(text_field_widget &sender) noexcept
Get the text to show in the text field.
Definition text_field_delegate.hpp:56
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:70
A single line text field.
Definition text_field_widget.hpp:55