- public void @delete (ref TextIter start, ref TextIter end)
Deletes text between start
and end
.
- public void add_mark (TextMark mark, TextIter where)
Adds the mark at position where
.
- public void add_selection_clipboard (Clipboard clipboard)
Adds clipboard
to the list of clipboards in which the
selection contents of this are available.
- public void apply_tag_by_name (string name, TextIter start, TextIter end)
- public bool backspace (ref TextIter iter, bool interactive, bool default_editable)
Performs the appropriate action as if the user hit the delete key with
the cursor at the position specified by iter
.
- public void copy_clipboard (Clipboard clipboard)
Copies the currently-selected text to a clipboard.
- public unowned TextChildAnchor create_child_anchor (TextIter iter)
- public unowned TextMark create_mark (string? mark_name, TextIter where, bool left_gravity)
Creates a mark at position where
.
- public unowned TextTag create_tag (string? tag_name, ...)
Creates a tag and adds it to the tag table for
this.
- public void cut_clipboard (Clipboard clipboard, bool default_editable)
Copies the currently-selected text to a clipboard, then deletes said
text if it’s editable.
- public bool delete_interactive (ref TextIter start_iter, ref TextIter end_iter, bool default_editable)
Deletes all editable text in the given range.
- public void delete_mark (TextMark mark)
Deletes mark
, so that it’s no longer located anywhere
in the buffer.
- public void delete_mark_by_name (string name)
Deletes the mark named name
; the mark must exist.
- public bool delete_selection (bool interactive, bool default_editable)
Deletes the range between the “insert” and “selection_bound”
marks, that is, the currently-selected text.
- public bool deserialize (TextBuffer content_buffer, Atom format, TextIter iter, uint8[] data) throws Error
This function deserializes rich text in format format
and
inserts it at iter
.
- public bool deserialize_get_can_create_tags (Atom format)
- public void deserialize_set_can_create_tags (Atom format, bool can_create_tags)
Use this function to allow a rich text deserialization function to
create new tags in the receiving buffer.
- public void get_bounds (out TextIter start, out TextIter end)
Retrieves the first and last iterators in the buffer, i.
- public int get_char_count ()
Gets the number of characters in the buffer; note that characters and
bytes are not the same, you can’t e.
- public unowned TargetList get_copy_target_list ()
This function returns the list of targets this text buffer can provide
for copying and as DND source.
- public Atom[] get_deserialize_formats ()
- public void get_end_iter (out TextIter iter)
Initializes iter
with the “end iterator,” one past
the last valid character in the text buffer.
- public bool get_has_selection ()
Indicates whether the buffer has some text currently selected.
- public unowned TextMark get_insert ()
Returns the mark that represents the cursor (insertion point).
- public void get_iter_at_child_anchor (out TextIter iter, TextChildAnchor anchor)
Obtains the location of anchor
within
this.
- public void get_iter_at_line (out TextIter iter, int line_number)
Initializes iter
to the start of the given line.
- public void get_iter_at_line_index (out TextIter iter, int line_number, int byte_index)
Obtains an iterator pointing to byte_index
within the
given line.
- public void get_iter_at_line_offset (out TextIter iter, int line_number, int char_offset)
Obtains an iterator pointing to char_offset
within the
given line.
- public void get_iter_at_mark (out TextIter iter, TextMark mark)
Initializes iter
with the current position of mark
.
- public void get_iter_at_offset (out TextIter iter, int char_offset)
Initializes iter
to a position char_offset
chars from the start of the entire buffer.
- public int get_line_count ()
Obtains the number of lines in the buffer.
- public unowned TextMark? get_mark (string name)
Returns the mark named name
in buffer
this, or null if no such mark exists in the buffer.
- public bool get_modified ()
Indicates whether the buffer has been modified since the last call to
set_modified set the modification flag to
false.
- public unowned TargetList get_paste_target_list ()
This function returns the list of targets this text buffer supports
for pasting and as DND destination.
- public unowned TextMark get_selection_bound ()
Returns the mark that represents the selection bound.
- public bool get_selection_bounds (out TextIter start, out TextIter end)
Returns true if some text is
selected; places the bounds of the selection in start
and end
(if the selection has length 0, then
start
and end
are filled in with the same value).
- public Atom[] get_serialize_formats ()
- public string get_slice (TextIter start, TextIter end, bool include_hidden_chars)
Returns the text in the range [start
,end
).
- public void get_start_iter (out TextIter iter)
Initialized iter
with the first position in the text
buffer.
- public unowned TextTagTable get_tag_table ()
- public string get_text (TextIter start, TextIter end, bool include_hidden_chars)
Returns the text in the range [start
,end
).
- public void insert (ref TextIter iter, string text, int len)
Inserts len
bytes of text
at position
iter
.
- public void insert_at_cursor (string text, int len)
Simply calls
insert, using the current cursor position as the insertion point.
- public bool insert_interactive (ref TextIter iter, string text, int len, bool default_editable)
Like insert,
but the insertion will not occur if iter
is at a non-editable location in the buffer.
- public bool insert_interactive_at_cursor (string text, int len, bool default_editable)
- public void insert_markup (ref TextIter iter, string markup, int len)
Inserts the text in markup
at position iter
.
- public void insert_range (ref TextIter iter, TextIter start, TextIter end)
Copies text, tags, and pixbufs between start
and
end
(the order of start
and end
doesn’t matter) and inserts the copy at iter
.
- public bool insert_range_interactive (ref TextIter iter, TextIter start, TextIter end, bool default_editable)
Same as
insert_range, but does nothing if the insertion point isn’t editable.
- public void insert_with_tags (ref TextIter iter, string text, int len, ...)
Inserts text
into this
at iter
, applying the list of tags to the newly-inserted text.
- public void insert_with_tags_by_name (ref TextIter iter, string text, int len, ...)
Same as
insert_with_tags, but allows you to pass in tag names instead of tag objects.
- public void move_mark (TextMark mark, TextIter where)
Moves mark
to the new location where
.
- public void move_mark_by_name (string name, TextIter where)
Moves the mark named name
(which must exist) to location
where
.
- public void paste_clipboard (Clipboard clipboard, TextIter? override_location, bool default_editable)
Pastes the contents of a clipboard.
- public void place_cursor (TextIter where)
This function moves the “insert” and “selection_bound” marks
simultaneously.
- public Atom register_deserialize_format (string mime_type, owned TextBufferDeserializeFunc function)
This function registers a rich text deserialization function
along with its mime_type
with the passed this.
- public Atom register_deserialize_tagset (string? tagset_name)
This function registers GTK+’s internal rich text serialization
format with the passed this.
- public Atom register_serialize_format (string mime_type, owned TextBufferSerializeFunc function)
This function registers a rich text serialization function
along with its mime_type
with the passed this.
- public Atom register_serialize_tagset (string? tagset_name)
This function registers GTK+’s internal rich text serialization
format with the passed this.
- public void remove_all_tags (TextIter start, TextIter end)
Removes all tags in the range between start
and end
.
- public void remove_selection_clipboard (Clipboard clipboard)
- public void remove_tag_by_name (string name, TextIter start, TextIter end)
- public void select_range (TextIter ins, TextIter bound)
This function moves the “insert” and “selection_bound” marks
simultaneously.
- public uint8[] serialize (TextBuffer content_buffer, Atom format, TextIter start, TextIter end)
This function serializes the portion of text between start
and end
in the rich text format represented by format
.
- public void set_modified (bool setting)
Used to keep track of whether the buffer has been modified since the
last time it was saved.
- public void set_text (string text, int len = -1)
Deletes current contents of this,
and inserts text
instead.
- public void unregister_deserialize_format (Atom format)
- public void unregister_serialize_format (Atom format)