TextInputOptions
struct · ferroui-base · v0.5.0
struct TextInputOptions
Describes how a text input wants the input method of the platform to
behave: the properties are attached to a text editing control (they are
inherited) and gathered into a TextInputOptions value for the input
method.
Members
content_typereturn_key_typemultilinelowercaseuppercaseauto_capitalizationis_sensitiveshow_suggestionslocale_hintsTYPEfrom_styled_elementdefault_optionsinput_scope_names_propertyset_input_scope_namesget_input_scope_namesget_effective_input_scopeget_effective_content_typecontent_type_propertyset_content_typeget_content_typereturn_key_type_propertyset_return_key_typeget_return_key_typemultiline_propertyset_multilineget_multilinelowercase_propertyset_lowercaseget_lowercaseuppercase_propertyset_uppercaseget_uppercaseauto_capitalization_propertyset_auto_capitalizationget_auto_capitalizationis_sensitive_propertyset_is_sensitiveget_is_sensitiveshow_suggestions_propertyset_show_suggestionsget_show_suggestionslocale_hints_propertyset_locale_hintsget_locale_hints
content_type
content_type: super::TextInputContentType
The content type (mostly for determining the shape of the virtual keyboard).
return_key_type
return_key_type: super::TextInputReturnKeyType
Determines what the Return key says and how it behaves.
multiline
multiline: bool
Text is multiline.
lowercase
lowercase: bool
Text is in lower case.
uppercase
uppercase: bool
Text is in upper case.
auto_capitalization
auto_capitalization: bool
Automatically capitalize letters at the start of the sentence.
is_sensitive
is_sensitive: bool
Text contains sensitive data like card numbers and should not be stored.
show_suggestions
show_suggestions: Option<bool>
Determines whether text suggestions are shown; None leaves the decision to the platform.
locale_hints
locale_hints: Option<std::rc::Rc<[String]>>
Hints about the locales (BCP 47 language tags) the user is expected to type in.
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this type.
from_styled_element
fn from_styled_element(ferro_object: &StyledElement) -> TextInputOptions
Creates the options from the values of the attached properties of a control.
default_options
fn default_options() -> TextInputOptions
The default options.
input_scope_names_property
fn input_scope_names_property() -> &'static AttachedProperty<Option<Rc<[InputScopeNameValue]>>>
Defines the InputScopeNames attached property: the ordered, immutable input-scope
hints of WinUI's InputScope (an addition, docs/porting/winui-rich-text.md). None
or an empty list leaves the input method to ContentType.
Within 0.4 the value is not a field of TextInputOptions: a backend reads it from
the element, through TextInputMethodConnection::input_scope_names
of a client that opted in to the connection.
set_input_scope_names
fn set_input_scope_names(ferro_object: &StyledElement, value: Option<Rc<[InputScopeNameValue]>>)
Sets the value of the attached InputScopeNames property on a control.
get_input_scope_names
fn get_input_scope_names(ferro_object: &StyledElement) -> Option<Rc<[InputScopeNameValue]>>
Gets the value of the attached InputScopeNames property of a control.
get_effective_input_scope
fn get_effective_input_scope(ferro_object: &StyledElement) -> Option<InputScopeNameValue>
The first input scope of a control, the one a platform with a single hint uses.
get_effective_content_type
fn get_effective_content_type(ferro_object: &StyledElement) -> TextInputContentType
The content type that best matches the first input scope of a control, or its
ContentType without one: for a platform that has content types and no input scopes.
content_type_property
fn content_type_property() -> &'static AttachedProperty<TextInputContentType>
Defines the ContentType attached property.
set_content_type
fn set_content_type(ferro_object: &StyledElement, value: TextInputContentType)
Sets the value of the attached ContentType property on a control.
get_content_type
fn get_content_type(ferro_object: &StyledElement) -> TextInputContentType
Gets the value of the attached ContentType property of a control.
return_key_type_property
fn return_key_type_property() -> &'static AttachedProperty<TextInputReturnKeyType>
Defines the ReturnKeyType attached property.
set_return_key_type
fn set_return_key_type(ferro_object: &StyledElement, value: TextInputReturnKeyType)
Sets the value of the attached ReturnKeyType property on a control.
get_return_key_type
fn get_return_key_type(ferro_object: &StyledElement) -> TextInputReturnKeyType
Gets the value of the attached ReturnKeyType property of a control.
multiline_property
fn multiline_property() -> &'static AttachedProperty<bool>
Defines the Multiline attached property.
set_multiline
fn set_multiline(ferro_object: &StyledElement, value: bool)
Sets the value of the attached Multiline property on a control.
get_multiline
fn get_multiline(ferro_object: &StyledElement) -> bool
Gets the value of the attached Multiline property of a control.
lowercase_property
fn lowercase_property() -> &'static AttachedProperty<bool>
Defines the Lowercase attached property.
set_lowercase
fn set_lowercase(ferro_object: &StyledElement, value: bool)
Sets the value of the attached Lowercase property on a control.
get_lowercase
fn get_lowercase(ferro_object: &StyledElement) -> bool
Gets the value of the attached Lowercase property of a control.
uppercase_property
fn uppercase_property() -> &'static AttachedProperty<bool>
Defines the Uppercase attached property.
set_uppercase
fn set_uppercase(ferro_object: &StyledElement, value: bool)
Sets the value of the attached Uppercase property on a control.
get_uppercase
fn get_uppercase(ferro_object: &StyledElement) -> bool
Gets the value of the attached Uppercase property of a control.
auto_capitalization_property
fn auto_capitalization_property() -> &'static AttachedProperty<bool>
Defines the AutoCapitalization attached property.
set_auto_capitalization
fn set_auto_capitalization(ferro_object: &StyledElement, value: bool)
Sets the value of the attached AutoCapitalization property on a control.
get_auto_capitalization
fn get_auto_capitalization(ferro_object: &StyledElement) -> bool
Gets the value of the attached AutoCapitalization property of a control.
is_sensitive_property
fn is_sensitive_property() -> &'static AttachedProperty<bool>
Defines the IsSensitive attached property.
set_is_sensitive
fn set_is_sensitive(ferro_object: &StyledElement, value: bool)
Sets the value of the attached IsSensitive property on a control.
get_is_sensitive
fn get_is_sensitive(ferro_object: &StyledElement) -> bool
Gets the value of the attached IsSensitive property of a control.
show_suggestions_property
fn show_suggestions_property() -> &'static AttachedProperty<Option<bool>>
Defines the ShowSuggestions attached property.
set_show_suggestions
fn set_show_suggestions(ferro_object: &StyledElement, value: Option<bool>)
Sets the value of the attached ShowSuggestions property on a control.
get_show_suggestions
fn get_show_suggestions(ferro_object: &StyledElement) -> Option<bool>
Gets the value of the attached ShowSuggestions property of a control.
locale_hints_property
fn locale_hints_property() -> &'static AttachedProperty<Option<Rc<[String]>>>
Defines the LocaleHints attached property.
set_locale_hints
fn set_locale_hints(ferro_object: &StyledElement, value: Option<Rc<[String]>>)
Sets the value of the attached LocaleHints property on a control.
get_locale_hints
fn get_locale_hints(ferro_object: &StyledElement) -> Option<Rc<[String]>>
Gets the value of the attached LocaleHints property of a control.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneDebugDefaultStructuralPartialEqPartialEqStaticType
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.