Skip to main content

TextInputOptions

Struct TextInputOptions 

Source
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: TextInputContentType

The content type (mostly for determining the shape of the virtual keyboard).

§return_key_type: TextInputReturnKeyType

Determines what the Return key says and how it behaves.

§multiline: bool

Text is multiline.

§lowercase: bool

Text is in lower case.

§uppercase: bool

Text is in upper case.

§auto_capitalization: bool

Automatically capitalize letters at the start of the sentence.

§is_sensitive: bool

Text 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

Source

pub const TYPE: &'static TypeInfo = <TextInputOptions as crate::StaticType>::TYPE

The runtime type of this type.

Source§

impl TextInputOptions

Source

pub fn from_styled_element(ferro_object: &StyledElement) -> TextInputOptions

Creates the options from the values of the attached properties of a control.

Source

pub fn default_options() -> TextInputOptions

The default options.

Source

pub fn content_type_property() -> &'static AttachedProperty<TextInputContentType>

Defines the ContentType attached property.

Source

pub fn set_content_type( ferro_object: &StyledElement, value: TextInputContentType, )

Sets the value of the attached ContentType property on a control.

Source

pub fn get_content_type(ferro_object: &StyledElement) -> TextInputContentType

Gets the value of the attached ContentType property of a control.

Source

pub fn return_key_type_property() -> &'static AttachedProperty<TextInputReturnKeyType>

Defines the ReturnKeyType attached property.

Source

pub fn set_return_key_type( ferro_object: &StyledElement, value: TextInputReturnKeyType, )

Sets the value of the attached ReturnKeyType property on a control.

Source

pub fn get_return_key_type( ferro_object: &StyledElement, ) -> TextInputReturnKeyType

Gets the value of the attached ReturnKeyType property of a control.

Source

pub fn multiline_property() -> &'static AttachedProperty<bool>

Defines the Multiline attached property.

Source

pub fn set_multiline(ferro_object: &StyledElement, value: bool)

Sets the value of the attached Multiline property on a control.

Source

pub fn get_multiline(ferro_object: &StyledElement) -> bool

Gets the value of the attached Multiline property of a control.

Source

pub fn lowercase_property() -> &'static AttachedProperty<bool>

Defines the Lowercase attached property.

Source

pub fn set_lowercase(ferro_object: &StyledElement, value: bool)

Sets the value of the attached Lowercase property on a control.

Source

pub fn get_lowercase(ferro_object: &StyledElement) -> bool

Gets the value of the attached Lowercase property of a control.

Source

pub fn uppercase_property() -> &'static AttachedProperty<bool>

Defines the Uppercase attached property.

Source

pub fn set_uppercase(ferro_object: &StyledElement, value: bool)

Sets the value of the attached Uppercase property on a control.

Source

pub fn get_uppercase(ferro_object: &StyledElement) -> bool

Gets the value of the attached Uppercase property of a control.

Source

pub fn auto_capitalization_property() -> &'static AttachedProperty<bool>

Defines the AutoCapitalization attached property.

Source

pub fn set_auto_capitalization(ferro_object: &StyledElement, value: bool)

Sets the value of the attached AutoCapitalization property on a control.

Source

pub fn get_auto_capitalization(ferro_object: &StyledElement) -> bool

Gets the value of the attached AutoCapitalization property of a control.

Source

pub fn is_sensitive_property() -> &'static AttachedProperty<bool>

Defines the IsSensitive attached property.

Source

pub fn set_is_sensitive(ferro_object: &StyledElement, value: bool)

Sets the value of the attached IsSensitive property on a control.

Source

pub fn get_is_sensitive(ferro_object: &StyledElement) -> bool

Gets the value of the attached IsSensitive property of a control.

Source

pub fn show_suggestions_property() -> &'static AttachedProperty<Option<bool>>

Defines the ShowSuggestions attached property.

Source

pub fn set_show_suggestions(ferro_object: &StyledElement, value: Option<bool>)

Sets the value of the attached ShowSuggestions property on a control.

Source

pub fn get_show_suggestions(ferro_object: &StyledElement) -> Option<bool>

Gets the value of the attached ShowSuggestions property of a control.

Source

pub fn locale_hints_property() -> &'static AttachedProperty<Option<Rc<[String]>>>

Defines the LocaleHints attached property.

Source

pub fn set_locale_hints( ferro_object: &StyledElement, value: Option<Rc<[String]>>, )

Sets the value of the attached LocaleHints property on a control.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TextInputOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TextInputOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for TextInputOptions

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StaticType for TextInputOptions

Source§

const TYPE: &'static TypeInfo

The runtime type.
Source§

impl StructuralPartialEq for TextInputOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyValue for T
where T: PartialEq + 'static,

Source§

fn any_value_as_any(&self) -> &(dyn Any + 'static)

Source§

fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool

Source§

fn any_value_type_name(&self) -> &'static str

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PropertyValue for T
where T: Clone + PartialEq + 'static,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.