pub enum SelectionChangedCause {
Tap,
DoubleTap,
LongPress,
ForcePress,
Keyboard,
Toolbar,
Drag,
StylusHandwriting,
}Expand description
Indicates what triggered the change in selected text (including changes to the cursor location).
Variants§
Tap
The user tapped on the text and that caused the selection (or the location of the cursor) to change.
DoubleTap
The user tapped twice in quick succession on the text and that caused the selection (or the location of the cursor) to change.
LongPress
The user long-pressed the text and that caused the selection (or the location of the cursor) to change.
ForcePress
The user force-pressed the text and that caused the selection (or the location of the cursor) to change.
Keyboard
The user used the keyboard to change the selection or the location of the cursor.
Keyboard-triggered selection changes may be caused by the IME as well as by accessibility tools (e.g. TalkBack on Android).
Toolbar
The user used the selection toolbar to change the selection or the location of the cursor.
An example is when the user taps on select all in the tool bar.
Drag
The user used the mouse to change the selection by dragging over a piece of text.
StylusHandwriting
The user used stylus handwriting to change the selection.
Currently, this is only supported on iPadOS 14+ via the Scribble feature, or on Android API 34+ via the Scribe feature.
Trait Implementations§
Source§impl Clone for SelectionChangedCause
impl Clone for SelectionChangedCause
impl Copy for SelectionChangedCause
Source§impl Debug for SelectionChangedCause
impl Debug for SelectionChangedCause
impl Eq for SelectionChangedCause
Source§impl Hash for SelectionChangedCause
impl Hash for SelectionChangedCause
Source§impl PartialEq for SelectionChangedCause
impl PartialEq for SelectionChangedCause
impl StructuralPartialEq for SelectionChangedCause
Auto Trait Implementations§
impl Freeze for SelectionChangedCause
impl RefUnwindSafe for SelectionChangedCause
impl Send for SelectionChangedCause
impl Sync for SelectionChangedCause
impl Unpin for SelectionChangedCause
impl UnsafeUnpin for SelectionChangedCause
impl UnwindSafe for SelectionChangedCause
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.