pub enum TextInputAction {
Used,
Unused,
PressStart {
coord: Coord,
clear: bool,
repeats: u32,
},
PressMove {
coord: Coord,
repeats: u32,
},
PressEnd {
coord: Coord,
},
}Expand description
Result of TextInput::handle
Variants§
Used
Event is used, no action
Unused
Event not used
PressStart
Start of click or selection
The text cursor and selection anchors should be placed at the closest
position to coord.
This corresponds to a mouse click (down). It may be followed by
Self::PressMove and will be concluded by Self::PressMove unless
cancelled by calling TextInput::stop_selecting.
Fields
PressMove
Drag-motion of pointer
This is always preceeded by Self::PressStart.
The text cursor should be placed at the closest position to coord,
creating a selection from the anchor placed by Self::PressStart.
If repeats > 1 then the selection may be expanded (e.g. to word or
line mode).
PressEnd
Release of click or touch event
This may or may not be preceeded by Self::PressStart: touch events
without motion or sufficient delay to enter selection mode will yield
this variant without a preceeding Self::PressStart.
This may or may not be preceeded by Self::PressMove.
Handling should be stateful: if this follows Self::PressMove then it
terminates selection mode. If this is not preceeded by
Self::PressStart then the cursor should be placed at the closest
position to coord. If this is not preceeded by Self::PressMove
then it may be considered a “click” action (e.g. to follow a link).
The widget may wish to request keyboard input focus or IME focus. The widget should set the primary buffer (Unix).
Trait Implementations§
Source§impl Clone for TextInputAction
impl Clone for TextInputAction
Auto Trait Implementations§
impl Freeze for TextInputAction
impl RefUnwindSafe for TextInputAction
impl Send for TextInputAction
impl Sync for TextInputAction
impl Unpin for TextInputAction
impl UnwindSafe for TextInputAction
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
Source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.