pub struct InputMethodEditor { /* private fields */ }Expand description
Input Method Editor framework.
Provides the state machine and data structures for input composition. Actual input method dictionaries would be loaded from user space.
Implementations§
Source§impl InputMethodEditor
impl InputMethodEditor
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Enable or disable the IME.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if IME is enabled.
Sourcepub fn preedit_cursor(&self) -> usize
pub fn preedit_cursor(&self) -> usize
Get the preedit cursor position.
Sourcepub fn candidates(&self) -> &[ImeCandidate]
pub fn candidates(&self) -> &[ImeCandidate]
Get the candidate list.
Sourcepub fn selected_candidate(&self) -> usize
pub fn selected_candidate(&self) -> usize
Get the selected candidate index.
Sourcepub fn take_committed(&mut self) -> String
pub fn take_committed(&mut self) -> String
Get and clear the committed text.
Sourcepub fn feed_backspace(&mut self)
pub fn feed_backspace(&mut self)
Feed a backspace into the IME.
Sourcepub fn feed_enter(&mut self)
pub fn feed_enter(&mut self)
Feed an Enter key: commit preedit as-is.
Sourcepub fn feed_escape(&mut self)
pub fn feed_escape(&mut self)
Feed Escape: cancel composition.
Sourcepub fn candidate_prev(&mut self)
pub fn candidate_prev(&mut self)
Move candidate selection up.
Sourcepub fn candidate_next(&mut self)
pub fn candidate_next(&mut self)
Move candidate selection down.