pub struct FullScreenDialogView<State: 'static> { /* private fields */ }Expand description
A declarative M3 full-screen dialog: an app-bar-like header over a body slot, filling the whole area. See the module docs.
Implementations§
Source§impl<State: 'static> FullScreenDialogView<State>
impl<State: 'static> FullScreenDialogView<State>
Sourcepub fn action(self, action: AnyView<State>) -> Self
pub fn action(self, action: AnyView<State>) -> Self
Set the header’s trailing action (e.g. a “Save” button) — the
reference’s action.
Sourcepub fn dismissable(self, dismissable: bool) -> Self
pub fn dismissable(self, dismissable: bool) -> Self
Whether Escape/an Android back press dismiss this dialog (default
true) — see DialogView::dismissable. There is no scrim to tap
(the panel is full-bleed) and the header’s own close affordance
always dismisses regardless of this flag (matching the reference,
where the header close is the dialog’s one unconditional exit).
Sourcepub fn on_dismiss<F: Fn(&mut State) + 'static>(self, on_dismiss: F) -> Self
pub fn on_dismiss<F: Fn(&mut State) + 'static>(self, on_dismiss: F) -> Self
Observe a dismissal (Escape, back, or the header close) — see
DialogView::on_dismiss.
Sourcepub fn dismiss_handle(self, dismiss: ModalDismiss) -> Self
pub fn dismiss_handle(self, dismiss: ModalDismiss) -> Self
Install the app-triggered staged-dismiss handle, so the header’s own
trailing action (a “Save”) closes the dialog through the host’s exit
ramp instead of a raw, unstaged controller.pop() — see
DialogView::dismiss_handle. The header’s close affordance is not
routed through it: it fires on_dismiss directly (see
Self::dismissable), which is this family’s own unstaged exit.
Trait Implementations§
Source§impl<State: 'static> OverlayModalContent<State> for FullScreenDialogView<State>
impl<State: 'static> OverlayModalContent<State> for FullScreenDialogView<State>
Source§fn on_modal_dismiss(self, on_dismiss: Rc<dyn Fn(&mut State)>) -> Self
fn on_modal_dismiss(self, on_dismiss: Rc<dyn Fn(&mut State)>) -> Self
Source§fn modal_dismissable(&self) -> bool
fn modal_dismissable(&self) -> bool
BackPolicy.Source§impl<State: 'static> View<State> for FullScreenDialogView<State>
impl<State: 'static> View<State> for FullScreenDialogView<State>
Source§type Element = OverlayModalWidget
type Element = OverlayModalWidget
Source§fn build(&self, ctx: &mut BuildCtx<'_>) -> OverlayModalWidget
fn build(&self, ctx: &mut BuildCtx<'_>) -> OverlayModalWidget
Source§fn rebuild(
&self,
prev: &Self,
element: &mut OverlayModalWidget,
ctx: &mut BuildCtx<'_>,
) -> ChangeFlags
fn rebuild( &self, prev: &Self, element: &mut OverlayModalWidget, ctx: &mut BuildCtx<'_>, ) -> ChangeFlags
prev (the previous view of the same type) against the live
element, mutating it in place and reporting what changed.Auto Trait Implementations§
impl<State> !RefUnwindSafe for FullScreenDialogView<State>
impl<State> !Send for FullScreenDialogView<State>
impl<State> !Sync for FullScreenDialogView<State>
impl<State> !UnwindSafe for FullScreenDialogView<State>
impl<State> Freeze for FullScreenDialogView<State>
impl<State> Unpin for FullScreenDialogView<State>
impl<State> UnsafeUnpin for FullScreenDialogView<State>where
Rc<AnyView<State>>: UnsafeUnpin,
Option<Rc<AnyView<State>>>: UnsafeUnpin,
Option<Rc<dyn Fn(&mut State)>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.