pub struct OverlaySpec {
pub content: Element,
pub anchor: Anchor,
pub modal: bool,
pub dismiss: Option<ActionId>,
}Expand description
A floating layer drawn above the main tree — a menu, popover, tooltip, or
dialog. Declared during a build via Cx::overlay; the app lays it out at
its Anchor and paints it last (topmost). Its content’s handlers
register through the same Cx, so taps/keys inside it work normally.
Fields§
§content: Element§anchor: Anchor§modal: boolWhen true, a translucent scrim is painted behind the overlay and blocks
pointer events from reaching the main tree (a modal dialog).
dismiss: Option<ActionId>Action fired when the scrim (modal) or the area outside the overlay (non-modal) is pressed — typically a dismiss handler.
Trait Implementations§
Source§impl Clone for OverlaySpec
impl Clone for OverlaySpec
Source§fn clone(&self) -> OverlaySpec
fn clone(&self) -> OverlaySpec
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 Freeze for OverlaySpec
impl RefUnwindSafe for OverlaySpec
impl Send for OverlaySpec
impl Sync for OverlaySpec
impl Unpin for OverlaySpec
impl UnsafeUnpin for OverlaySpec
impl UnwindSafe for OverlaySpec
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