Struct rerun::external::eframe::egui::accesskit::Node

pub struct Node {
    pub(crate) role: Role,
    pub(crate) actions: u32,
    pub(crate) flags: u32,
    pub(crate) properties: Properties,
}
Expand description

A single accessible object. A complete UI is represented as a tree of these.

For brevity, and to make more of the documentation usable in bindings to other languages, documentation of getter methods is written as if documenting fields in a struct, and such methods are referred to as properties.

Fields§

§role: Role§actions: u32§flags: u32§properties: Properties

Implementations§

§

impl Node

pub fn role(&self) -> Role

§

impl Node

pub fn supports_action(&self, action: Action) -> bool

§

impl Node

pub fn is_hovered(&self) -> bool

pub fn is_hidden(&self) -> bool

Exclude this node and its descendants from the tree presented to assistive technologies, and from hit testing.

pub fn is_linked(&self) -> bool

pub fn is_multiselectable(&self) -> bool

pub fn is_required(&self) -> bool

pub fn is_visited(&self) -> bool

pub fn is_busy(&self) -> bool

pub fn is_live_atomic(&self) -> bool

pub fn is_modal(&self) -> bool

If a dialog box is marked as explicitly modal.

pub fn is_touch_transparent(&self) -> bool

This element allows touches to be passed through when a screen reader is in touch exploration mode, e.g. a virtual keyboard normally behaves this way.

pub fn is_read_only(&self) -> bool

Use for a textbox that allows focus/selection but not input.

pub fn is_disabled(&self) -> bool

Use for a control or group of controls that disallows input.

pub fn is_bold(&self) -> bool

pub fn is_italic(&self) -> bool

pub fn clips_children(&self) -> bool

Indicates that this node clips its children, i.e. may have overflow: hidden or clip children by default.

pub fn is_line_breaking_object(&self) -> bool

Indicates whether this node causes a hard line-break (e.g. block level elements, or <br>).

pub fn is_page_breaking_object(&self) -> bool

Indicates whether this node causes a page break.

pub fn is_spelling_error(&self) -> bool

pub fn is_grammar_error(&self) -> bool

pub fn is_search_match(&self) -> bool

pub fn is_suggestion(&self) -> bool

§

impl Node

pub fn children(&self) -> &[NodeId]

§

impl Node

pub fn controls(&self) -> &[NodeId]

§

impl Node

pub fn details(&self) -> &[NodeId]

§

impl Node

pub fn described_by(&self) -> &[NodeId]

§

impl Node

pub fn flow_to(&self) -> &[NodeId]

§

impl Node

pub fn labelled_by(&self) -> &[NodeId]

§

impl Node

pub fn owns(&self) -> &[NodeId]

As with the aria-owns property in ARIA, this property should be set only if the nodes referenced in the property are not descendants of the owning node in the AccessKit tree. In the common case, where the owned nodes are direct children or indirect descendants, this property is unnecessary.

§

impl Node

pub fn radio_group(&self) -> &[NodeId]

On radio buttons this should be set to a list of all of the buttons in the same group as this one, including this radio button itself.

§

impl Node

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

§

impl Node

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

§

impl Node

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

A single character, usually part of this node’s name, that can be pressed, possibly along with a platform-specific modifier, to perform this node’s default action. For menu items, the access key is only active while the menu is active, in contrast with keyboard_shortcut; a single menu item may in fact have both properties.

§

impl Node

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

A way for application authors to identify this node for automated testing purpose. The value must be unique among this node’s siblings.

§

impl Node

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

§

impl Node

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

Only present when different from parent.

§

impl Node

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

§

impl Node

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

Inner HTML of an element. Only used for a top-level math element, to support third-party math accessibility products that parse MathML.

§

impl Node

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

A keystroke or sequence of keystrokes, complete with any required modifiers(s), that will perform this node’s default action. The value of this property should be in a human-friendly format.

§

impl Node

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

Only present when different from parent.

§

impl Node

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

If a text input has placeholder text, it should be exposed through this property rather than name.

§

impl Node

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

An optional string that may override an assistive technology’s description of the node’s role. Only provide this for custom control types. The value of this property should be in a human-friendly, localized format.

§

impl Node

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

An optional string that may override an assistive technology’s description of the node’s state, replacing default strings such as “checked” or “selected”. Note that most platform accessibility APIs and assistive technologies do not support this feature.

§

impl Node

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

If a node’s only accessible name comes from a tooltip, it should be exposed through this property rather than name.

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

§

impl Node

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

Font size is in pixels.

§

impl Node

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

Font weight can take on any arbitrary numeric value. Increments of 100 in range [0, 900] represent keywords such as light, normal, bold, etc.

§

impl Node

pub fn row_count(&self) -> Option<usize>

§

impl Node

pub fn column_count(&self) -> Option<usize>

§

impl Node

pub fn row_index(&self) -> Option<usize>

§

impl Node

pub fn column_index(&self) -> Option<usize>

§

impl Node

pub fn row_span(&self) -> Option<usize>

§

impl Node

pub fn column_span(&self) -> Option<usize>

§

impl Node

pub fn level(&self) -> Option<usize>

§

impl Node

pub fn size_of_set(&self) -> Option<usize>

§

impl Node

pub fn position_in_set(&self) -> Option<usize>

§

impl Node

pub fn color_value(&self) -> Option<u32>

For Role::ColorWell, specifies the selected color in RGBA.

§

impl Node

pub fn background_color(&self) -> Option<u32>

Background color in RGBA.

§

impl Node

pub fn foreground_color(&self) -> Option<u32>

Foreground color in RGBA.

§

impl Node

pub fn overline(&self) -> Option<TextDecoration>

§

impl Node

§

