Struct

Gtk.TextIter

Description [src]

struct GtkTextIter {
  /* No available fields */
}

An iterator for the contents of a GtkTextBuffer.

You may wish to begin by reading the text widget conceptual overview, which gives an overview of all the objects and data types related to the text widget and how they work together.

Instance methods

gtk_text_iter_assign

Assigns the value of other to iter.

gtk_text_iter_backward_char

Moves backward by one character offset.

gtk_text_iter_backward_chars

Moves count characters backward, if possible.

gtk_text_iter_backward_cursor_position

Like gtk_text_iter_forward_cursor_position(), but moves backward.

gtk_text_iter_backward_cursor_positions

Moves up to count cursor positions.

gtk_text_iter_backward_find_char

Same as gtk_text_iter_forward_find_char(), but goes backward from iter.

gtk_text_iter_backward_line

Moves iter to the start of the previous line.

gtk_text_iter_backward_lines

Moves count lines backward, if possible.

gtk_text_iter_backward_search

Same as gtk_text_iter_forward_search(), but moves backward.

gtk_text_iter_backward_sentence_start

Moves backward to the previous sentence start.

gtk_text_iter_backward_sentence_starts

Calls gtk_text_iter_backward_sentence_start() up to count times.

gtk_text_iter_backward_to_tag_toggle

Moves backward to the next toggle (on or off) of the tag, or to the next toggle of any tag if tag is NULL.

gtk_text_iter_backward_visible_cursor_position

Moves iter forward to the previous visible cursor position.

gtk_text_iter_backward_visible_cursor_positions

Moves up to count visible cursor positions.

gtk_text_iter_backward_visible_line

Moves iter to the start of the previous visible line.

gtk_text_iter_backward_visible_lines

Moves count visible lines backward, if possible.

gtk_text_iter_backward_visible_word_start

Moves backward to the previous visible word start.

gtk_text_iter_backward_visible_word_starts

Calls gtk_text_iter_backward_visible_word_start() up to count times.

gtk_text_iter_backward_word_start

Moves backward to the previous word start.

gtk_text_iter_backward_word_starts

Calls gtk_text_iter_backward_word_start() up to count times.

gtk_text_iter_can_insert

Considering the default editability of the buffer, and tags that affect editability, determines whether text inserted at iter would be editable.

gtk_text_iter_compare

A qsort()-style function that returns negative if lhs is less than rhs, positive if lhs is greater than rhs, and 0 if they’re equal.

gtk_text_iter_copy

Creates a dynamically-allocated copy of an iterator.

gtk_text_iter_editable

Returns whether the character at iter is within an editable region of text.

gtk_text_iter_ends_line

Returns TRUE if iter points to the start of the paragraph delimiter characters for a line.

gtk_text_iter_ends_sentence

Determines whether iter ends a sentence.

gtk_text_iter_ends_tag

Returns TRUE if tag is toggled off at exactly this point.

gtk_text_iter_ends_word

Determines whether iter ends a natural-language word.

gtk_text_iter_equal

Tests whether two iterators are equal, using the fastest possible mechanism.

gtk_text_iter_forward_char

Moves iter forward by one character offset.

gtk_text_iter_forward_chars

Moves count characters if possible.

gtk_text_iter_forward_cursor_position

Moves iter forward by a single cursor position.

gtk_text_iter_forward_cursor_positions

Moves up to count cursor positions.

gtk_text_iter_forward_find_char

Advances iter, calling pred on each character.

gtk_text_iter_forward_line

Moves iter to the start of the next line.

gtk_text_iter_forward_lines

Moves count lines forward, if possible.

gtk_text_iter_forward_search

Searches forward for str.

gtk_text_iter_forward_sentence_end

Moves forward to the next sentence end.

gtk_text_iter_forward_sentence_ends

Calls gtk_text_iter_forward_sentence_end() count times.

gtk_text_iter_forward_to_end

Moves iter forward to the “end iterator”, which points one past the last valid character in the buffer.

gtk_text_iter_forward_to_line_end

Moves the iterator to point to the paragraph delimiter characters.

gtk_text_iter_forward_to_tag_toggle

