pub struct TextEdit {
pub preedit: String,
pub preedit_cursor: Option<usize>,
/* private fields */
}Fields§
§preedit: String§preedit_cursor: Option<usize>Implementations§
Source§impl TextEdit
impl TextEdit
pub fn at_end(text: &str) -> Self
pub fn caret(&self, text: &str) -> usize
pub fn anchor(&self, text: &str) -> usize
pub fn position(&self, text: &str) -> TextPosition
pub fn place_caret( &mut self, text: &str, position: TextPosition, selecting: bool, )
pub fn set_selection(&mut self, text: &str, anchor: usize, focus: TextPosition)
pub fn selection(&self, text: &str) -> Range<usize> ⓘ
pub fn set_preedit(&mut self, value: String, cursor: Option<(usize, usize)>)
Sourcepub fn apply(&mut self, text: &str, action: EditAction<'_>) -> Option<String>
pub fn apply(&mut self, text: &str, action: EditAction<'_>) -> Option<String>
Return a replacement value for actions that change the committed text.
pub fn apply_multiline( &mut self, text: &str, action: EditAction<'_>, ) -> Option<String>
Trait Implementations§
Auto Trait Implementations§
impl Forget for TextEdit
impl Freeze for TextEdit
impl Move for TextEdit
impl RefUnwindSafe for TextEdit
impl Send for TextEdit
impl Sync for TextEdit
impl Unpin for TextEdit
impl UnsafeUnpin for TextEdit
impl UnwindSafe for TextEdit
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