pub struct AccessibilityTreeBuilder { /* private fields */ }Expand description
Builder for constructing accessibility trees.
Implementations§
Source§impl AccessibilityTreeBuilder
impl AccessibilityTreeBuilder
Sourcepub fn root(self, role: AccessibleRole, bounds: Rect) -> Self
pub fn root(self, role: AccessibleRole, bounds: Rect) -> Self
Add a root node.
Sourcepub fn child(
self,
role: AccessibleRole,
bounds: Rect,
) -> (Self, AccessibleNodeId)
pub fn child( self, role: AccessibleRole, bounds: Rect, ) -> (Self, AccessibleNodeId)
Add a child node to the current parent.
Sourcepub fn push_child(self, role: AccessibleRole, bounds: Rect) -> Self
pub fn push_child(self, role: AccessibleRole, bounds: Rect) -> Self
Add a child and descend into it.
Sourcepub fn configure<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut AccessibleNode),
pub fn configure<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut AccessibleNode),
Configure the current node.
Sourcepub fn build(self) -> AccessibilityTree
pub fn build(self) -> AccessibilityTree
Build the tree.