pub struct TextInputOptions {
pub content_type: TextInputContentType,
pub return_key_type: TextInputReturnKeyType,
pub multiline: bool,
pub lowercase: bool,
pub uppercase: bool,
pub auto_capitalization: bool,
pub is_sensitive: bool,
pub show_suggestions: Option<bool>,
pub locale_hints: Option<Rc<[String]>>,
}Expand description
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.
Fields§
§content_type: TextInputContentTypeThe content type (mostly for determining the shape of the virtual keyboard).
return_key_type: TextInputReturnKeyTypeDetermines what the Return key says and how it behaves.
multiline: boolText is multiline.
lowercase: boolText is in lower case.
uppercase: boolText is in upper case.
auto_capitalization: boolAutomatically capitalize letters at the start of the sentence.
is_sensitive: boolText contains sensitive data like card numbers and should not be stored.
show_suggestions: Option<bool>Determines whether text suggestions are shown; None leaves the decision to the platform.
locale_hints: Option<Rc<[String]>>Hints about the locales (BCP 47 language tags) the user is expected to type in.
Implementations§
Source§impl TextInputOptions
impl TextInputOptions
Sourcepub fn from_styled_element(ferro_object: &StyledElement) -> TextInputOptions
pub fn from_styled_element(ferro_object: &StyledElement) -> TextInputOptions
Creates the options from the values of the attached properties of a control.
Sourcepub fn default_options() -> TextInputOptions
pub fn default_options() -> TextInputOptions
The default options.
Sourcepub fn content_type_property() -> &'static AttachedProperty<TextInputContentType>
pub fn content_type_property() -> &'static AttachedProperty<TextInputContentType>
Defines the ContentType attached property.
Sourcepub fn set_content_type(
ferro_object: &StyledElement,
value: TextInputContentType,
)
pub fn set_content_type( ferro_object: &StyledElement, value: TextInputContentType, )
Sets the value of the attached ContentType property on a control.
Sourcepub fn get_content_type(ferro_object: &StyledElement) -> TextInputContentType
pub fn get_content_type(ferro_object: &StyledElement) -> TextInputContentType
Gets the value of the attached ContentType property of a control.
Sourcepub fn return_key_type_property() -> &'static AttachedProperty<TextInputReturnKeyType>
pub fn return_key_type_property() -> &'static AttachedProperty<TextInputReturnKeyType>
Defines the ReturnKeyType attached property.
Sourcepub fn set_return_key_type(
ferro_object: &StyledElement,
value: TextInputReturnKeyType,
)
pub fn set_return_key_type( ferro_object: &StyledElement, value: TextInputReturnKeyType, )
Sets the value of the attached ReturnKeyType property on a control.
Sourcepub fn get_return_key_type(
ferro_object: &StyledElement,
) -> TextInputReturnKeyType
pub fn get_return_key_type( ferro_object: &StyledElement, ) -> TextInputReturnKeyType
Gets the value of the attached ReturnKeyType property of a control.
Sourcepub fn multiline_property() -> &'static AttachedProperty<bool>
pub fn multiline_property() -> &'static AttachedProperty<bool>
Defines the Multiline attached property.
Sourcepub fn set_multiline(ferro_object: &StyledElement, value: bool)
pub fn set_multiline(ferro_object: &StyledElement, value: bool)
Sets the value of the attached Multiline property on a control.
Sourcepub fn get_multiline(ferro_object: &StyledElement) -> bool
pub fn get_multiline(ferro_object: &StyledElement) -> bool
Gets the value of the attached Multiline property of a control.
Sourcepub fn lowercase_property() -> &'static AttachedProperty<bool>
pub fn lowercase_property() -> &'static AttachedProperty<bool>
Defines the Lowercase attached property.
Sourcepub fn set_lowercase(ferro_object: &StyledElement, value: bool)
pub fn set_lowercase(ferro_object: &StyledElement, value: bool)
Sets the value of the attached Lowercase property on a control.
Sourcepub fn get_lowercase(ferro_object: &StyledElement) -> bool
pub fn get_lowercase(ferro_object: &StyledElement) -> bool
Gets the value of the attached Lowercase property of a control.
Sourcepub fn uppercase_property() -> &'static AttachedProperty<bool>
pub fn uppercase_property() -> &'static AttachedProperty<bool>
Defines the Uppercase attached property.
Sourcepub fn set_uppercase(ferro_object: &StyledElement, value: bool)
pub fn set_uppercase(ferro_object: &StyledElement, value: bool)
Sets the value of the attached Uppercase property on a control.
Sourcepub fn get_uppercase(ferro_object: &StyledElement) -> bool
pub fn get_uppercase(ferro_object: &StyledElement) -> bool
Gets the value of the attached Uppercase property of a control.
Sourcepub fn auto_capitalization_property() -> &'static AttachedProperty<bool>
pub fn auto_capitalization_property() -> &'static AttachedProperty<bool>
Defines the AutoCapitalization attached property.
Sourcepub fn set_auto_capitalization(ferro_object: &StyledElement, value: bool)
pub fn set_auto_capitalization(ferro_object: &StyledElement, value: bool)
Sets the value of the attached AutoCapitalization property on a control.
Sourcepub fn get_auto_capitalization(ferro_object: &StyledElement) -> bool
pub fn get_auto_capitalization(ferro_object: &StyledElement) -> bool
Gets the value of the attached AutoCapitalization property of a control.
Sourcepub fn is_sensitive_property() -> &'static AttachedProperty<bool>
pub fn is_sensitive_property() -> &'static AttachedProperty<bool>
Defines the IsSensitive attached property.
Sourcepub fn set_is_sensitive(ferro_object: &StyledElement, value: bool)
pub fn set_is_sensitive(ferro_object: &StyledElement, value: bool)
Sets the value of the attached IsSensitive property on a control.
Sourcepub fn get_is_sensitive(ferro_object: &StyledElement) -> bool
pub fn get_is_sensitive(ferro_object: &StyledElement) -> bool
Gets the value of the attached IsSensitive property of a control.
Sourcepub fn show_suggestions_property() -> &'static AttachedProperty<Option<bool>>
pub fn show_suggestions_property() -> &'static AttachedProperty<Option<bool>>
Defines the ShowSuggestions attached property.
Sourcepub fn set_show_suggestions(ferro_object: &StyledElement, value: Option<bool>)
pub fn set_show_suggestions(ferro_object: &StyledElement, value: Option<bool>)
Sets the value of the attached ShowSuggestions property on a control.
Sourcepub fn get_show_suggestions(ferro_object: &StyledElement) -> Option<bool>
pub fn get_show_suggestions(ferro_object: &StyledElement) -> Option<bool>
Gets the value of the attached ShowSuggestions property of a control.
Sourcepub fn locale_hints_property() -> &'static AttachedProperty<Option<Rc<[String]>>>
pub fn locale_hints_property() -> &'static AttachedProperty<Option<Rc<[String]>>>
Defines the LocaleHints attached property.
Sourcepub fn set_locale_hints(
ferro_object: &StyledElement,
value: Option<Rc<[String]>>,
)
pub fn set_locale_hints( ferro_object: &StyledElement, value: Option<Rc<[String]>>, )
Sets the value of the attached LocaleHints property on a control.
Sourcepub fn get_locale_hints(ferro_object: &StyledElement) -> Option<Rc<[String]>>
pub fn get_locale_hints(ferro_object: &StyledElement) -> Option<Rc<[String]>>
Gets the value of the attached LocaleHints property of a control.
Trait Implementations§
Source§impl Clone for TextInputOptions
impl Clone for TextInputOptions
Source§impl Debug for TextInputOptions
impl Debug for TextInputOptions
Source§impl Default for TextInputOptions
impl Default for TextInputOptions
Source§impl PartialEq for TextInputOptions
impl PartialEq for TextInputOptions
Source§impl StaticType for TextInputOptions
impl StaticType for TextInputOptions
impl StructuralPartialEq for TextInputOptions
Auto Trait Implementations§
impl !Send for TextInputOptions
impl !Sync for TextInputOptions
impl Freeze for TextInputOptions
impl RefUnwindSafe for TextInputOptions
impl Unpin for TextInputOptions
impl UnsafeUnpin for TextInputOptions
impl UnwindSafe for TextInputOptions
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more