Struct zaplib_components::TextBuffer
source · [−]pub struct TextBuffer {Show 14 fields
pub lines: Vec<Vec<char>>,
pub undo_stack: Vec<TextUndo>,
pub redo_stack: Vec<TextUndo>,
pub signal: Signal,
pub mutation_id: u32,
pub is_crlf: bool,
pub markers: TextBufferMarkers,
pub flat_text: Vec<char>,
pub token_chunks: Vec<TokenChunk>,
pub was_invalid_pair: bool,
pub old_flat_text: Vec<char>,
pub old_token_chunks: Vec<TokenChunk>,
pub token_chunks_id: u32,
pub keyboard: TextBufferKeyboard,
}
Fields
lines: Vec<Vec<char>>
undo_stack: Vec<TextUndo>
redo_stack: Vec<TextUndo>
signal: Signal
mutation_id: u32
is_crlf: bool
markers: TextBufferMarkers
flat_text: Vec<char>
token_chunks: Vec<TokenChunk>
was_invalid_pair: bool
old_flat_text: Vec<char>
old_token_chunks: Vec<TokenChunk>
token_chunks_id: u32
keyboard: TextBufferKeyboard
Implementations
pub fn offset_to_text_pos_next(
&self,
query_off: usize,
old_pos: TextPos,
old_off: usize
) -> TextPos
pub fn replace_line(
&mut self,
row: usize,
start_col: usize,
len: usize,
rep_line: Vec<char>
) -> Vec<char>
pub fn replace_range(
&mut self,
start: usize,
len: usize,
rep_lines: Vec<Vec<char>>
) -> Vec<Vec<char>>
pub fn replace_lines(
&mut self,
start_row: usize,
end_row: usize,
rep_lines: Vec<Vec<char>>
) -> TextOp
pub fn replace_lines_with_string(
&mut self,
start: usize,
len: usize,
string: &str
) -> TextOp
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for TextBuffer
impl Send for TextBuffer
impl Sync for TextBuffer
impl Unpin for TextBuffer
impl UnwindSafe for TextBuffer
Blanket Implementations
Mutably borrows from an owned value. Read more