pub trait TextCursorExt<This>where
This: TextEditorStateAlg,{
// Required methods
fn insert_text(&mut self, insertion: &str);
fn delete_before_cursor(&mut self);
fn delete_at_cursor(&mut self);
fn move_cursor_left(&mut self);
fn move_cursor_right(&mut self);
fn move_cursor_home(&mut self);
fn move_cursor_end(&mut self);
}Expand description
Derives UTF-8-safe text editing independently of a renderer.
Required Methods§
Sourcefn insert_text(&mut self, insertion: &str)
fn insert_text(&mut self, insertion: &str)
Inserts text at the active cursor and advances past the insertion.
Sourcefn delete_before_cursor(&mut self)
fn delete_before_cursor(&mut self)
Deletes the Unicode scalar immediately preceding the active cursor.
Sourcefn delete_at_cursor(&mut self)
fn delete_at_cursor(&mut self)
Deletes the Unicode scalar at the active cursor.
Sourcefn move_cursor_left(&mut self)
fn move_cursor_left(&mut self)
Moves the active cursor one Unicode scalar to the left.
Sourcefn move_cursor_right(&mut self)
fn move_cursor_right(&mut self)
Moves the active cursor one Unicode scalar to the right.
Sourcefn move_cursor_home(&mut self)
fn move_cursor_home(&mut self)
Moves the active cursor to the beginning of its logical line.
Sourcefn move_cursor_end(&mut self)
fn move_cursor_end(&mut self)
Moves the active cursor to the end of its logical line.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<This> TextCursorExt<This> for Thiswhere
This: TextEditorStateAlg,
Derives UTF-8-safe text editing independently of a renderer.