pub struct AccessibilityTree { /* private fields */ }Expand description
Accessibility tree for hit testing and navigation.
Implementations§
Source§impl AccessibilityTree
impl AccessibilityTree
Sourcepub fn next_id(&mut self) -> AccessibleNodeId
pub fn next_id(&mut self) -> AccessibleNodeId
Generate a new unique node ID.
Sourcepub fn set_root(&mut self, id: AccessibleNodeId)
pub fn set_root(&mut self, id: AccessibleNodeId)
Set the root node.
Sourcepub fn root(&self) -> Option<&AccessibleNode>
pub fn root(&self) -> Option<&AccessibleNode>
Get the root node.
Sourcepub fn get(&self, id: AccessibleNodeId) -> Option<&AccessibleNode>
pub fn get(&self, id: AccessibleNodeId) -> Option<&AccessibleNode>
Get a node by ID.
Sourcepub fn get_mut(&mut self, id: AccessibleNodeId) -> Option<&mut AccessibleNode>
pub fn get_mut(&mut self, id: AccessibleNodeId) -> Option<&mut AccessibleNode>
Get a mutable node by ID.
Sourcepub fn insert(&mut self, node: AccessibleNode)
pub fn insert(&mut self, node: AccessibleNode)
Insert a node into the tree.
Sourcepub fn remove(&mut self, id: AccessibleNodeId) -> Option<AccessibleNode>
pub fn remove(&mut self, id: AccessibleNodeId) -> Option<AccessibleNode>
Remove a node from the tree.
Sourcepub fn focused(&self) -> Option<&AccessibleNode>
pub fn focused(&self) -> Option<&AccessibleNode>
Get the currently focused node.
Sourcepub fn focused_id(&self) -> Option<AccessibleNodeId>
pub fn focused_id(&self) -> Option<AccessibleNodeId>
Get the currently focused node ID.
Sourcepub fn set_focus(&mut self, id: AccessibleNodeId) -> bool
pub fn set_focus(&mut self, id: AccessibleNodeId) -> bool
Set focus to a node.
Sourcepub fn clear_focus(&mut self)
pub fn clear_focus(&mut self)
Clear focus.
Sourcepub fn focus_next(&mut self) -> Option<AccessibleNodeId>
pub fn focus_next(&mut self) -> Option<AccessibleNodeId>
Move focus to the next focusable element.
Sourcepub fn focus_previous(&mut self) -> Option<AccessibleNodeId>
pub fn focus_previous(&mut self) -> Option<AccessibleNodeId>
Move focus to the previous focusable element.
Sourcepub fn get_focus_order(&mut self) -> &[AccessibleNodeId]
pub fn get_focus_order(&mut self) -> &[AccessibleNodeId]
Get the focus order.
Trait Implementations§
Source§impl Debug for AccessibilityTree
impl Debug for AccessibilityTree
Source§impl Default for AccessibilityTree
impl Default for AccessibilityTree
Source§fn default() -> AccessibilityTree
fn default() -> AccessibilityTree
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AccessibilityTree
impl RefUnwindSafe for AccessibilityTree
impl Send for AccessibilityTree
impl Sync for AccessibilityTree
impl Unpin for AccessibilityTree
impl UnwindSafe for AccessibilityTree
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().