pub struct TextCursor {
pub head: usize,
pub tail: usize,
pub max: usize,
}
Fields§
§head: usize
§tail: usize
§max: usize
Implementations§
Source§impl TextCursor
impl TextCursor
pub fn has_selection(&self) -> bool
pub fn order(&self) -> (usize, usize)
pub fn clamp_range(&mut self, range: &Option<(usize, usize)>)
pub fn delta(&self, delta: isize) -> (usize, usize)
pub fn collapse(&mut self, start: usize, end: usize, new_len: usize) -> isize
pub fn calc_max( &mut self, text_buffer: &TextBuffer, old: (TextPos, usize), ) -> (TextPos, usize)
pub fn move_home(&mut self, text_buffer: &TextBuffer)
pub fn move_end(&mut self, text_buffer: &TextBuffer)
pub fn move_left(&mut self, char_count: usize, _text_buffer: &TextBuffer)
pub fn move_right( &mut self, char_count: usize, total_char_count: usize, _text_buffer: &TextBuffer, )
pub fn move_up(&mut self, line_count: usize, text_buffer: &TextBuffer)
pub fn move_down( &mut self, line_count: usize, total_char_count: usize, text_buffer: &TextBuffer, )
Trait Implementations§
Source§impl Clone for TextCursor
impl Clone for TextCursor
Source§fn clone(&self) -> TextCursor
fn clone(&self) -> TextCursor
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 moreSource§impl Debug for TextCursor
impl Debug for TextCursor
Source§impl PartialEq for TextCursor
impl PartialEq for TextCursor
impl StructuralPartialEq for TextCursor
Auto Trait Implementations§
impl Freeze for TextCursor
impl RefUnwindSafe for TextCursor
impl Send for TextCursor
impl Sync for TextCursor
impl Unpin for TextCursor
impl UnwindSafe for TextCursor
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