Enum zng_view_api::access::AccessCmd
source · #[non_exhaustive]pub enum AccessCmd {
Click(bool),
Focus(bool),
FocusNavOrigin,
SetExpanded(bool),
Increment(i32),
SetToolTipVis(bool),
Scroll(ScrollCmd),
ReplaceSelectedText(Txt),
SelectText {
start: (AccessNodeId, usize),
caret: (AccessNodeId, usize),
},
SetString(Txt),
SetNumber(f64),
}Expand description
Accessibility command.
The command must run in the context of the target widow and widget, see Event::AccessCommand for more details.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Click(bool)
Run the click action on the widget.
If true run the primary (default) action, if false run the context action.
Focus(bool)
Focus or escape focus on the widget.
If true the widget is focused, if false and the widget is already focused does ESC.
Sets the focus navigation origin to the widget.
The navigation origin is the widget that logical and directional focus requests moves from. If not set the focus moves from the current focus, if set it moves from this origin. The origin widget does not need to be focusable and it is not focused by this command.
SetExpanded(bool)
Expand or collapse the widget content.
Increment(i32)
Increment by steps.
Associated value is usually is -1 or 1.
SetToolTipVis(bool)
Show or hide the widget’s tooltip.
Scroll(ScrollCmd)
Scroll command.
ReplaceSelectedText(Txt)
Insert the text.
SelectText
Set the text selection.
The two points are defined by the widget and string byte char index. The start can be before or after (textually). The byte index must be at the start of a grapheme and UTF-8 char.
Fields
start: (AccessNodeId, usize)Selection start.
caret: (AccessNodeId, usize)Selection end, where the caret is positioned.
SetString(Txt)
Replace the value of the control with the specified value and reset the selection, if applicable.
SetNumber(f64)
Replace the value of the control with the specified value and reset the selection, if applicable.