Struct freya_testing::AccessibilityState
pub struct AccessibilityState {
pub nodes: Vec<(NodeId, Node), Global>,
pub node_classes: NodeClassSet,
pub focused_id: NodeId,
}
Expand description
Manages the Accessibility integration.
Fields§
§nodes: Vec<(NodeId, Node), Global>
Accessibility Nodes
node_classes: NodeClassSet
Accessibility tree
focused_id: NodeId
Current focused Accessibility Node.
Implementations§
§impl AccessibilityState
impl AccessibilityState
pub fn new(focused_id: NodeId) -> AccessibilityState
pub fn wrap(self) -> Arc<Mutex<AccessibilityState>, Global>
pub fn wrap(self) -> Arc<Mutex<AccessibilityState>, Global>
Wrap it in a Arc<Mutex<T>>
.
pub fn clear(&mut self)
pub fn clear(&mut self)
Clear the Accessibility Nodes.
Trait Implementations§
§impl AccessibilityProvider for AccessibilityState
impl AccessibilityProvider for AccessibilityState
§fn node_classes(&mut self) -> &mut NodeClassSet
fn node_classes(&mut self) -> &mut NodeClassSet
Mutable reference to the NodeClassSet.
§fn add_node(
&mut self,
dioxus_node: &NodeRef<'_, CustomAttributeValues>,
node_areas: &NodeAreas,
accessibility_id: NodeId,
node_accessibility: &AccessibilityNodeState
)
fn add_node( &mut self, dioxus_node: &NodeRef<'_, CustomAttributeValues>, node_areas: &NodeAreas, accessibility_id: NodeId, node_accessibility: &AccessibilityNodeState )
Add a Node to the Accessibility Tree.
§fn set_focus_with_update(&mut self, new_focus_id: NodeId) -> Option<TreeUpdate>
fn set_focus_with_update(&mut self, new_focus_id: NodeId) -> Option<TreeUpdate>
Update the focused Node ID and generate a TreeUpdate if necessary.
§fn build_root(&mut self, root_name: &str) -> Node
fn build_root(&mut self, root_name: &str) -> Node
Create the root Accessibility Node.
§fn process(&mut self, root_id: NodeId, root_name: &str) -> TreeUpdate
fn process(&mut self, root_id: NodeId, root_name: &str) -> TreeUpdate
Process the Nodes accessibility Tree
§fn set_focus_on_next_node(
&mut self,
direction: AccessibilityFocusDirection
) -> TreeUpdate
fn set_focus_on_next_node( &mut self, direction: AccessibilityFocusDirection ) -> TreeUpdate
Focus the next/previous Node starting from the currently focused Node.
Auto Trait Implementations§
impl RefUnwindSafe for AccessibilityState
impl Send for AccessibilityState
impl Sync for AccessibilityState
impl Unpin for AccessibilityState
impl UnwindSafe for AccessibilityState
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.