pub enum ImeEvent {
Enabled,
Preedit {
text: String,
cursor: Option<(usize, usize)>,
},
Commit(String),
Disabled,
}Expand description
What the platform input method reported, for composing text (Japanese, Chinese, Korean, dead-key accents) into a text field.
Arrives only after the host turns composition on for the window (on
ViewportApp, FrameCtx::set_ime_allowed). While it is on, accepted text
comes as Commit; typing that never composed can still
arrive as ViewportEvent::Character, so a text field takes both.
Variants§
Enabled
Composition is available for the window.
Preedit
The provisional text being composed, to show in the field without
writing it to the document. An empty text clears it.
Fields
Commit(String)
Accepted text, to insert at the caret. Clears any preedit.
Disabled
Composition is off for the window. Drop any preedit still shown.
Trait Implementations§
impl Eq for ImeEvent
impl StructuralPartialEq for ImeEvent
Auto Trait Implementations§
impl Forget for ImeEvent
impl Freeze for ImeEvent
impl Move for ImeEvent
impl RefUnwindSafe for ImeEvent
impl Send for ImeEvent
impl Sync for ImeEvent
impl Unpin for ImeEvent
impl UnsafeUnpin for ImeEvent
impl UnwindSafe for ImeEvent
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
Mutably borrows from an owned value. Read more