Trait gtk4::prelude::TextBufferExt
source · [−]pub trait TextBufferExt: 'static {
Show 88 methods
fn add_mark(&self, mark: &impl IsA<TextMark>, where_: &TextIter);
fn add_selection_clipboard(&self, clipboard: &Clipboard);
fn apply_tag(&self, tag: &impl IsA<TextTag>, start: &TextIter, end: &TextIter);
fn apply_tag_by_name(&self, name: &str, start: &TextIter, end: &TextIter);
fn backspace(
&self,
iter: &mut TextIter,
interactive: bool,
default_editable: bool
) -> bool;
fn begin_irreversible_action(&self);
fn begin_user_action(&self);
fn copy_clipboard(&self, clipboard: &Clipboard);
fn create_child_anchor(&self, iter: &mut TextIter) -> TextChildAnchor;
fn create_mark(
&self,
mark_name: Option<&str>,
where_: &TextIter,
left_gravity: bool
) -> TextMark;
fn cut_clipboard(&self, clipboard: &Clipboard, default_editable: bool);
fn delete(&self, start: &mut TextIter, end: &mut TextIter);
fn delete_interactive(
&self,
start_iter: &mut TextIter,
end_iter: &mut TextIter,
default_editable: bool
) -> bool;
fn delete_mark(&self, mark: &impl IsA<TextMark>);
fn delete_mark_by_name(&self, name: &str);
fn delete_selection(&self, interactive: bool, default_editable: bool) -> bool;
fn end_irreversible_action(&self);
fn end_user_action(&self);
fn bounds(&self) -> (TextIter, TextIter);
fn can_redo(&self) -> bool;
fn can_undo(&self) -> bool;
fn char_count(&self) -> i32;
fn enables_undo(&self) -> bool;
fn end_iter(&self) -> TextIter;
fn has_selection(&self) -> bool;
fn get_insert(&self) -> TextMark;
fn iter_at_child_anchor(
&self,
anchor: &impl IsA<TextChildAnchor>
) -> TextIter;
fn iter_at_line(&self, line_number: i32) -> Option<TextIter>;
fn iter_at_line_index(
&self,
line_number: i32,
byte_index: i32
) -> Option<TextIter>;
fn iter_at_line_offset(
&self,
line_number: i32,
char_offset: i32
) -> Option<TextIter>;
fn iter_at_mark(&self, mark: &impl IsA<TextMark>) -> TextIter;
fn iter_at_offset(&self, char_offset: i32) -> TextIter;
fn line_count(&self) -> i32;
fn mark(&self, name: &str) -> Option<TextMark>;
fn max_undo_levels(&self) -> u32;
fn is_modified(&self) -> bool;
fn selection_bound(&self) -> TextMark;
fn selection_bounds(&self) -> Option<(TextIter, TextIter)>;
fn selection_content(&self) -> ContentProvider;
fn slice(
&self,
start: &TextIter,
end: &TextIter,
include_hidden_chars: bool
) -> GString;
fn start_iter(&self) -> TextIter;
fn tag_table(&self) -> TextTagTable;
fn text(
&self,
start: &TextIter,
end: &TextIter,
include_hidden_chars: bool
) -> GString;
fn insert(&self, iter: &mut TextIter, text: &str);
fn insert_at_cursor(&self, text: &str);
fn insert_child_anchor(
&self,
iter: &mut TextIter,
anchor: &impl IsA<TextChildAnchor>
);
fn insert_interactive(
&self,
iter: &mut TextIter,
text: &str,
default_editable: bool
) -> bool;
fn insert_interactive_at_cursor(
&self,
text: &str,
default_editable: bool
) -> bool;
fn insert_markup(&self, iter: &mut TextIter, markup: &str);
fn insert_paintable(
&self,
iter: &mut TextIter,
paintable: &impl IsA<Paintable>
);
fn insert_range(&self, iter: &mut TextIter, start: &TextIter, end: &TextIter);
fn insert_range_interactive(
&self,
iter: &mut TextIter,
start: &TextIter,
end: &TextIter,
default_editable: bool
) -> bool;
fn move_mark(&self, mark: &impl IsA<TextMark>, where_: &TextIter);
fn move_mark_by_name(&self, name: &str, where_: &TextIter);
fn paste_clipboard(
&self,
clipboard: &Clipboard,
override_location: Option<&TextIter>,
default_editable: bool
);
fn place_cursor(&self, where_: &TextIter);
fn redo(&self);
fn remove_all_tags(&self, start: &TextIter, end: &TextIter);
fn remove_selection_clipboard(&self, clipboard: &Clipboard);
fn remove_tag(&self, tag: &impl IsA<TextTag>, start: &TextIter, end: &TextIter);
fn remove_tag_by_name(&self, name: &str, start: &TextIter, end: &TextIter);
fn select_range(&self, ins: &TextIter, bound: &TextIter);
fn set_enable_undo(&self, enable_undo: bool);
fn set_max_undo_levels(&self, max_undo_levels: u32);
fn set_modified(&self, setting: bool);
fn set_text(&self, text: &str);
fn undo(&self);
fn cursor_position(&self) -> i32;
fn connect_apply_tag<F: Fn(&Self, &TextTag, &TextIter, &TextIter) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_begin_user_action<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_delete_range<F: Fn(&Self, &TextIter, &TextIter) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_end_user_action<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_insert_child_anchor<F: Fn(&Self, &TextIter, &TextChildAnchor) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_insert_paintable<F: Fn(&Self, &TextIter, &Paintable) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_mark_deleted<F: Fn(&Self, &TextMark) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_mark_set<F: Fn(&Self, &TextIter, &TextMark) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_modified_changed<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_paste_done<F: Fn(&Self, &Clipboard) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_redo<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_remove_tag<F: Fn(&Self, &TextTag, &TextIter, &TextIter) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_undo<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_can_redo_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_can_undo_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_cursor_position_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_enable_undo_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_has_selection_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Required Methods
source
fn add_selection_clipboard(&self, clipboard: &Clipboard)
source
fn apply_tag_by_name(&self, name: &str, start: &TextIter, end: &TextIter)
source
fn begin_irreversible_action(&self)
source
fn begin_user_action(&self)
source
fn copy_clipboard(&self, clipboard: &Clipboard)
source
fn create_child_anchor(&self, iter: &mut TextIter) -> TextChildAnchor
sourcefn create_mark(
fn create_mark(
&self,
mark_name: Option<&str>,
where_: &TextIter,
left_gravity: bool
) -> TextMark
source
fn cut_clipboard(&self, clipboard: &Clipboard, default_editable: bool)
sourcefn delete_interactive(
fn delete_interactive(
&self,
start_iter: &mut TextIter,
end_iter: &mut TextIter,
default_editable: bool
) -> bool
source
fn delete_mark(&self, mark: &impl IsA<TextMark>)
source
fn delete_mark_by_name(&self, name: &str)
source
fn delete_selection(&self, interactive: bool, default_editable: bool) -> bool
source
fn end_irreversible_action(&self)
source
fn end_user_action(&self)
source
fn char_count(&self) -> i32
source
fn enables_undo(&self) -> bool
source
fn has_selection(&self) -> bool
source
fn get_insert(&self) -> TextMark
source
fn iter_at_child_anchor(&self, anchor: &impl IsA<TextChildAnchor>) -> TextIter
source
fn iter_at_line(&self, line_number: i32) -> Option<TextIter>
source
fn iter_at_mark(&self, mark: &impl IsA<TextMark>) -> TextIter
source
fn iter_at_offset(&self, char_offset: i32) -> TextIter
source
fn line_count(&self) -> i32
source
fn max_undo_levels(&self) -> u32
source
fn is_modified(&self) -> bool
source
fn selection_bound(&self) -> TextMark
source
fn selection_bounds(&self) -> Option<(TextIter, TextIter)>
source
fn selection_content(&self) -> ContentProvider
source
fn start_iter(&self) -> TextIter
source
fn tag_table(&self) -> TextTagTable
source
fn insert_at_cursor(&self, text: &str)
sourcefn insert_child_anchor(
fn insert_child_anchor(
&self,
iter: &mut TextIter,
anchor: &impl IsA<TextChildAnchor>
)
sourcefn insert_interactive(
fn insert_interactive(
&self,
iter: &mut TextIter,
text: &str,
default_editable: bool
) -> bool
source
fn insert_interactive_at_cursor(&self, text: &str, default_editable: bool) -> bool
source
fn insert_markup(&self, iter: &mut TextIter, markup: &str)
source
fn insert_paintable(&self, iter: &mut TextIter, paintable: &impl IsA<Paintable>)
source
fn insert_range(&self, iter: &mut TextIter, start: &TextIter, end: &TextIter)
sourcefn insert_range_interactive(
fn insert_range_interactive(
&self,
iter: &mut TextIter,
start: &TextIter,
end: &TextIter,
default_editable: bool
) -> bool
source
fn move_mark_by_name(&self, name: &str, where_: &TextIter)
sourcefn paste_clipboard(
fn paste_clipboard(
&self,
clipboard: &Clipboard,
override_location: Option<&TextIter>,
default_editable: bool
)
source
fn place_cursor(&self, where_: &TextIter)
source
fn remove_selection_clipboard(&self, clipboard: &Clipboard)
source
fn remove_tag_by_name(&self, name: &str, start: &TextIter, end: &TextIter)
source
fn select_range(&self, ins: &TextIter, bound: &TextIter)
source
fn set_enable_undo(&self, enable_undo: bool)
source
fn set_max_undo_levels(&self, max_undo_levels: u32)
source
fn set_modified(&self, setting: bool)
source
fn cursor_position(&self) -> i32
sourcefn connect_apply_tag<F: Fn(&Self, &TextTag, &TextIter, &TextIter) + 'static>(
fn connect_apply_tag<F: Fn(&Self, &TextTag, &TextIter, &TextIter) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_begin_user_action<F: Fn(&Self) + 'static>(
fn connect_begin_user_action<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
source
fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
sourcefn connect_delete_range<F: Fn(&Self, &TextIter, &TextIter) + 'static>(
fn connect_delete_range<F: Fn(&Self, &TextIter, &TextIter) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_end_user_action<F: Fn(&Self) + 'static>(
fn connect_end_user_action<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_insert_child_anchor<F: Fn(&Self, &TextIter, &TextChildAnchor) + 'static>(
fn connect_insert_child_anchor<F: Fn(&Self, &TextIter, &TextChildAnchor) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_insert_paintable<F: Fn(&Self, &TextIter, &Paintable) + 'static>(
fn connect_insert_paintable<F: Fn(&Self, &TextIter, &Paintable) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_mark_deleted<F: Fn(&Self, &TextMark) + 'static>(
fn connect_mark_deleted<F: Fn(&Self, &TextMark) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_mark_set<F: Fn(&Self, &TextIter, &TextMark) + 'static>(
fn connect_mark_set<F: Fn(&Self, &TextIter, &TextMark) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_modified_changed<F: Fn(&Self) + 'static>(
fn connect_modified_changed<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_paste_done<F: Fn(&Self, &Clipboard) + 'static>(
fn connect_paste_done<F: Fn(&Self, &Clipboard) + 'static>(
&self,
f: F
) -> SignalHandlerId
source
fn connect_redo<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
sourcefn connect_remove_tag<F: Fn(&Self, &TextTag, &TextIter, &TextIter) + 'static>(
fn connect_remove_tag<F: Fn(&Self, &TextTag, &TextIter, &TextIter) + 'static>(
&self,
f: F
) -> SignalHandlerId
source
fn connect_undo<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
sourcefn connect_can_redo_notify<F: Fn(&Self) + 'static>(
fn connect_can_redo_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_can_undo_notify<F: Fn(&Self) + 'static>(
fn connect_can_undo_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_cursor_position_notify<F: Fn(&Self) + 'static>(
fn connect_cursor_position_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_enable_undo_notify<F: Fn(&Self) + 'static>(
fn connect_enable_undo_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_has_selection_notify<F: Fn(&Self) + 'static>(
fn connect_has_selection_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
source