[−][src]Struct makepad_widget::TextBuffer
Fields
lines: Vec<Vec<char>>
undo_stack: Vec<TextUndo>
redo_stack: Vec<TextUndo>
is_loaded: bool
signal: Signal
mutation_id: u64
is_crlf: bool
messages: TextBufferMessages
flat_text: Vec<char>
token_chunks: Vec<TokenChunk>
token_chunks_id: u64
keyboard: TextBufferKeyboard
Methods
impl TextBuffer
[src]
pub fn status_loaded() -> StatusId
[src]
pub fn status_message_update() -> StatusId
[src]
pub fn status_jump_to_offset() -> StatusId
[src]
pub fn status_data_update() -> StatusId
[src]
pub fn status_keyboard_update() -> StatusId
[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]
&self,
query_off: usize,
old_pos: TextPos,
old_off: usize
) -> TextPos
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]
&self,
offset: usize,
tabsize: usize
) -> (usize, usize)
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]
&self,
offset: usize
) -> (usize, usize)
pub fn calc_deletion_whitespace(
&self,
offset: usize
) -> Option<(usize, usize, usize, usize)>
[src]
&self,
offset: usize
) -> Option<(usize, usize, usize, usize)>
pub fn calc_deindent_whitespace(
&self,
offset: usize
) -> Option<(usize, usize, usize)>
[src]
&self,
offset: usize
) -> Option<(usize, usize, usize)>
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]
&mut self,
row: usize,
start_col: usize,
len: usize,
rep_line: Vec<char>
) -> Vec<char>
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]
&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
[src]
&mut self,
start_row: usize,
end_row: usize,
rep_lines: Vec<Vec<char>>
) -> TextOp
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]
&mut self,
start: usize,
len: usize,
string: &str
) -> TextOp
pub fn replace_line_with_string(
&mut self,
start: usize,
row: usize,
col: usize,
len: usize,
string: &str
) -> TextOp
[src]
&mut self,
start: usize,
row: usize,
col: usize,
len: usize,
string: &str
) -> TextOp
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]
&mut self,
text_undo: TextUndo,
cursor_set: &mut TextCursorSet
) -> TextUndo
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]
fn clone(&self) -> TextBuffer
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for TextBuffer
[src]
fn default() -> TextBuffer
[src]
Auto Trait Implementations
impl Send for TextBuffer
impl Sync for TextBuffer
impl Unpin for TextBuffer
impl UnwindSafe for TextBuffer
impl RefUnwindSafe for TextBuffer
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,