pub struct HitTester { /* private fields */ }Expand description
Hit tester for finding accessible elements at a point.
Implementations§
Source§impl HitTester
impl HitTester
Sourcepub fn with_tree(tree: AccessibilityTree) -> Self
pub fn with_tree(tree: AccessibilityTree) -> Self
Create a hit tester with an existing tree.
Sourcepub fn tree(&self) -> &AccessibilityTree
pub fn tree(&self) -> &AccessibilityTree
Get the underlying tree.
Sourcepub fn tree_mut(&mut self) -> &mut AccessibilityTree
pub fn tree_mut(&mut self) -> &mut AccessibilityTree
Get mutable access to the tree.
Sourcepub fn hit_test(&self, point: Point) -> Option<&AccessibleNode>
pub fn hit_test(&self, point: Point) -> Option<&AccessibleNode>
Find the deepest accessible element at the given point.
Sourcepub fn hit_test_id(&self, point: Point) -> Option<AccessibleNodeId>
pub fn hit_test_id(&self, point: Point) -> Option<AccessibleNodeId>
Find the ID of the deepest accessible element at the given point.
Sourcepub fn hit_test_all(&self, point: Point) -> Vec<&AccessibleNode>
pub fn hit_test_all(&self, point: Point) -> Vec<&AccessibleNode>
Find all accessible elements at the given point (from topmost to root).
Sourcepub fn hit_test_all_ids(&self, point: Point) -> Vec<AccessibleNodeId>
pub fn hit_test_all_ids(&self, point: Point) -> Vec<AccessibleNodeId>
Find all element IDs at the given point.
Sourcepub fn hit_test_focusable(&self, point: Point) -> Option<&AccessibleNode>
pub fn hit_test_focusable(&self, point: Point) -> Option<&AccessibleNode>
Find the first focusable element at the given point.
Sourcepub fn hit_test_role(
&self,
point: Point,
role: AccessibleRole,
) -> Vec<&AccessibleNode>
pub fn hit_test_role( &self, point: Point, role: AccessibleRole, ) -> Vec<&AccessibleNode>
Find all elements with a specific role at the given point.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HitTester
impl RefUnwindSafe for HitTester
impl Send for HitTester
impl Sync for HitTester
impl Unpin for HitTester
impl UnwindSafe for HitTester
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().