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.
Members
TYPEkind_propertyleading_icon_propertytrailing_icon_propertyavatar_propertyshow_selected_icon_propertyis_expressive_propertyis_dismissible_propertydismiss_command_propertydismiss_command_parameter_propertydismiss_label_propertyfull_corner_radius_propertyget_full_corner_radiusget_kindset_kindget_leading_iconset_leading_iconget_trailing_iconset_trailing_iconget_avatarset_avatarget_show_selected_iconset_show_selected_iconget_is_expressiveset_is_expressiveget_is_dismissibleset_is_dismissibleget_dismiss_commandset_dismiss_commandget_dismiss_command_parameterset_dismiss_command_parameterget_dismiss_labelset_dismiss_labeldismiss_requested_eventdismiss_requestedrequest_dismiss
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this type.
kind_property
fn kind_property() -> &'static AttachedProperty<MaterialChipKind>
leading_icon_property
fn leading_icon_property() -> &'static AttachedProperty<Option<BoxedValue>>
trailing_icon_property
fn trailing_icon_property() -> &'static AttachedProperty<Option<BoxedValue>>
avatar_property
fn avatar_property() -> &'static AttachedProperty<Option<BoxedValue>>
A circular 24 dp input-chip avatar, taking precedence over its leading icon/check.
show_selected_icon_property
fn show_selected_icon_property() -> &'static AttachedProperty<bool>
Shows the standard selected check when no input-chip avatar is supplied.
is_expressive_property
fn is_expressive_property() -> &'static AttachedProperty<bool>
Uses the expressive shape overload's compact spacing and symmetric motion roles.
is_dismissible_property
fn is_dismissible_property() -> &'static AttachedProperty<bool>
dismiss_command_property
fn dismiss_command_property() -> &'static AttachedProperty<Option<Rc<dyn ICommand>>>
dismiss_command_parameter_property
fn dismiss_command_parameter_property() -> &'static AttachedProperty<Option<BoxedValue>>
dismiss_label_property
fn dismiss_label_property() -> &'static AttachedProperty<String>
Accessible, localizable name for the independent dismiss action.
full_corner_radius_property
fn full_corner_radius_property() -> &'static AttachedProperty<CornerRadius>
Measured full shape used by expressive selection, including taller custom slots.
get_full_corner_radius
fn get_full_corner_radius(button: &Button) -> CornerRadius
get_kind
fn get_kind(button: &Button) -> MaterialChipKind
set_kind
fn set_kind(button: &Button, value: MaterialChipKind)
get_leading_icon
fn get_leading_icon(button: &Button) -> Option<BoxedValue>
set_leading_icon
fn set_leading_icon(button: &Button, value: Option<BoxedValue>)
get_trailing_icon
fn get_trailing_icon(button: &Button) -> Option<BoxedValue>
set_trailing_icon
fn set_trailing_icon(button: &Button, value: Option<BoxedValue>)
get_avatar
fn get_avatar(button: &Button) -> Option<BoxedValue>
set_avatar
fn set_avatar(button: &Button, value: Option<BoxedValue>)
get_show_selected_icon
fn get_show_selected_icon(button: &Button) -> bool
set_show_selected_icon
fn set_show_selected_icon(button: &Button, value: bool)
get_is_expressive
fn get_is_expressive(button: &Button) -> bool
set_is_expressive
fn set_is_expressive(button: &Button, value: bool)
get_is_dismissible
fn get_is_dismissible(button: &Button) -> bool
set_is_dismissible
fn set_is_dismissible(button: &Button, value: bool)
get_dismiss_command
fn get_dismiss_command(button: &Button) -> Option<Rc<dyn ICommand>>
set_dismiss_command
fn set_dismiss_command(button: &Button, value: Option<Rc<dyn ICommand>>)
get_dismiss_command_parameter
fn get_dismiss_command_parameter(button: &Button) -> Option<BoxedValue>
set_dismiss_command_parameter
fn set_dismiss_command_parameter(button: &Button, value: Option<BoxedValue>)
get_dismiss_label
fn get_dismiss_label(button: &Button) -> String
set_dismiss_label
fn set_dismiss_label(button: &Button, value: &str)
dismiss_requested_event
fn dismiss_requested_event() -> &'static RoutedEvent<RoutedEventArgs>
dismiss_requested
fn dismiss_requested(button: &Button, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
request_dismiss
fn request_dismiss(button: &Button) -> bool
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherCastableFrom<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.