TextBuffer
Stores text and attributes for display in a GtkTextView
.
You may wish to begin by reading the section-text-widget.html, which gives an overview of all the objects and data types related to the text widget and how they work together.
GtkTextBuffer can support undoing changes to the buffer content, see method@Gtk.TextBuffer.set_enable_undo.
Skipped during bindings generation
method
cursor-position
: Property has no getter nor settermethod
text
: Property has no getter nor setter
Constructors
Properties
Functions
Adds a callback@Gtk.TextBufferCommitNotify to be called when a change is to be made to the type@Gtk.TextBuffer.
Adds @clipboard to the list of clipboards in which the selection contents of @buffer are available.
Emits the “apply-tag” signal on @buffer.
Denotes the beginning of an action that may not be undone.
Called to indicate that the buffer operations between here and a call to gtk_text_buffer_end_user_action() are part of a single user-visible operation.
Emitted to apply a tag to a range of text in a GtkTextBuffer
.
Emitted at the beginning of a single user-visible operation on a GtkTextBuffer
.
Emitted when the content of a GtkTextBuffer
has changed.
Emitted to delete a range from a GtkTextBuffer
.
Emitted at the end of a single user-visible operation on the GtkTextBuffer
.
Emitted to insert a GtkTextChildAnchor
in a GtkTextBuffer
.
Emitted to insert a GdkPaintable
in a GtkTextBuffer
.
Emitted to insert text in a GtkTextBuffer
.
Emitted as notification after a GtkTextMark
is deleted.
Emitted as notification after a GtkTextMark
is set.
Emitted when the modified bit of a GtkTextBuffer
flips.
Emitted after paste operation has been completed.
Emitted when a request has been made to redo the previously undone operation.
Emitted to remove all occurrences of @tag from a range of text in a GtkTextBuffer
.
Emitted when a request has been made to undo the previous operation or set of operations that have been grouped together.
Copies the currently-selected text to a clipboard.
Creates and inserts a child anchor.
Creates a mark at position @where.
Copies the currently-selected text to a clipboard, then deletes said text if it’s editable.
Deletes all editable text in the given range.
Deletes @mark, so that it’s no longer located anywhere in the buffer.
Deletes the mark named @name; the mark must exist.
Deletes the range between the “insert” and “selection_bound” marks, that is, the currently-selected text.
Denotes the end of an action that may not be undone.
Ends a user-visible operation.
Gets whether there is a redoable action in the history.
Gets whether there is an undoable action in the history.
Gets the number of characters in the buffer.
Gets whether the buffer is saving modifications to the buffer to allow for undo and redo actions.
Initializes @iter with the “end iterator,” one past the last valid character in the text buffer.
Indicates whether the buffer has some text currently selected.
Obtains the location of @anchor within @buffer.
Initializes @iter to the start of the given line.
Obtains an iterator pointing to @byte_index within the given line.
Obtains an iterator pointing to @char_offset within the given line.
Initializes @iter with the current position of @mark.
Initializes @iter to a position @char_offset chars from the start of the entire buffer.
Obtains the number of lines in the buffer.
Gets the maximum number of undo levels to perform.
Indicates whether the buffer has been modified since the last call to method@Gtk.TextBuffer.set_modified set the modification flag to false.
Returns the mark that represents the selection bound.
Returns true if some text is selected; places the bounds of the selection in @start and @end.
Get a content provider for this buffer.
Initialized @iter with the first position in the text buffer.
Get the GtkTextTagTable
associated with this buffer.
Inserts @text in @buffer.
Inserts a child widget anchor into the text buffer at @iter.
Inserts @text in @buffer.
Inserts the text in @markup at position @iter.
Inserts an image into the text buffer at @iter.
Copies text, tags, and paintables between @start and @end and inserts the copy at @iter.
Moves the mark named @name (which must exist) to location @where.
Pastes the contents of a clipboard.
This function moves the “insert” and “selection_bound” marks simultaneously.
Removes all tags in the range between @start and @end.
Removes the GtkTextBufferCommitNotify
handler previously registered with method@Gtk.TextBuffer.add_commit_notify.
Removes a GdkClipboard
added with method@Gtk.TextBuffer.add_selection_clipboard
Emits the “remove-tag” signal.
This function moves the “insert” and “selection_bound” marks simultaneously.
Sets whether or not to enable undoable actions in the text buffer.
Sets the maximum number of undo levels to perform.
Used to keep track of whether the buffer has been modified since the last time it was saved.
Deletes current contents of @buffer, and inserts @text instead. This is automatically marked as an irreversible action in the undo stack. If you wish to mark this action as part of a larger undo operation, call method@TextBuffer.delete and method@TextBuffer.insert directly instead.
Deletes current contents of @buffer, and inserts @text instead. This is automatically marked as an irreversible action in the undo stack. If you wish to mark this action as part of a larger undo operation, call method@TextBuffer.delete and method@TextBuffer.insert directly instead.