Moves forward to the next toggle (on or off) of the tag, or to the next toggle of any tag if tag is NULL.

gtk_text_iter_forward_visible_cursor_position

Moves iter forward to the next visible cursor position.

gtk_text_iter_forward_visible_cursor_positions

Moves up to count visible cursor positions.

gtk_text_iter_forward_visible_line

Moves iter to the start of the next visible line.

gtk_text_iter_forward_visible_lines

Moves count visible lines forward, if possible.

gtk_text_iter_forward_visible_word_end

Moves forward to the next visible word end.

gtk_text_iter_forward_visible_word_ends

Calls gtk_text_iter_forward_visible_word_end() up to count times.

gtk_text_iter_forward_word_end

Moves forward to the next word end.

gtk_text_iter_forward_word_ends

Calls gtk_text_iter_forward_word_end() up to count times.

gtk_text_iter_free

Free an iterator allocated on the heap.

gtk_text_iter_get_buffer

Returns the GtkTextBuffer this iterator is associated with.

gtk_text_iter_get_bytes_in_line

Returns the number of bytes in the line containing iter, including the paragraph delimiters.

gtk_text_iter_get_char

The Unicode character at this iterator is returned.

gtk_text_iter_get_chars_in_line

Returns the number of characters in the line containing iter, including the paragraph delimiters.

gtk_text_iter_get_child_anchor

If the location at iter contains a child anchor, the anchor is returned.

gtk_text_iter_get_language

Returns the language in effect at iter.

gtk_text_iter_get_line

Returns the line number containing the iterator.

gtk_text_iter_get_line_index

Returns the byte index of the iterator, counting from the start of a newline-terminated line.

gtk_text_iter_get_line_offset

Returns the character offset of the iterator, counting from the start of a newline-terminated line.

gtk_text_iter_get_marks

Returns a list of all GtkTextMark at this location.

gtk_text_iter_get_offset

Returns the character offset of an iterator.

gtk_text_iter_get_paintable

If the element at iter is a paintable, the paintable is returned.

gtk_text_iter_get_slice

Returns the text in the given range.

gtk_text_iter_get_tags

Returns a list of tags that apply to iter, in ascending order of priority.

gtk_text_iter_get_text

Returns text in the given range.

gtk_text_iter_get_toggled_tags

Returns a list of GtkTextTag that are toggled on or off at this point.

gtk_text_iter_get_visible_line_index

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.

gtk_text_iter_get_visible_line_offset

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.

gtk_text_iter_get_visible_slice

Returns visible text in the given range.

gtk_text_iter_get_visible_text

Returns visible text in the given range.

gtk_text_iter_has_tag

Returns TRUE if iter points to a character that is part of a range tagged with tag.

gtk_text_iter_in_range

Checks whether iter falls in the range [start, end).

gtk_text_iter_inside_sentence

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).

gtk_text_iter_inside_word

Determines whether the character pointed by iter is part of a natural-language word (as opposed to say inside some whitespace).

gtk_text_iter_is_cursor_position

Determine if iter is at a cursor position.

gtk_text_iter_is_end

Returns TRUE if iter is the end iterator.

gtk_text_iter_is_start

Returns TRUE if iter is the first iterator in the buffer.

gtk_text_iter_order

Swaps the value of first and second if second comes before first in the buffer.

gtk_text_iter_set_line

Moves iterator iter to the start of the line line_number.

gtk_text_iter_set_line_index

Same as gtk_text_iter_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.

gtk_text_iter_set_line_offset

Moves iter within a line, to a new character (not byte) offset.

gtk_text_iter_set_offset

Sets iter to point to char_offset.

gtk_text_iter_set_visible_line_index

Like gtk_text_iter_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.

gtk_text_iter_set_visible_line_offset

Like gtk_text_iter_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.

gtk_text_iter_starts_line

Returns TRUE if iter begins a paragraph.

gtk_text_iter_starts_sentence

Determines whether iter begins a sentence.

gtk_text_iter_starts_tag

Returns TRUE if tag is toggled on at exactly this point.

gtk_text_iter_starts_word

Determines whether iter begins a natural-language word.

gtk_text_iter_toggles_tag

Gets whether a range with tag applied to it begins or ends at iter.