|
|
| default_text_field_delegate (forward_of< observer< value_type > > auto &&value) noexcept |
| |
| std::optional< label > | validate (text_field_widget &sender, std::string_view text) noexcept override |
| | Validate the text field.
|
| |
| std::string | text (text_field_widget &sender) noexcept override |
| | Get the text to show in the text field.
|
| |
| void | set_text (text_field_widget &sender, std::string_view text) noexcept override |
| | Set the text as entered by the user.
|
| |
|
| default_text_field_delegate (forward_of< observer< value_type > > auto &&value) noexcept |
| |
| label | validate (text_field_widget &sender, std::string_view text) noexcept override |
| | Validate the text field.
|
| |
| std::string | text (text_field_widget &sender) noexcept override |
| | Get the text to show in the text field.
|
| |
| void | set_text (text_field_widget &sender, std::string_view text) noexcept override |
| | Set the text as entered by the user.
|
| |
|
virtual void | init (text_field_widget const &sender) noexcept |
| |
|
virtual void | deinit (text_field_widget const &sender) noexcept |
| |
|
callback_token | subscribe (forward_of< callback_proto > auto &&callback, callback_flags flags=callback_flags::synchronous) noexcept |
| |
template<std::integral T>
class hi::v1::default_text_field_delegate< T >
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.
- Template Parameters
-
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.
- Template Parameters
-
template<std::integral T>
|
|
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.
- Precondition
- text Must have been validated as correct.
- Parameters
-
| sender | The widget that called this function. |
| text | The text entered by the user. |
Reimplemented from hi::v1::text_field_delegate.
template<std::integral T>
|
|
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.
- Precondition
- text Must have been validated as correct.
- Parameters
-
| sender | The widget that called this function. |
| text | The text entered by the user. |
Reimplemented from hi::v1::text_field_delegate.