MaterialBottomSheetHost
struct · ferroui-themes-material · v0.5.0
struct MaterialBottomSheetHost
A modal sheet placed as the last child of the application's overlay Grid.
Its Content is the sheet body. State is the requested semantic state;
Self::current_state changes when the transition settles.
The host owns scrim input, sheet/scroll-content pointer capture, Escape/back navigation,
focus containment/restoration and completion events. Supply the platform's
insets through SafeInsets; no extra native window is created.
Members
TYPEto_refstate_propertyis_partial_enabled_propertyis_dismiss_enabled_propertysafe_insets_propertyreduced_motion_propertymotion_scheme_propertyconstructnewstateset_stateis_partial_enabledset_is_partial_enabledis_dismiss_enabledset_is_dismiss_enabledsafe_insetsset_safe_insetsreduced_motionset_reduced_motionmotion_schemeset_motion_schemecurrent_stateanchorsoffsetis_animatingset_confirm_state_changeshowexpandhidehandle_backrequest_statedismissed_eventsettled_eventdismissedsettled
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<MaterialBottomSheetHost>
Returns a strong reference to this object.
state_property
fn state_property() -> &'static StyledProperty<MaterialSheetState>
Requested state. Bind this property two-way to application state.
is_partial_enabled_property
fn is_partial_enabled_property() -> &'static StyledProperty<bool>
Whether the deterministic partial anchor is available.
is_dismiss_enabled_property
fn is_dismiss_enabled_property() -> &'static StyledProperty<bool>
Whether scrim, drag and Escape may dismiss the sheet.
safe_insets_property
fn safe_insets_property() -> &'static StyledProperty<Thickness>
Safe area supplied by the host, including system bars and keyboard insets.
reduced_motion_property
fn reduced_motion_property() -> &'static StyledProperty<bool>
motion_scheme_property
fn motion_scheme_property() -> &'static StyledProperty<MaterialMotionScheme>
construct
fn construct() -> Self
new
fn new() -> Ref<Self>
state
fn state(self: &Self) -> MaterialSheetState
set_state
fn set_state(self: &Self, value: MaterialSheetState)
is_partial_enabled
fn is_partial_enabled(self: &Self) -> bool
set_is_partial_enabled
fn set_is_partial_enabled(self: &Self, value: bool)
is_dismiss_enabled
fn is_dismiss_enabled(self: &Self) -> bool
set_is_dismiss_enabled
fn set_is_dismiss_enabled(self: &Self, value: bool)
safe_insets
fn safe_insets(self: &Self) -> Thickness
set_safe_insets
fn set_safe_insets(self: &Self, value: Thickness)
reduced_motion
fn reduced_motion(self: &Self) -> bool
set_reduced_motion
fn set_reduced_motion(self: &Self, value: bool)
motion_scheme
fn motion_scheme(self: &Self) -> MaterialMotionScheme
set_motion_scheme
fn set_motion_scheme(self: &Self, value: MaterialMotionScheme)
current_state
fn current_state(self: &Self) -> MaterialSheetState
anchors
fn anchors(self: &Self) -> MaterialSheetAnchors
offset
fn offset(self: &Self) -> f64
is_animating
fn is_animating(self: &Self) -> bool
set_confirm_state_change
fn set_confirm_state_change(self: &Self, confirm: Option<Rc<dyn Fn(MaterialSheetState) -> bool>>)
A synchronous veto applied to programmatic state changes and user gestures. The callback must not change this host's state reentrantly.
show
fn show(self: &Self) -> bool
expand
fn expand(self: &Self) -> bool
hide
fn hide(self: &Self) -> bool
handle_back
fn handle_back(self: &Self) -> bool
Expanded → partial → hidden, following the modal back behavior.
request_state
fn request_state(self: &Self, state: MaterialSheetState) -> bool
dismissed_event
fn dismissed_event() -> &'static RoutedEvent<RoutedEventArgs>
settled_event
fn settled_event() -> &'static RoutedEvent<RoutedEventArgs>
dismissed
fn dismissed(self: &Self, handler: impl Fn(&ferroui_base::interactivity::Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
settled
fn settled(self: &Self, handler: impl Fn(&ferroui_base::interactivity::Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherCastableFrom<ST, Uninit, Uninit>CastableFrom<ST, Initialized, Initialized>Read<Exclusive, BecauseExclusive>TemplatedControlImplExtContentControlImplExtControlImplExtDerefUpcast<T>Upcast<MaterialBottomSheetHost>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplInteractiveImplContentControlImplControlImplFerroObjectImplVisualImplLayoutableImplTemplatedControlImplInputElementImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.