pub struct ModalConfig {
pub position: ModalPosition,
pub backdrop: BackdropConfig,
pub size: ModalSizeConstraints,
pub close_on_backdrop: bool,
pub close_on_escape: bool,
pub hit_id: Option<HitId>,
pub accessibility_name: Option<String>,
pub accessibility_id: Option<u64>,
pub accessibility_container: bool,
}Expand description
Modal configuration.
Fields§
§position: ModalPosition§backdrop: BackdropConfig§size: ModalSizeConstraints§close_on_backdrop: bool§close_on_escape: bool§hit_id: Option<HitId>§accessibility_name: Option<String>Optional accessible name for the semantic dialog container.
accessibility_id: Option<u64>Optional stable identity for the semantic dialog container.
accessibility_container: boolWhether this generic modal should contribute its own Dialog container.
Composite widgets such as the built-in Dialog disable this because they already provide a richer named dialog node from their stateful render path.
Implementations§
Source§impl ModalConfig
impl ModalConfig
pub fn position(self, position: ModalPosition) -> Self
pub fn backdrop(self, backdrop: BackdropConfig) -> Self
pub fn size(self, size: ModalSizeConstraints) -> Self
pub fn close_on_backdrop(self, close: bool) -> Self
pub fn close_on_escape(self, close: bool) -> Self
pub fn hit_id(self, id: HitId) -> Self
Sourcepub fn accessibility_name(self, name: impl Into<String>) -> Self
pub fn accessibility_name(self, name: impl Into<String>) -> Self
Set the accessible name of the generic modal container.
Sourcepub fn accessibility_id(self, id: u64) -> Self
pub fn accessibility_id(self, id: u64) -> Self
Set a stable accessibility identity independent of modal geometry.
Sourcepub fn accessibility_container(self, enabled: bool) -> Self
pub fn accessibility_container(self, enabled: bool) -> Self
Enable or suppress the generic semantic Dialog wrapper.
Trait Implementations§
Source§impl Clone for ModalConfig
impl Clone for ModalConfig
Source§impl Debug for ModalConfig
impl Debug for ModalConfig
Auto Trait Implementations§
impl Freeze for ModalConfig
impl RefUnwindSafe for ModalConfig
impl Send for ModalConfig
impl Sync for ModalConfig
impl Unpin for ModalConfig
impl UnsafeUnpin for ModalConfig
impl UnwindSafe for ModalConfig
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