pub struct OverlayState { /* private fields */ }Expand description
Reusable zero-allocation top-layer overlay state owned by LaidOutScene.
Implementations§
Source§impl OverlayState
impl OverlayState
pub fn generation(&self) -> u64
pub fn reconcile_count(&self) -> u64
pub fn anchored_nodes(&self) -> &[NodeId]
pub fn open_overlays(&self) -> &[ResolvedOverlay]
pub fn get(&self, id: NodeId) -> Option<ResolvedOverlay>
pub fn is_open_overlay(&self, id: NodeId) -> bool
pub fn clear(&mut self)
Sourcepub fn topmost_modal(&self) -> Option<NodeId>
pub fn topmost_modal(&self) -> Option<NodeId>
The topmost (last painted) resolved modal.
Sourcepub fn topmost_modal_index(&self) -> Option<usize>
pub fn topmost_modal_index(&self) -> Option<usize>
Paint-order index in Self::open_overlays of the topmost resolved modal, in O(1).
Sourcepub fn is_inert_under_modal(&self, store: &NodeStore, id: NodeId) -> bool
pub fn is_inert_under_modal(&self, store: &NodeStore, id: NodeId) -> bool
true when a modal is resolved and id’s nearest resolved ancestor-or-self overlay is
painted below the topmost modal, or there is none (the background): HTML modal-dialog
inert. O(depth) with an O(1) paint position per hop. Non-modal backdrop scrims block
pointers in hit-testing but make nothing inert.
Trait Implementations§
Source§impl Clone for OverlayState
impl Clone for OverlayState
Source§impl Debug for OverlayState
impl Debug for OverlayState
Auto Trait Implementations§
impl Forget for OverlayState
impl Freeze for OverlayStatewhere
*const u8 is !null: Freeze,
PhantomData<ResolvedOverlay>: Freeze,
PhantomData<u32>: Freeze,
PhantomData<(u64, NodeId)>: Freeze,
PhantomData<NodeId>: Freeze,
impl Move for OverlayState
impl RefUnwindSafe for OverlayState
impl Send for OverlayState
impl Sync for OverlayState
impl Unpin for OverlayState
impl UnsafeUnpin for OverlayStatewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<ResolvedOverlay>: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<(u64, NodeId)>: UnsafeUnpin,
PhantomData<NodeId>: UnsafeUnpin,
impl UnwindSafe for OverlayState
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