pub struct CompositionHitTestAabbTree { /* private fields */ }Expand description
An index of the children of a visual for hit testing: the children are grouped into buckets by their order, and each bucket is a dynamic tree of axis-aligned bounding boxes.
Implementations§
Source§impl CompositionHitTestAabbTree
impl CompositionHitTestAabbTree
pub fn new(children: Rc<CompositionVisualCollection>) -> Self
pub fn clear(&mut self)
pub fn update(&mut self, visual: &Rc<CompositionVisual>, order: i32)
pub fn remove(&mut self, visual: &Rc<CompositionVisual>)
pub fn update_order(&mut self, visual: &Rc<CompositionVisual>, order: i32)
Sourcepub fn query<H: ICompositionHitTester>(
&mut self,
input: &H::Input,
results: &mut Vec<Rc<CompositionVisual>>,
readback_revision: u64,
)
pub fn query<H: ICompositionHitTester>( &mut self, input: &H::Input, results: &mut Vec<Rc<CompositionVisual>>, readback_revision: u64, )
Appends the children that may be hit by input to results,
topmost first.
Sourcepub fn query_first<H: ICompositionHitTester>(
&mut self,
target: &CompositionTarget,
input: &H::Input,
filter: Option<&'_ dyn Fn(&Rc<CompositionVisual>) -> bool>,
result_filter: Option<&'_ dyn Fn(&Rc<CompositionVisual>) -> bool>,
readback_revision: u64,
) -> (Option<Rc<CompositionVisual>>, IntersectionResult)
pub fn query_first<H: ICompositionHitTester>( &mut self, target: &CompositionTarget, input: &H::Input, filter: Option<&'_ dyn Fn(&Rc<CompositionVisual>) -> bool>, result_filter: Option<&'_ dyn Fn(&Rc<CompositionVisual>) -> bool>, readback_revision: u64, ) -> (Option<Rc<CompositionVisual>>, IntersectionResult)
Finds the topmost hit among the children that may be hit by
input.
Auto Trait Implementations§
impl !RefUnwindSafe for CompositionHitTestAabbTree
impl !Send for CompositionHitTestAabbTree
impl !Sync for CompositionHitTestAabbTree
impl !UnwindSafe for CompositionHitTestAabbTree
impl Freeze for CompositionHitTestAabbTree
impl Unpin for CompositionHitTestAabbTree
impl UnsafeUnpin for CompositionHitTestAabbTree
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more