pub enum Role {
Show 26 variants
None,
Button,
Checkbox,
Radio,
Switch,
Slider,
Tab,
TabList,
Link,
Heading,
List,
ListItem,
Image,
Dialog,
Group,
Window,
TitleBar,
StaticText,
TextInput,
MultilineTextInput,
ScrollView,
Line,
RadioGroup,
Menu,
MenuItem,
Terminal,
}Expand description
What a node is to assistive technology. Most of these a view declares
(role prop; schema::ROLES is that list, and the wire order); the
ones the core derives from a node’s content and behaviour instead are
schema::DERIVED_ONLY, which says what derives each. Every variant is
on one list or the other — schema’s
every_role_is_declarable_or_derived fails when a new one is on
neither.
Variants§
None
Decorative: the node and its whole subtree leave the access tree.
Button
Checkbox
Radio
Switch
Slider
Tab
TabList
Link
Heading
List
ListItem
Image
Dialog
Group
Window
The root, named by the window title.
TitleBar
A window="drag" strip.
StaticText
A text node; its content is its name.
TextInput
A single-line editor; the text is its value. Declared on an
on_key sink that draws its own text, it makes that sink one.
MultilineTextInput
A multiline editor (see Role::TextInput).
ScrollView
A container that scrolls.
Line
One line of a custom editor (a role="textInput" sink): the text
nodes inside it, in order, are that line of the editor’s value,
and its caret / selectionAnchor are byte offsets into it. Not a
node of its own.
RadioGroup
A set of radios: one Tab stop, arrows moving the checked one.
Menu
A menu: one Tab stop, arrows moving focus without activating.
MenuItem
One item of a menu. A control, so it is focusable by its role and
an unnamed one is reported.
Terminal
A cell grid (crate::cells): the screen of a terminal, its rows
joined as the value. Derived from the node.
Implementations§
Trait Implementations§
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.