TextIter
An iterator for the contents of a GtkTextBuffer
.
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.
Constructors
Functions
Moves backward by one character offset.
Moves @count characters backward, if possible.
Like method@Gtk.TextIter.forward_cursor_position, but moves backward.
Moves up to @count cursor positions.
Same as method@Gtk.TextIter.forward_find_char, but goes backward from @iter.
Moves @iter to the start of the previous line.
Moves @count lines backward, if possible.
Same as method@Gtk.TextIter.forward_search, but moves backward.
Moves backward to the previous sentence start.
Calls method@Gtk.TextIter.backward_sentence_start up to @count times.
Moves backward to the next toggle (on or off) of the
Moves @iter backward to the previous visible cursor position.
Moves up to @count visible cursor positions.
Moves @iter to the start of the previous visible line.
Moves @count visible lines backward, if possible.
Moves backward to the previous visible word start.
Calls method@Gtk.TextIter.backward_visible_word_start up to @count times.
Moves backward to the previous word start.
Calls method@Gtk.TextIter.backward_word_start up to @count times.
Determines whether @iter ends a sentence.
Moves @iter forward by one character offset.
Moves @count characters if possible.
Moves @iter forward by a single cursor position.
Moves up to @count cursor positions.
Advances @iter, calling @pred on each character.
Moves @iter to the start of the next line.
Moves @count lines forward, if possible.
Searches forward for @str.
Moves forward to the next sentence end.
Calls method@Gtk.TextIter.forward_sentence_end @count times.
Moves @iter forward to the “end iterator”, which points one past the last valid character in the buffer.
Moves the iterator to point to the paragraph delimiter characters.
Moves forward to the next toggle (on or off) of the
Moves @iter forward to the next visible cursor position.
Moves up to @count visible cursor positions.
Moves @iter to the start of the next visible line.
Moves @count visible lines forward, if possible.
Moves forward to the next visible word end.
Calls method@Gtk.TextIter.forward_visible_word_end up to @count times.
Moves forward to the next word end.
Calls method@Gtk.TextIter.forward_word_end up to @count times.
Returns the GtkTextBuffer
this iterator is associated with.
Returns the number of bytes in the line containing @iter, including the paragraph delimiters.
Returns the number of characters in the line containing @iter, including the paragraph delimiters.
If the location at @iter contains a child anchor, the anchor is returned.
Returns the language in effect at @iter.
Returns the byte index of the iterator, counting from the start of a newline-terminated line.
Returns the character offset of the iterator, counting from the start of a newline-terminated line.
If the element at @iter is a paintable, the paintable is returned.
Returns a list of GtkTextTag
that are toggled on or off at this point.
Returns the number of bytes from the start of the line to the given @iter, not counting bytes that are invisible due to tags with the “invisible” flag toggled on.
Returns the offset in characters from the start of the line to the given @iter, not counting characters that are invisible due to tags with the “invisible” flag toggled on.
Returns visible text in the given range.
Returns visible text in the given range.
Determines whether @iter is inside a sentence (as opposed to in between two sentences, e.g. after a period and before the first letter of the next sentence).
Determines whether the character pointed by @iter is part of a natural-language word (as opposed to say inside some whitespace).
Determine if @iter is at a cursor position.
Same as method@Gtk.TextIter.set_line_offset, but works with a byte index. The given byte index must be at the start of a character, it can’t be in the middle of a UTF-8 encoded character.
Moves @iter within a line, to a new character (not byte) offset.
Like method@Gtk.TextIter.set_line_index, but the index is in visible bytes, i.e. text with a tag making it invisible is not counted in the index.
Like method@Gtk.TextIter.set_line_offset, but the offset is in visible characters, i.e. text with a tag making it invisible is not counted in the offset.
Returns true if @iter begins a paragraph.
Determines whether @iter begins a sentence.
Determines whether @iter begins a natural-language word.
Gets whether a range with @tag applied to it begins or ends at @iter.