FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MaterialChip

    struct · ferroui-themes-material · v0.5.0

    struct MaterialChip
    

    Attached slots and optional dismissal for the Material chip themes. A selectable chip retains the native ToggleButton pattern with a checkbox role; an assist/suggestion chip retains Button's invoke pattern.

    The optional dismiss button has its own 48 dp interactive slot. Like a larger native trailing composable, this increases the chip's painted height to fit it. DismissRequested/Command ask the application to remove its item; the theme never mutates an application's collection or changes the chip's checked state.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    kind_property

    fn kind_property() -> &'static AttachedProperty<MaterialChipKind>
    

    Source

    leading_icon_property

    fn leading_icon_property() -> &'static AttachedProperty<Option<BoxedValue>>
    

    Source

    trailing_icon_property

    fn trailing_icon_property() -> &'static AttachedProperty<Option<BoxedValue>>
    

    Source

    avatar_property

    fn avatar_property() -> &'static AttachedProperty<Option<BoxedValue>>
    

    A circular 24 dp input-chip avatar, taking precedence over its leading icon/check.

    Source

    show_selected_icon_property

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

    Shows the standard selected check when no input-chip avatar is supplied.

    Source

    is_expressive_property

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

    Uses the expressive shape overload's compact spacing and symmetric motion roles.

    Source

    is_dismissible_property

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

    Source

    dismiss_command_property

    fn dismiss_command_property() -> &'static AttachedProperty<Option<Rc<dyn ICommand>>>
    

    Source

    dismiss_command_parameter_property

    fn dismiss_command_parameter_property() -> &'static AttachedProperty<Option<BoxedValue>>
    

    Source

    dismiss_label_property

    fn dismiss_label_property() -> &'static AttachedProperty<String>
    

    Accessible, localizable name for the independent dismiss action.

    Source

    full_corner_radius_property

    fn full_corner_radius_property() -> &'static AttachedProperty<CornerRadius>
    

    Measured full shape used by expressive selection, including taller custom slots.

    Source

    get_full_corner_radius

    fn get_full_corner_radius(button: &Button) -> CornerRadius
    

    Source

    get_kind

    fn get_kind(button: &Button) -> MaterialChipKind
    

    Source

    set_kind

    fn set_kind(button: &Button, value: MaterialChipKind)
    

    Source

    get_leading_icon

    fn get_leading_icon(button: &Button) -> Option<BoxedValue>
    

    Source

    set_leading_icon

    fn set_leading_icon(button: &Button, value: Option<BoxedValue>)
    

    Source

    get_trailing_icon

    fn get_trailing_icon(button: &Button) -> Option<BoxedValue>
    

    Source

    set_trailing_icon

    fn set_trailing_icon(button: &Button, value: Option<BoxedValue>)
    

    Source

    get_avatar

    fn get_avatar(button: &Button) -> Option<BoxedValue>
    

    Source

    set_avatar

    fn set_avatar(button: &Button, value: Option<BoxedValue>)
    

    Source

    get_show_selected_icon

    fn get_show_selected_icon(button: &Button) -> bool
    

    Source

    set_show_selected_icon

    fn set_show_selected_icon(button: &Button, value: bool)
    

    Source

    get_is_expressive

    fn get_is_expressive(button: &Button) -> bool
    

    Source

    set_is_expressive

    fn set_is_expressive(button: &Button, value: bool)
    

    Source

    get_is_dismissible

    fn get_is_dismissible(button: &Button) -> bool
    

    Source

    set_is_dismissible

    fn set_is_dismissible(button: &Button, value: bool)
    

    Source

    get_dismiss_command

    fn get_dismiss_command(button: &Button) -> Option<Rc<dyn ICommand>>
    

    Source

    set_dismiss_command

    fn set_dismiss_command(button: &Button, value: Option<Rc<dyn ICommand>>)
    

    Source

    get_dismiss_command_parameter

    fn get_dismiss_command_parameter(button: &Button) -> Option<BoxedValue>
    

    Source

    set_dismiss_command_parameter

    fn set_dismiss_command_parameter(button: &Button, value: Option<BoxedValue>)
    

    Source

    get_dismiss_label

    fn get_dismiss_label(button: &Button) -> String
    

    Source

    set_dismiss_label

    fn set_dismiss_label(button: &Button, value: &str)
    

    Source

    dismiss_requested_event

    fn dismiss_requested_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Source

    dismiss_requested

    fn dismiss_requested(button: &Button, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Source

    request_dismiss

    fn request_dismiss(button: &Button) -> bool
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • CastableFrom<ST, Uninit, Uninit>
    • CastableFrom<ST, Initialized, Initialized>
    • Read<Exclusive, BecauseExclusive>
    • StaticType

    Availability

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