pub struct ImeArgs {
pub timestamp: DInstant,
pub target: WidgetPath,
pub txt: Txt,
pub preview_caret: Option<(usize, usize)>,
/* private fields */
}
Expand description
Arguments for IME_EVENT
.
Fields§
§timestamp: DInstant
Instant the event happened.
target: WidgetPath
The enabled text input widget.
txt: Txt
The text, preview or actual insert.
preview_caret: Option<(usize, usize)>
Caret/selection within the txt
when it is preview.
The indexes are in char byte offsets and indicate where the caret or selection must be placed on
the inserted or preview txt
, if not set the position is at the end of the insert.
If this is None
the text must commit
.
Implementations§
source§impl ImeArgs
impl ImeArgs
source§impl ImeArgs
impl ImeArgs
sourcepub fn commit(&self) -> bool
pub fn commit(&self) -> bool
If the text must be actually inserted.
If true
the txt
must be actually inserted at the last non-preview caret/selection, the caret then must be moved to
after the inserted text.
If false
the widget must visually adjust the text and caret to look as if the input has committed, but the
actual text must not be altered, and if the txt
is empty the previous caret/selection must be restored.
Usually the preview text is rendered with an underline effect, otherwise it has the same appearance as the
committed text.
Trait Implementations§
source§impl AnyEventArgs for ImeArgs
impl AnyEventArgs for ImeArgs
source§fn delivery_list(&self, list: &mut UpdateDeliveryList)
fn delivery_list(&self, list: &mut UpdateDeliveryList)
Target.
source§fn clone_any(&self) -> Box<dyn AnyEventArgs>
fn clone_any(&self) -> Box<dyn AnyEventArgs>
source§fn propagation(&self) -> &EventPropagationHandle
fn propagation(&self) -> &EventPropagationHandle
Auto Trait Implementations§
impl Freeze for ImeArgs
impl RefUnwindSafe for ImeArgs
impl Send for ImeArgs
impl Sync for ImeArgs
impl Unpin for ImeArgs
impl UnwindSafe for ImeArgs
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<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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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