pub struct DialogProperties {
pub on_dismiss_request: Option<Rc<dyn Fn()>>,
pub dismiss_on_click_outside: bool,
pub dismiss_on_back_press: bool,
}Expand description
Configuration for dialog dismiss behavior.
Mirrors Compose’s DialogProperties.
Fields§
§on_dismiss_request: Option<Rc<dyn Fn()>>Called when the user attempts to dismiss the dialog
(scrim click, Escape/Back press). When set, this overrides state.dismiss().
To make a dialog that never closes, pass Some(Rc::new(|| {})).
dismiss_on_click_outside: boolWhether clicking the scrim (outside the dialog surface) triggers dismissal.
Default: true.
dismiss_on_back_press: boolWhether pressing Escape (or Back gesture) triggers dismissal.
Default: true.
Trait Implementations§
Source§impl Clone for DialogProperties
impl Clone for DialogProperties
Source§fn clone(&self) -> DialogProperties
fn clone(&self) -> DialogProperties
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DialogProperties
impl !Send for DialogProperties
impl !Sync for DialogProperties
impl !UnwindSafe for DialogProperties
impl Freeze for DialogProperties
impl Unpin for DialogProperties
impl UnsafeUnpin for DialogProperties
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