|
HikoGUI
A low latency retained GUI
|
Public Types | |
| using | callback_ptr_type = std::shared_ptr<std::function<void()>> |
Public Member Functions | |
| virtual void | init (text_field_widget const &sender) noexcept |
| virtual void | deinit (text_field_widget const &sender) noexcept |
| auto | subscribe (text_field_widget &sender, callback_flags flags, std::invocable<> auto &&callback) noexcept |
| auto | subscribe (text_field_widget &sender, std::invocable<> auto &&callback) noexcept |
| virtual label | validate (text_field_widget &sender, std::string_view text) noexcept |
| Validate the text field. | |
| virtual std::string | text (text_field_widget &sender) noexcept |
| Get the text to show in the text field. | |
| virtual void | set_text (text_field_widget &sender, std::string_view text) noexcept |
| Set the text as entered by the user. | |
|
inlinevirtualnoexcept |
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.
| text | The text entered by the user. |
Reimplemented in v1::default_text_field_delegate< T >, and v1::default_text_field_delegate< T >.
|
inlinevirtualnoexcept |
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.
Reimplemented in v1::default_text_field_delegate< T >, and v1::default_text_field_delegate< T >.
|
inlinevirtualnoexcept |
Validate the text field.
| text | The text entered by the user into the text field. |
Reimplemented in v1::default_text_field_delegate< T >, and v1::default_text_field_delegate< T >.