[][src]Struct makepad_widget::TextBuffer

pub struct TextBuffer {
    pub lines: Vec<Vec<char>>,
    pub undo_stack: Vec<TextUndo>,
    pub redo_stack: Vec<TextUndo>,
    pub is_loaded: bool,
    pub signal: Signal,
    pub mutation_id: u64,
    pub is_crlf: bool,
    pub messages: TextBufferMessages,
    pub flat_text: Vec<char>,
    pub token_chunks: Vec<TokenChunk>,
    pub token_chunks_id: u64,
    pub keyboard: TextBufferKeyboard,
}

Fields

lines: Vec<Vec<char>>undo_stack: Vec<TextUndo>redo_stack: Vec<TextUndo>is_loaded: boolsignal: Signalmutation_id: u64is_crlf: boolmessages: TextBufferMessagesflat_text: Vec<char>token_chunks: Vec<TokenChunk>token_chunks_id: u64keyboard: TextBufferKeyboard

Methods

impl TextBuffer[src]

impl TextBuffer[src]

pub fn with_signal(cx: &mut Cx) -> Self[src]

pub fn from_utf8(data: &str) -> Self[src]

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

pub fn offset_to_text_pos(&self, char_offset: usize) -> TextPos[src]

pub fn offset_to_text_pos_next(
    &self,
    query_off: usize,
    old_pos: TextPos,
    old_off: usize
) -> TextPos
[src]

pub fn text_pos_to_offset(&self, pos: TextPos) -> usize[src]

pub fn get_nearest_line_range(&self, offset: usize) -> (usize, usize)[src]

pub fn calc_next_line_indent_depth(
    &self,
    offset: usize,
    tabsize: usize
) -> (usize, usize)
[src]

pub fn calc_line_indent_depth(&self, row: usize) -> usize[src]

pub fn calc_backspace_line_indent_depth_and_pair(
    &self,
    offset: usize
) -> (usize, usize)
[src]

pub fn calc_deletion_whitespace(
    &self,
    offset: usize
) -> Option<(usize, usize, usize, usize)>
[src]

pub fn calc_deindent_whitespace(
    &self,
    offset: usize
) -> Option<(usize, usize, usize)>
[src]

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

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

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

pub fn get_range_as_string(&self, start: usize, len: usize, ret: &mut String)[src]

pub fn get_char(&self, start: usize) -> char[src]

pub fn get_as_string(&self) -> String[src]

pub fn send_textbuffer_loaded_signal(&self, cx: &mut Cx)[src]

pub fn load_from_utf8(&mut self, utf8: &str)[src]

pub fn replace_line(
    &mut self,
    row: usize,
    start_col: usize,
    len: usize,
    rep_line: Vec<char>
) -> Vec<char>
[src]

pub fn copy_line(&self, row: usize, start_col: usize, len: usize) -> Vec<char>[src]

pub fn replace_range(
    &mut self,
    start: usize,
    len: usize,
    rep_lines: Vec<Vec<char>>
) -> Vec<Vec<char>>
[src]

pub fn replace_lines(
    &mut self,
    start_row: usize,
    end_row: usize,
    rep_lines: Vec<Vec<char>>
) -> TextOp
[src]

pub fn split_string_to_lines(string: &str) -> Vec<Vec<char>>[src]

pub fn replace_lines_with_string(
    &mut self,
    start: usize,
    len: usize,
    string: &str
) -> TextOp
[src]

pub fn replace_line_with_string(
    &mut self,
    start: usize,
    row: usize,
    col: usize,
    len: usize,
    string: &str
) -> TextOp
[src]

pub fn replace_with_textop(&mut self, text_op: TextOp) -> TextOp[src]

pub fn save_buffer(&mut self)[src]

pub fn undoredo(
    &mut self,
    text_undo: TextUndo,
    cursor_set: &mut TextCursorSet
) -> TextUndo
[src]

pub fn undo(&mut self, grouped: bool, cursor_set: &mut TextCursorSet)[src]

pub fn redo(&mut self, grouped: bool, cursor_set: &mut TextCursorSet)[src]

Trait Implementations

impl Clone for TextBuffer[src]

impl Default for TextBuffer[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]