pub struct ModalScope { /* private fields */ }Expand description
A Dialog or a Sheet and its builder: open seeds the Renderer’s own open state,
and on_dismiss says once that the user asked to close it.
Implementations§
Source§impl ModalScope
impl ModalScope
pub fn on_dismiss(self, handler: impl FnMut() + 'static) -> Self
Sourcepub fn scrim(self, paint: impl Into<Paint>) -> Self
pub fn scrim(self, paint: impl Into<Paint>) -> Self
Sets the modal scrim colour, overriding the design system default.
Sourcepub fn max_height_fraction(self, fraction: f32) -> Self
pub fn max_height_fraction(self, fraction: f32) -> Self
The tallest the sheet grows, as a fraction of the window’s height, above 0 and at most 1.
Below it the sheet is as tall as its content; content taller than that stops the
sheet at the fraction and scrolls inside it. A fraction above 1 is taken as 1, and
one that is not above 0 is not sent, which leaves the height to the design system
as it is without this call. A Dialog sizes itself to its content and does not
take it.
Source§impl ModalScope
impl ModalScope
Trait Implementations§
Source§impl Drop for ModalScope
impl Drop for ModalScope
Auto Trait Implementations§
impl !RefUnwindSafe for ModalScope
impl !Send for ModalScope
impl !Sync for ModalScope
impl !UnwindSafe for ModalScope
impl Forget for ModalScope
impl Freeze for ModalScope
impl Move for ModalScope
impl Unpin for ModalScope
impl UnsafeUnpin for ModalScope
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
Mutably borrows from an owned value. Read more