accesskit_consumer

Struct Node

source
pub struct Node<'a> {
    pub tree_state: &'a State,
    /* private fields */
}

Fields§

§tree_state: &'a State

Implementations§

source§

impl<'a> Node<'a>

source

pub fn is_focused(&self) -> bool

source

pub fn is_focusable(&self) -> bool

source

pub fn is_root(&self) -> bool

source

pub fn parent_id(&self) -> Option<NodeId>

source

pub fn parent(&self) -> Option<Node<'a>>

source

pub fn filtered_parent( &self, filter: &impl Fn(&Node<'_>) -> FilterResult, ) -> Option<Node<'a>>

source

pub fn parent_and_index(self) -> Option<(Node<'a>, usize)>

source

pub fn child_ids( &self, ) -> impl DoubleEndedIterator<Item = NodeId> + ExactSizeIterator<Item = NodeId> + FusedIterator<Item = NodeId> + '_

source

pub fn children( &self, ) -> impl DoubleEndedIterator<Item = Node<'a>> + ExactSizeIterator<Item = Node<'a>> + FusedIterator<Item = Node<'a>> + 'a

source

pub fn filtered_children( &self, filter: impl Fn(&Node<'_>) -> FilterResult + 'a, ) -> impl DoubleEndedIterator<Item = Node<'a>> + FusedIterator<Item = Node<'a>> + 'a

source

pub fn following_sibling_ids( &self, ) -> impl DoubleEndedIterator<Item = NodeId> + ExactSizeIterator<Item = NodeId> + FusedIterator<Item = NodeId> + 'a

source

pub fn following_siblings( &self, ) -> impl DoubleEndedIterator<Item = Node<'a>> + ExactSizeIterator<Item = Node<'a>> + FusedIterator<Item = Node<'a>> + 'a

source

pub fn following_filtered_siblings( &self, filter: impl Fn(&Node<'_>) -> FilterResult + 'a, ) -> impl DoubleEndedIterator<Item = Node<'a>> + FusedIterator<Item = Node<'a>> + 'a

source

pub fn preceding_sibling_ids( &self, ) -> impl DoubleEndedIterator<Item = NodeId> + ExactSizeIterator<Item = NodeId> + FusedIterator<Item = NodeId> + 'a

source

pub fn preceding_siblings( &self, ) -> impl DoubleEndedIterator<Item = Node<'a>> + ExactSizeIterator<Item = Node<'a>> + FusedIterator<Item = Node<'a>> + 'a

source

pub fn preceding_filtered_siblings( &self, filter: impl Fn(&Node<'_>) -> FilterResult + 'a, ) -> impl DoubleEndedIterator<Item = Node<'a>> + FusedIterator<Item = Node<'a>> + 'a

source

pub fn deepest_first_child(self) -> Option<Node<'a>>

source

pub fn deepest_first_filtered_child( &self, filter: &impl Fn(&Node<'_>) -> FilterResult, ) -> Option<Node<'a>>

source

pub fn deepest_last_child(self) -> Option<Node<'a>>

source

pub fn deepest_last_filtered_child( &self, filter: &impl Fn(&Node<'_>) -> FilterResult, ) -> Option<Node<'a>>

source

pub fn is_descendant_of(&self, ancestor: &Node<'_>) -> bool

source

pub fn direct_transform(&self) -> Affine

Returns the transform defined directly on this node, or the identity transform, without taking into account transforms on ancestors.

source

pub fn transform(&self) -> Affine

Returns the combined affine transform of this node and its ancestors, up to and including the root of this node’s tree.

source

pub fn raw_bounds(&self) -> Option<Rect>

source

pub fn has_bounds(&self) -> bool

source

pub fn bounding_box(&self) -> Option<Rect>

Returns the node’s transformed bounding box relative to the tree’s container (e.g. window).

source

pub fn node_at_point( &self, point: Point, filter: &impl Fn(&Node<'_>) -> FilterResult, ) -> Option<Node<'a>>

Returns the deepest filtered node, either this node or a descendant, at the given point in this node’s coordinate space.

source

pub fn id(&self) -> NodeId

source

pub fn role(&self) -> Role

source

pub fn role_description(&self) -> Option<String>

source

pub fn has_role_description(&self) -> bool

source

pub fn is_hidden(&self) -> bool

source

pub fn is_disabled(&self) -> bool

source

pub fn is_read_only(&self) -> bool

source

pub fn is_read_only_or_disabled(&self) -> bool

source

pub fn toggled(&self) -> Option<Toggled>

source

pub fn numeric_value(&self) -> Option<f64>

source

pub fn min_numeric_value(&self) -> Option<f64>

source

pub fn max_numeric_value(&self) -> Option<f64>

source

pub fn numeric_value_step(&self) -> Option<f64>

source

pub fn numeric_value_jump(&self) -> Option<f64>

source

pub fn is_text_input(&self) -> bool

source

pub fn is_multiline(&self) -> bool

source

pub fn orientation(&self) -> Option<Orientation>

source

pub fn default_action_verb(&self) -> Option<DefaultActionVerb>

source

pub fn is_clickable(&self) -> bool

source

pub fn supports_toggle(&self) -> bool

source

pub fn supports_expand_collapse(&self) -> bool

source

pub fn is_invocable(&self) -> bool

source

pub fn supports_increment(&self) -> bool

source

pub fn supports_decrement(&self) -> bool

source§

impl<'a> Node<'a>

source

pub fn labelled_by( &self, ) -> impl DoubleEndedIterator<Item = Node<'a>> + FusedIterator<Item = Node<'a>> + 'a

source

pub fn name(&self) -> Option<String>

source

pub fn description(&self) -> Option<String>

source

pub fn placeholder(&self) -> Option<String>

source

pub fn value(&self) -> Option<String>

source

pub fn has_value(&self) -> bool

source

pub fn is_read_only_supported(&self) -> bool

source

pub fn should_have_read_only_state_by_default(&self) -> bool

source

pub fn live(&self) -> Live

source

pub fn is_selected(&self) -> Option<bool>

source

pub fn raw_text_selection(&self) -> Option<&TextSelection>

source

pub fn raw_value(&self) -> Option<&str>

source

pub fn author_id(&self) -> Option<&str>

source

pub fn class_name(&self) -> Option<&str>

source

pub fn index_path(&self) -> Vec<usize>

source

pub fn relative_index_path(&self, ancestor_id: NodeId) -> Vec<usize>

source§

impl<'a> Node<'a>

source

pub fn supports_text_ranges(&self) -> bool

source

pub fn document_range(&self) -> Range<'_>

source

pub fn has_text_selection(&self) -> bool

source

pub fn text_selection(&self) -> Option<Range<'_>>

source

pub fn text_selection_focus(&self) -> Option<Position<'_>>

source

pub fn text_position_at_point(&self, point: Point) -> Position<'_>

Returns the nearest text position to the given point in this node’s coordinate space.

source

pub fn line_range_from_index(&self, line_index: usize) -> Option<Range<'_>>

source

pub fn text_position_from_global_usv_index( &self, index: usize, ) -> Option<Position<'_>>

source

pub fn text_position_from_global_utf16_index( &self, index: usize, ) -> Option<Position<'_>>

Trait Implementations§

source§

impl<'a> Clone for Node<'a>

source§

fn clone(&self) -> Node<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Copy for Node<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Node<'a>

§

impl<'a> RefUnwindSafe for Node<'a>

§

impl<'a> Send for Node<'a>

§

impl<'a> Sync for Node<'a>

§

impl<'a> Unpin for Node<'a>

§

impl<'a> UnwindSafe for Node<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.