HikoGUI
Select Version: ⚠️ This documents the main development branch of HikoGUI. It might differ from release versions.
A low latency retained GUI
|
#include <hikogui/widgets/text_field_delegate.hpp>
Public Types | |
using | value_type = T |
using | value_type = T |
![]() | |
using | notifier_type = notifier<void()> |
Public Member Functions | |
template<forward_of< observer< value_type > > Value> | |
default_text_field_delegate (Value &&value) noexcept | |
label | validate (widget_intf const &sender, gstring const &text) noexcept override |
Validate the text field. | |
gstring | text (widget_intf const &sender) noexcept override |
Get the text to show in the text field. | |
void | set_text (widget_intf const &sender, gstring const &text) noexcept override |
Set the text as entered by the user. | |
template<forward_of< observer< value_type > > Value> | |
default_text_field_delegate (Value &&value) noexcept | |
label | validate (widget_intf const &sender, gstring const &text) noexcept override |
Validate the text field. | |
gstring | text (widget_intf const &sender) noexcept override |
Get the text to show in the text field. | |
void | set_text (widget_intf const &sender, gstring const &text) noexcept override |
Set the text as entered by the user. | |
![]() | |
virtual void | init (widget_intf const &sender) noexcept |
virtual void | deinit (widget_intf const &sender) noexcept |
template<forward_of< void()> Func> | |
callback< void()> | subscribe (Func &&func, callback_flags flags=callback_flags::synchronous) noexcept |
Data Fields | |
observer< value_type > | value |
A default text delegate specialization for std::integral<T>
.
A default text delegate specialization for std::floating_point<T>
.
This delegate makes it possible for a text-field to edit an integral value. It will automatically validate and convert between the integral value and the text representation.
T | An integral type |
This delegate makes it possible for a text-field to edit an floating point value. It will automatically validate and convert between the floating point value and the text representation.
T | An floating point type |
|
inlineoverridevirtualnoexcept |
Set the text as entered by the user.
When the user causes a text field to commit, by pressing enter, tab, or clicking outside the field and when the text was validated the widget will call this function to commit the text with the delegate.
sender | The widget that called this function. |
text | The text entered by the user. |
Reimplemented from hi::v1::text_field_delegate.
|
inlineoverridevirtualnoexcept |
Set the text as entered by the user.
When the user causes a text field to commit, by pressing enter, tab, or clicking outside the field and when the text was validated the widget will call this function to commit the text with the delegate.
sender | The widget that called this function. |
text | The text entered by the user. |
Reimplemented from hi::v1::text_field_delegate.
|
inlineoverridevirtualnoexcept |
Get the text to show in the text field.
When the user is not editing the text the text-field will request what to show using this function.
sender | The widget that called this function. |
Reimplemented from hi::v1::text_field_delegate.
|
inlineoverridevirtualnoexcept |
Get the text to show in the text field.
When the user is not editing the text the text-field will request what to show using this function.
sender | The widget that called this function. |
Reimplemented from hi::v1::text_field_delegate.
|
inlineoverridevirtualnoexcept |
Validate the text field.
sender | The widget that called this function. |
text | The text entered by the user into the text field. |
Reimplemented from hi::v1::text_field_delegate.
|
inlineoverridevirtualnoexcept |
Validate the text field.
sender | The widget that called this function. |
text | The text entered by the user into the text field. |
Reimplemented from hi::v1::text_field_delegate.