impl Node

pub fn underline(&self) -> Option<TextDecoration>

§

impl Node

pub fn character_lengths(&self) -> &[u8]

For inline text. The length (non-inclusive) of each character in UTF-8 code units (bytes). The sum of these lengths must equal the length of value, also in bytes.

A character is defined as the smallest unit of text that can be selected. This isn’t necessarily a single Unicode scalar value (code point). This is why AccessKit can’t compute the lengths of the characters from the text itself; this information must be provided by the text editing implementation.

If this node is the last text box in a line that ends with a hard line break, that line break should be included at the end of this node’s value as either a CRLF or LF; in both cases, the line break should be counted as a single character for the sake of this slice. When the caret is at the end of such a line, the focus of the text selection should be on the line break, not after it.

§

impl Node

pub fn word_lengths(&self) -> &[u8]

For inline text. The length of each word in characters, as defined in character_lengths. The sum of these lengths must equal the length of character_lengths.

The end of each word is the beginning of the next word; there are no characters that are not considered part of a word. Trailing whitespace is typically considered part of the word that precedes it, while a line’s leading whitespace is considered its own word. Whether punctuation is considered a separate word or part of the preceding word depends on the particular text editing implementation. Some editors may have their own definition of a word; for example, in an IDE, words may correspond to programming language tokens.

Not all assistive technologies require information about word boundaries, and not all platform accessibility APIs even expose this information, but for assistive technologies that do use this information, users will get unpredictable results if the word boundaries exposed by the accessibility tree don’t match the editor’s behavior. This is why AccessKit does not determine word boundaries itself.

§

impl Node

pub fn character_positions(&self) -> Option<&[f32]>

For inline text. This is the position of each character within the node’s bounding box, in the direction given by text_direction, in the coordinate space of this node.

When present, the length of this slice should be the same as the length of character_lengths, including for lines that end with a hard line break. The position of such a line break should be the position where an end-of-paragraph marker would be rendered.

This property is optional. Without it, AccessKit can’t support some use cases, such as screen magnifiers that track the caret position or screen readers that display a highlight cursor. However, most text functionality still works without this information.

§

impl Node

pub fn character_widths(&self) -> Option<&[f32]>

For inline text. This is the advance width of each character, in the direction given by text_direction, in the coordinate space of this node.

When present, the length of this slice should be the same as the length of character_lengths, including for lines that end with a hard line break. The width of such a line break should be non-zero if selecting the line break by itself results in a visible highlight (as in Microsoft Word), or zero if not (as in Windows Notepad).

This property is optional. Without it, AccessKit can’t support some use cases, such as screen magnifiers that track the caret position or screen readers that display a highlight cursor. However, most text functionality still works without this information.

§

impl Node

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

Whether this node is expanded, collapsed, or neither.

Setting this to false means the node is collapsed; omitting it means this state isn’t applicable.

§

impl Node

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

Indicates whether this node is selected or unselected.

The absence of this flag (as opposed to a false setting) means that the concept of “selected” doesn’t apply. When deciding whether to set the flag to false or omit it, consider whether it would be appropriate for a screen reader to announce “not selected”. The ambiguity of this flag in platform accessibility APIs has made extraneous “not selected” announcements a common annoyance.

§

impl Node

pub fn invalid(&self) -> Option<Invalid>

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

pub fn live(&self) -> Option<Live>

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

pub fn text_direction(&self) -> Option<TextDirection>

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

pub fn sort_direction(&self) -> Option<SortDirection>

pub fn aria_current(&self) -> Option<AriaCurrent>

pub fn auto_complete(&self) -> Option<AutoComplete>

pub fn has_popup(&self) -> Option<HasPopup>

pub fn list_style(&self) -> Option<ListStyle>

The list style type. Only available on list items.

pub fn text_align(&self) -> Option<TextAlign>

pub fn vertical_offset(&self) -> Option<VerticalOffset>

§

impl Node

pub fn transform(&self) -> Option<&Affine>

An affine transform to apply to any coordinates within this node and its descendants, including the bounds property of this node. The combined transforms of this node and its ancestors define the coordinate space of this node. /// This should be None if it would be set to the identity transform, which should be the case for most nodes.

AccessKit expects the final transformed coordinates to be relative to the origin of the tree’s container (e.g. window), in physical pixels, with the y coordinate being top-down.

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

The bounding box of this node, in the node’s coordinate space. This property does not affect the coordinate space of either this node or its descendants; only the transform property affects that. This, along with the recommendation that most nodes should have a transform of None, implies that the bounds property of most nodes should be in the coordinate space of the nearest ancestor with a non-None transform, or if there is no such ancestor, the tree’s container (e.g. window).

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

§

impl Node

pub fn custom_actions(&self) -> &[CustomAction]

Trait Implementations§

§

impl Clone for Node

§

fn clone(&self) -> Node

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
§

impl Debug for Node

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Node

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Node, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl PartialEq for Node

§

fn eq(&self, other: &Node) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Serialize for Node

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StructuralPartialEq for Node

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnwindSafe for Node

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> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

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>) -> Rc<dyn Any>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

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

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<Src, Dst> LosslessTryInto<Dst> for Src
where Dst: LosslessTryFrom<Src>,

source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
source§

impl<Src, Dst> LossyInto<Dst> for Src
where Dst: LossyFrom<Src>,

source§

fn lossy_into(self) -> Dst

Performs the conversion.
source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

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

§

fn to<T>(self) -> T
where Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

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

§

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>,

§

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>,

§

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.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + Serialize + for<'a> Deserialize<'a> + Send + Sync,

§

impl<T> Ungil for T
where T: Send,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T

§

impl<T> WasmNotSync for T
where T: Sync,