Skip to main content

TextBufferImpl

Trait TextBufferImpl 

Source
pub trait TextBufferImpl: ObjectImpl + ObjectSubclass<Type: IsA<TextBuffer>> {
Show 15 methods // Provided methods fn apply_tag(&self, tag: &TextTag, start: &TextIter, end: &TextIter) { ... } fn begin_user_action(&self) { ... } fn changed(&self) { ... } fn delete_range(&self, start: &mut TextIter, end: &mut TextIter) { ... } fn end_user_action(&self) { ... } fn insert_child_anchor(&self, iter: &mut TextIter, anchor: &TextChildAnchor) { ... } fn insert_paintable(&self, iter: &mut TextIter, paintable: &Paintable) { ... } fn insert_text(&self, iter: &mut TextIter, new_text: &str) { ... } fn mark_deleted(&self, mark: &TextMark) { ... } fn mark_set(&self, location: &TextIter, mark: &TextMark) { ... } fn modified_changed(&self) { ... } fn paste_done(&self, clipboard: &Clipboard) { ... } fn redo(&self) { ... } fn remove_tag(&self, tag: &TextTag, start: &TextIter, end: &TextIter) { ... } fn undo(&self) { ... }
}

Provided Methods§

Source

fn apply_tag(&self, tag: &TextTag, start: &TextIter, end: &TextIter)

signal on @buffer.

The default handler for the signal applies @tag to the given range. @start and @end do not have to be in order.

§tag

a TextTag

§start

one bound of range to be tagged

§end

other bound of range to be tagged

Source

fn begin_user_action(&self)

buffer mutation functions, such as TextBufferExt::insert_interactive(), automatically call begin/end user action around the buffer operations they perform, so there’s no need to add extra calls if you user action consists solely of a single call to one of those functions.

Source

fn changed(&self)

The class handler for the GtkTextBuffer::changed signal.

Source

fn delete_range(&self, start: &mut TextIter, end: &mut TextIter)

The class handler for the GtkTextBuffer::delete-range signal.

Source

fn end_user_action(&self)

Ends a user-visible operation.

Should be paired with a call to TextBufferExt::begin_user_action(). See that function for a full explanation.

Source

fn insert_child_anchor(&self, iter: &mut TextIter, anchor: &TextChildAnchor)

variants do not. E.g. see TextBufferExt::slice() and TextBufferExt::text().

Consider TextBufferExt::create_child_anchor() as a more convenient alternative to this function. The buffer will add a reference to the anchor, so you can unref it after insertion.

§iter

location to insert the anchor

§anchor

a TextChildAnchor

Source

fn insert_paintable(&self, iter: &mut TextIter, paintable: &Paintable)

variants do not. e.g. see TextBufferExt::slice() and TextBufferExt::text().

§iter

location to insert the paintable

§paintable

a gdk::Paintable

Source

fn insert_text(&self, iter: &mut TextIter, new_text: &str)

The class handler for the GtkTextBuffer::insert-text signal.

Source

fn mark_deleted(&self, mark: &TextMark)

The class handler for the GtkTextBuffer::mark-deleted signal.

Source

fn mark_set(&self, location: &TextIter, mark: &TextMark)

The class handler for the GtkTextBuffer::mark-set signal.

Source

fn modified_changed(&self)

The class handler for the GtkTextBuffer::modified-changed signal.

Source

fn paste_done(&self, clipboard: &Clipboard)

The class handler for the GtkTextBuffer::paste-done signal.

Source

fn redo(&self)

Redoes the next redoable action on the buffer, if there is one.

Source

fn remove_tag(&self, tag: &TextTag, start: &TextIter, end: &TextIter)

t have to be in order.

§tag

a TextTag

§start

one bound of range to be untagged

§end

other bound of range to be untagged

Source

fn undo(&self)

Undoes the last undoable action on the buffer, if there is one.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§