pub struct TextCursorSet {
pub set: Vec<TextCursor>,
pub last_cursor: usize,
pub insert_undo_group: u64,
pub last_clamp_range: Option<(usize, usize)>,
}
Fields§
§set: Vec<TextCursor>
§last_cursor: usize
§insert_undo_group: u64
§last_clamp_range: Option<(usize, usize)>
Implementations§
Source§impl TextCursorSet
impl TextCursorSet
pub fn new() -> TextCursorSet
pub fn get_all_as_string(&self, text_buffer: &TextBuffer) -> String
pub fn add_last_cursor_head_and_tail( &mut self, offset: usize, text_buffer: &TextBuffer, )
pub fn clear_and_set_last_cursor_head_and_tail( &mut self, offset: usize, text_buffer: &TextBuffer, )
pub fn set_last_cursor_head( &mut self, offset: usize, text_buffer: &TextBuffer, ) -> bool
pub fn clear_and_set_last_cursor_head( &mut self, offset: usize, text_buffer: &TextBuffer, )
pub fn get_last_cursor_text_pos(&self, text_buffer: &TextBuffer) -> TextPos
pub fn get_last_cursor_order(&self) -> (usize, usize)
pub fn get_last_cursor_singular(&self) -> Option<usize>
pub fn is_last_cursor_singular(&self) -> bool
pub fn grid_select_corner( &mut self, new_pos: TextPos, text_buffer: &TextBuffer, ) -> TextPos
pub fn grid_select( &mut self, start_pos: TextPos, end_pos: TextPos, text_buffer: &TextBuffer, ) -> bool
pub fn set_last_clamp_range(&mut self, range: (usize, usize))
pub fn clear_last_clamp_range(&mut self)
pub fn insert_newline_with_indent(&mut self, text_buffer: &mut TextBuffer)
pub fn replace_text(&mut self, text: &str, text_buffer: &mut TextBuffer)
pub fn insert_around( &mut self, pre: &str, post: &str, text_buffer: &mut TextBuffer, )
pub fn overwrite_if_exists_or_deindent( &mut self, thing: &str, deindent: usize, text_buffer: &mut TextBuffer, )
pub fn delete(&mut self, text_buffer: &mut TextBuffer)
pub fn backspace(&mut self, text_buffer: &mut TextBuffer, undo_id: u64)
pub fn insert_tab(&mut self, text_buffer: &mut TextBuffer, tab_str: &str)
pub fn replace_lines_formatted( &mut self, out_lines: Vec<Vec<char>>, text_buffer: &mut TextBuffer, )
pub fn remove_tab(&mut self, text_buffer: &mut TextBuffer, num_spaces: usize)
pub fn select_all(&mut self, text_buffer: &mut TextBuffer)
pub fn move_home(&mut self, only_head: bool, text_buffer: &TextBuffer)
pub fn move_end(&mut self, only_head: bool, text_buffer: &TextBuffer)
pub fn move_up( &mut self, line_count: usize, only_head: bool, text_buffer: &TextBuffer, )
pub fn move_down( &mut self, line_count: usize, only_head: bool, text_buffer: &TextBuffer, )
pub fn move_left( &mut self, char_count: usize, only_head: bool, text_buffer: &TextBuffer, )
pub fn move_right( &mut self, char_count: usize, only_head: bool, text_buffer: &TextBuffer, )
pub fn get_nearest_token_chunk_boundary( left: bool, offset: usize, text_buffer: &TextBuffer, ) -> usize
pub fn get_nearest_token_chunk( offset: usize, text_buffer: &TextBuffer, ) -> Option<(usize, usize)>
pub fn move_left_nearest_token( &mut self, only_head: bool, text_buffer: &TextBuffer, )
pub fn move_right_nearest_token( &mut self, only_head: bool, text_buffer: &TextBuffer, )
pub fn get_token_highlight(&self, text_buffer: &TextBuffer) -> Vec<char>
pub fn get_selection_highlight(&self, text_buffer: &TextBuffer) -> Vec<char>
Trait Implementations§
Source§impl Clone for TextCursorSet
impl Clone for TextCursorSet
Source§fn clone(&self) -> TextCursorSet
fn clone(&self) -> TextCursorSet
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TextCursorSet
impl RefUnwindSafe for TextCursorSet
impl Send for TextCursorSet
impl Sync for TextCursorSet
impl Unpin for TextCursorSet
impl UnwindSafe for TextCursorSet
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