pub struct HitTester<Id> { /* private fields */ }Expand description
A per-frame registry of (Rect, Id) pairs, queried by pointer position
to find the topmost widget under a point.
Standalone and headless – no Backend
dependency, so it’s usable (and unit-testable) without a
Terminal or any drawing at all, e.g. for
hand-rolled hit-testing outside of Interaction.
Registrations are draw-ordered: a later push means drawn
(and therefore visually on top) later, so topmost_at
scans back-to-front and returns the last match. This mirrors the
painter’s algorithm every widget in this crate already draws with.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<Id> Freeze for HitTester<Id>
impl<Id> RefUnwindSafe for HitTester<Id>where
Id: RefUnwindSafe,
impl<Id> Send for HitTester<Id>where
Id: Send,
impl<Id> Sync for HitTester<Id>where
Id: Sync,
impl<Id> Unpin for HitTester<Id>where
Id: Unpin,
impl<Id> UnsafeUnpin for HitTester<Id>
impl<Id> UnwindSafe for HitTester<Id>where
Id: UnwindSafe,
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