14#include "../concepts.hpp"
18class text_field_widget;
55 return fmt::format(
"{}", value);
70 return tt::from_string<value_type>(text);
72 error =
l10n(
"Invalid character entered.");
Exception thrown during parsing on an error.
Definition exception.hpp:26
A localizable string.
Definition l10n.hpp:12
A single line text field.
Definition text_field_widget.hpp:54
Definition text_field_delegate.hpp:21
virtual std::optional< value_type > from_string(sender_type &sender, std::string_view text, l10n &error) noexcept
Convert a string to a value.
Definition text_field_delegate.hpp:66
size_t text_width(sender_type &sender) const noexcept
The width of the text field in characters.
Definition text_field_delegate.hpp:31
std::vector< std::string > suggestions(sender_type &sender) const noexcept
The list of suggestions to show in the popup box.
Definition text_field_delegate.hpp:41
virtual std::string to_string(sender_type &sender, value_type const &value) noexcept
Convert a value to a string.
Definition text_field_delegate.hpp:52