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.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AccessCmd
impl<'de> Deserialize<'de> for AccessCmd
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl IntoValue<Option<AccessCmd>> for AccessCmd
impl StructuralPartialEq for AccessCmd
Auto Trait Implementations§
impl Freeze for AccessCmd
impl RefUnwindSafe for AccessCmd
impl Send for AccessCmd
impl Sync for AccessCmd
impl Unpin for AccessCmd
impl UnwindSafe for AccessCmd
Blanket Implementations§
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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