FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    content_type

    content_type: super::TextInputContentType
    

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

    Source

    return_key_type

    return_key_type: super::TextInputReturnKeyType
    

    Determines what the Return key says and how it behaves.

    Source

    multiline

    multiline: bool
    

    Text is multiline.

    Source

    lowercase

    lowercase: bool
    

    Text is in lower case.

    Source

    uppercase

    uppercase: bool
    

    Text is in upper case.

    Source

    auto_capitalization

    auto_capitalization: bool
    

    Automatically capitalize letters at the start of the sentence.

    Source

    is_sensitive

    is_sensitive: bool
    

    Text contains sensitive data like card numbers and should not be stored.

    Source

    show_suggestions

    show_suggestions: Option<bool>
    

    Determines whether text suggestions are shown; None leaves the decision to the platform.

    Source

    locale_hints

    locale_hints: Option<std::rc::Rc<[String]>>
    

    Hints about the locales (BCP 47 language tags) the user is expected to type in.

    Source

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    from_styled_element

    fn from_styled_element(ferro_object: &StyledElement) -> TextInputOptions
    

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

    Source

    default_options

    fn default_options() -> TextInputOptions
    

    The default options.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    content_type_property

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

    Defines the ContentType attached property.

    Source

    set_content_type

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

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

    Source

    get_content_type

    fn get_content_type(ferro_object: &StyledElement) -> TextInputContentType
    

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

    Source

    return_key_type_property

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

    Defines the ReturnKeyType attached property.

    Source

    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.

    Source

    get_return_key_type

    fn get_return_key_type(ferro_object: &StyledElement) -> TextInputReturnKeyType
    

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

    Source

    multiline_property

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

    Defines the Multiline attached property.

    Source

    set_multiline

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

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

    Source

    get_multiline

    fn get_multiline(ferro_object: &StyledElement) -> bool
    

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

    Source

    lowercase_property

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

    Defines the Lowercase attached property.

    Source

    set_lowercase

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

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

    Source

    get_lowercase

    fn get_lowercase(ferro_object: &StyledElement) -> bool
    

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

    Source

    uppercase_property

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

    Defines the Uppercase attached property.

    Source

    set_uppercase

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

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

    Source

    get_uppercase

    fn get_uppercase(ferro_object: &StyledElement) -> bool
    

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

    Source

    auto_capitalization_property

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

    Defines the AutoCapitalization attached property.

    Source

    set_auto_capitalization

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

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

    Source

    get_auto_capitalization

    fn get_auto_capitalization(ferro_object: &StyledElement) -> bool
    

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

    Source

    is_sensitive_property

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

    Defines the IsSensitive attached property.

    Source

    set_is_sensitive

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

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

    Source

    get_is_sensitive

    fn get_is_sensitive(ferro_object: &StyledElement) -> bool
    

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

    Source

    show_suggestions_property

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

    Defines the ShowSuggestions attached property.

    Source

    set_show_suggestions

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

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

    Source

    get_show_suggestions

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

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

    Source

    locale_hints_property

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

    Defines the LocaleHints attached property.

    Source

    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.

    Source

    get_locale_hints

    fn get_locale_hints(ferro_object: &StyledElement) -> Option<Rc<[String]>>
    

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

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • Default
    • StructuralPartialEq
    • PartialEq
    • StaticType

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.