[][src]Struct makepad_widget::TextCursorSet

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: usizeinsert_undo_group: u64last_clamp_range: Option<(usize, usize)>

Methods

impl TextCursorSet[src]

pub fn new() -> TextCursorSet[src]

pub fn get_all_as_string(&self, text_buffer: &TextBuffer) -> String[src]

pub fn add_last_cursor_head_and_tail(
    &mut self,
    offset: usize,
    text_buffer: &TextBuffer
)
[src]

pub fn clear_and_set_last_cursor_head_and_tail(
    &mut self,
    offset: usize,
    text_buffer: &TextBuffer
)
[src]

pub fn set_last_cursor_head(
    &mut self,
    offset: usize,
    text_buffer: &TextBuffer
) -> bool
[src]

pub fn clear_and_set_last_cursor_head(
    &mut self,
    offset: usize,
    text_buffer: &TextBuffer
)
[src]

pub fn get_last_cursor_text_pos(&self, text_buffer: &TextBuffer) -> TextPos[src]

pub fn get_last_cursor_order(&self) -> (usize, usize)[src]

pub fn get_last_cursor_singular(&self) -> Option<usize>[src]

pub fn is_last_cursor_singular(&self) -> bool[src]

pub fn grid_select_corner(
    &mut self,
    new_pos: TextPos,
    text_buffer: &TextBuffer
) -> TextPos
[src]

pub fn grid_select(
    &mut self,
    start_pos: TextPos,
    end_pos: TextPos,
    text_buffer: &TextBuffer
) -> bool
[src]

pub fn set_last_clamp_range(&mut self, range: (usize, usize))[src]

pub fn clear_last_clamp_range(&mut self)[src]

pub fn insert_newline_with_indent(&mut self, text_buffer: &mut TextBuffer)[src]

pub fn replace_text(&mut self, text: &str, text_buffer: &mut TextBuffer)[src]

pub fn insert_around(
    &mut self,
    pre: &str,
    post: &str,
    text_buffer: &mut TextBuffer
)
[src]

pub fn overwrite_if_exists_or_deindent(
    &mut self,
    thing: &str,
    deindent: usize,
    text_buffer: &mut TextBuffer
)
[src]

pub fn delete(&mut self, text_buffer: &mut TextBuffer)[src]

pub fn backspace(&mut self, text_buffer: &mut TextBuffer, undo_id: u64)[src]

pub fn insert_tab(&mut self, text_buffer: &mut TextBuffer, tab_str: &str)[src]

pub fn replace_lines_formatted(
    &mut self,
    out_lines: Vec<Vec<char>>,
    text_buffer: &mut TextBuffer
)
[src]

pub fn remove_tab(&mut self, text_buffer: &mut TextBuffer, num_spaces: usize)[src]

pub fn select_all(&mut self, text_buffer: &mut TextBuffer)[src]

pub fn move_home(&mut self, only_head: bool, text_buffer: &TextBuffer)[src]

pub fn move_end(&mut self, only_head: bool, text_buffer: &TextBuffer)[src]

pub fn move_up(
    &mut self,
    line_count: usize,
    only_head: bool,
    text_buffer: &TextBuffer
)
[src]

pub fn move_down(
    &mut self,
    line_count: usize,
    only_head: bool,
    text_buffer: &TextBuffer
)
[src]

pub fn move_left(
    &mut self,
    char_count: usize,
    only_head: bool,
    text_buffer: &TextBuffer
)
[src]

pub fn move_right(
    &mut self,
    char_count: usize,
    only_head: bool,
    text_buffer: &TextBuffer
)
[src]

pub fn get_nearest_token_chunk_boundary(
    left: bool,
    offset: usize,
    text_buffer: &TextBuffer
) -> usize
[src]

pub fn get_nearest_token_chunk(
    offset: usize,
    text_buffer: &TextBuffer
) -> Option<(usize, usize)>
[src]

pub fn move_left_nearest_token(
    &mut self,
    only_head: bool,
    text_buffer: &TextBuffer
)
[src]

pub fn move_right_nearest_token(
    &mut self,
    only_head: bool,
    text_buffer: &TextBuffer
)
[src]

pub fn get_token_highlight(&self, text_buffer: &TextBuffer) -> Vec<char>[src]

pub fn get_selection_highlight(&self, text_buffer: &TextBuffer) -> Vec<char>[src]

Trait Implementations

impl Clone for TextCursorSet[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]