GtkTextBuffer

Name

GtkTextBuffer -- Stores attributed text for display in a GtkTextView

Synopsis


#include <gtk/gtk.h>


GtkTextBuffer* gtk_text_buffer_new          (GtkTextTagTable *table);
gint        gtk_text_buffer_get_line_count  (GtkTextBuffer *buffer);
gint        gtk_text_buffer_get_char_count  (GtkTextBuffer *buffer);
GtkTextTagTable* gtk_text_buffer_get_tag_table
                                            (GtkTextBuffer *buffer);
void        gtk_text_buffer_insert          (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const gchar *text,
                                             gint len);
void        gtk_text_buffer_insert_at_cursor
                                            (GtkTextBuffer *buffer,
                                             const gchar *text,
                                             gint len);
gboolean    gtk_text_buffer_insert_interactive
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const gchar *text,
                                             gint len,
                                             gboolean default_editable);
gboolean    gtk_text_buffer_insert_interactive_at_cursor
                                            (GtkTextBuffer *buffer,
                                             const gchar *text,
                                             gint len,
                                             gboolean default_editable);
void        gtk_text_buffer_insert_range    (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const GtkTextIter *start,
                                             const GtkTextIter *end);
gboolean    gtk_text_buffer_insert_range_interactive
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const GtkTextIter *start,
                                             const GtkTextIter *end,
                                             gboolean default_editable);
void        gtk_text_buffer_insert_with_tags
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const gchar *text,
                                             gint len,
                                             GtkTextTag *first_tag,
                                             ...);
void        gtk_text_buffer_insert_with_tags_by_name
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const gchar *text,
                                             gint len,
                                             const gchar *first_tag_name,
                                             ...);
void        gtk_text_buffer_delete          (GtkTextBuffer *buffer,
                                             GtkTextIter *start,
                                             GtkTextIter *end);
gboolean    gtk_text_buffer_delete_interactive
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *start_iter,
                                             GtkTextIter *end_iter,
                                             gboolean default_editable);
void        gtk_text_buffer_set_text        (GtkTextBuffer *buffer,
                                             const gchar *text,
                                             gint len);
gchar*      gtk_text_buffer_get_text        (GtkTextBuffer *buffer,
                                             const GtkTextIter *start,
                                             const GtkTextIter *end,
                                             gboolean include_hidden_chars);
gchar*      gtk_text_buffer_get_slice       (GtkTextBuffer *buffer,
                                             const GtkTextIter *start,
                                             const GtkTextIter *end,
                                             gboolean include_hidden_chars);
void        gtk_text_buffer_insert_pixbuf   (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             GdkPixbuf *pixbuf);
GtkTextChildAnchor* gtk_text_buffer_create_child_anchor
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter);
GtkTextMark* gtk_text_buffer_create_mark    (GtkTextBuffer *buffer,
                                             const gchar *mark_name,
                                             const GtkTextIter *where,
                                             gboolean left_gravity);
void        gtk_text_buffer_move_mark       (GtkTextBuffer *buffer,
                                             GtkTextMark *mark,
                                             const GtkTextIter *where);
void        gtk_text_buffer_move_mark_by_name
                                            (GtkTextBuffer *buffer,
                                             const gchar *name,
                                             const GtkTextIter *where);
void        gtk_text_buffer_delete_mark     (GtkTextBuffer *buffer,
                                             GtkTextMark *mark);
void        gtk_text_buffer_delete_mark_by_name
                                            (GtkTextBuffer *buffer,
                                             const gchar *name);
GtkTextMark* gtk_text_buffer_get_mark       (GtkTextBuffer *buffer,
                                             const gchar *name);
GtkTextMark* gtk_text_buffer_get_insert     (GtkTextBuffer *buffer);
GtkTextMark* gtk_text_buffer_get_selection_bound
                                            (GtkTextBuffer *buffer);
void        gtk_text_buffer_place_cursor    (GtkTextBuffer *buffer,
                                             const GtkTextIter *where);
void        gtk_text_buffer_apply_tag       (GtkTextBuffer *buffer,
                                             GtkTextTag *tag,
                                             const GtkTextIter *start_index,
                                             const GtkTextIter *end_index);
void        gtk_text_buffer_remove_tag      (GtkTextBuffer *buffer,
                                             GtkTextTag *tag,
                                             const GtkTextIter *start_index,
                                             const GtkTextIter *end_index);
void        gtk_text_buffer_apply_tag_by_name
                                            (GtkTextBuffer *buffer,
                                             const gchar *name,
                                             const GtkTextIter *start_index,
                                             const GtkTextIter *end_index);
void        gtk_text_buffer_remove_tag_by_name
                                            (GtkTextBuffer *buffer,
                                             const gchar *name,
                                             const GtkTextIter *start_index,
                                             const GtkTextIter *end_index);
GtkTextTag* gtk_text_buffer_create_tag      (GtkTextBuffer *buffer,
                                             const gchar *tag_name);
void        gtk_text_buffer_get_iter_at_line_offset
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             gint line_number,
                                             gint char_offset);
void        gtk_text_buffer_get_iter_at_offset
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             gint char_offset);
void        gtk_text_buffer_get_iter_at_line
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             gint line_number);
void        gtk_text_buffer_get_iter_at_line_index
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             gint line_number,
                                             gint byte_index);
void        gtk_text_buffer_get_iter_at_mark
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             GtkTextMark *mark);
void        gtk_text_buffer_get_iter_at_child_anchor
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             GtkTextChildAnchor *anchor);
void        gtk_text_buffer_get_last_iter   (GtkTextBuffer *buffer,
                                             GtkTextIter *iter);
void        gtk_text_buffer_get_bounds      (GtkTextBuffer *buffer,
                                             GtkTextIter *start,
                                             GtkTextIter *end);
gboolean    gtk_text_buffer_modified        (GtkTextBuffer *buffer);
void        gtk_text_buffer_set_modified    (GtkTextBuffer *buffer,
                                             gboolean setting);
gboolean    gtk_text_buffer_delete_selection
                                            (GtkTextBuffer *buffer,
                                             gboolean interactive,
                                             gboolean default_editable);
void        gtk_text_buffer_paste_clipboard (GtkTextBuffer *buffer,
                                             gboolean default_editable);
void        gtk_text_buffer_copy_clipboard  (GtkTextBuffer *buffer);
void        gtk_text_buffer_cut_clipboard   (GtkTextBuffer *buffer,
                                             gboolean default_editable);
void        gtk_text_buffer_paste_primary   (GtkTextBuffer *buffer,
                                             const GtkTextIter *override_location,
                                             gboolean default_editable);
gboolean    gtk_text_buffer_get_selection_bounds
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *start,
                                             GtkTextIter *end);

Object Hierarchy


  GtkObject
   +----GtkTextBuffer

Signal Prototypes


"apply-tag" void        user_function      (GtkTextBuffer *textbuffer,
                                            GObject arg1,
                                            GtkTextIter arg2,
                                            GtkTextIter arg3,
                                            gpointer user_data);
"changed"   void        user_function      (GtkTextBuffer *textbuffer,
                                            gpointer user_data);
"delete-text"
            void        user_function      (GtkTextBuffer *textbuffer,
                                            GtkTextIter arg1,
                                            GtkTextIter arg2,
                                            gboolean arg3,
                                            gpointer user_data);
"insert-text"
            void        user_function      (GtkTextBuffer *textbuffer,
                                            GtkTextIter arg1,
                                            GtkTextIter arg2,
                                            gint arg3,
                                            gboolean arg4,
                                            gpointer user_data);
"mark-deleted"
            void        user_function      (GtkTextBuffer *textbuffer,
                                            GObject arg1,
                                            gpointer user_data);
"mark-set"  void        user_function      (GtkTextBuffer *textbuffer,
                                            GtkTextIter arg1,
                                            GObject arg2,
                                            gpointer user_data);
"modified-changed"
            void        user_function      (GtkTextBuffer *textbuffer,
                                            gpointer user_data);
"remove-tag"
            void        user_function      (GtkTextBuffer *textbuffer,
                                            GObject arg1,
                                            GtkTextIter arg2,
                                            GtkTextIter arg3,
                                            gpointer user_data);

Description

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.

Details

gtk_text_buffer_new ()

GtkTextBuffer* gtk_text_buffer_new          (GtkTextTagTable *table);

Creates a new text buffer.

table : a tag table, or NULL to create a new one
Returns : a new text buffer


gtk_text_buffer_get_line_count ()

gint        gtk_text_buffer_get_line_count  (GtkTextBuffer *buffer);

buffer : 
Returns : 


gtk_text_buffer_get_char_count ()

gint        gtk_text_buffer_get_char_count  (GtkTextBuffer *buffer);

buffer : 
Returns : 


gtk_text_buffer_get_tag_table ()

GtkTextTagTable* gtk_text_buffer_get_tag_table
                                            (GtkTextBuffer *buffer);

Get the GtkTextTagTable associated with this buffer.

buffer : a GtkTextBuffer
Returns : the buffer's tag table


gtk_text_buffer_insert ()

void        gtk_text_buffer_insert          (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const gchar *text,
                                             gint len);

Inserts len bytes of text at position iter. If len is -1, text must be nul-terminated and will be inserted in its entirety. Emits the "insert_text" signal; insertion actually occurs in the default handler for the signal. iter is invalidated when insertion occurs (because the buffer contents change), but the default signal handler revalidates it to point to the end of the inserted text.

buffer : a GtkTextBuffer
iter : a position in the buffer
text : UTF-8 format text to insert
len : length of text in bytes, or -1


gtk_text_buffer_insert_at_cursor ()

void        gtk_text_buffer_insert_at_cursor
                                            (GtkTextBuffer *buffer,
                                             const gchar *text,
                                             gint len);

Simply calls gtk_text_buffer_insert(), using the current cursor position as the insertion point.

buffer : a GtkTextBuffer
text : some text in UTF-8 format
len : length of text, in bytes


gtk_text_buffer_insert_interactive ()

gboolean    gtk_text_buffer_insert_interactive
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const gchar *text,
                                             gint len,
                                             gboolean default_editable);

Like gtk_text_buffer_insert(), but the insertion will not occur if iter is at a non-editable location in the buffer. Usually you want to prevent insertions at ineditable locations if the insertion results from a user action (is interactive).

default_editable indicates the editability of text that doesn't have a tag affecting editability applied to it. Typically the result of gtk_text_view_get_editable() is appropriate here.

buffer : a GtkTextBuffer
iter : a position in buffer
text : some UTF-8 text
len : length of text in bytes, or -1
default_editable : default editability of buffer
Returns : whether text was actually inserted


gtk_text_buffer_insert_interactive_at_cursor ()

gboolean    gtk_text_buffer_insert_interactive_at_cursor
                                            (GtkTextBuffer *buffer,
                                             const gchar *text,
                                             gint len,
                                             gboolean default_editable);

Calls gtk_text_buffer_insert_interactive() at the cursor position.

default_editable indicates the editability of text that doesn't have a tag affecting editability applied to it. Typically the result of gtk_text_view_get_editable() is appropriate here.

buffer : a GtkTextBuffer
text : text in UTF-8 format
len : length of text in bytes, or -1
default_editable : default editability of buffer
Returns : whether text was actually inserted


gtk_text_buffer_insert_range ()

void        gtk_text_buffer_insert_range    (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const GtkTextIter *start,
                                             const GtkTextIter *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. Used instead of simply getting/inserting text because it preserves images and tags. If start and end are in a different buffer from buffer, the two buffers must share the same tag table.

Implemented via emissions of the insert_text and apply_tag signals, so expect those.

buffer : a GtkTextBuffer
iter : a position in buffer
start : a position in a GtkTextBuffer
end : another position in the same buffer as start


gtk_text_buffer_insert_range_interactive ()

gboolean    gtk_text_buffer_insert_range_interactive
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const GtkTextIter *start,
                                             const GtkTextIter *end,
                                             gboolean default_editable);

Same as gtk_text_buffer_insert_range(), but does nothing if the insertion point isn't editable. The default_editable parameter indicates whether the text is editable at iter if no tags enclosing iter affect editability. Typically the result of gtk_text_view_get_editable() is appropriate here.

buffer : a GtkTextBuffer
iter : a position in buffer
start : a position in a GtkTextBuffer
end : another position in the same buffer as start
default_editable : default editability of the buffer
Returns : whether an insertion was possible at iter


gtk_text_buffer_insert_with_tags ()

void        gtk_text_buffer_insert_with_tags
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const gchar *text,
                                             gint len,
                                             GtkTextTag *first_tag,
                                             ...);

Inserts text into buffer at iter, applying the list of tags to the newly-inserted text. The last tag specified must be NULL to terminate the list. Equivalent to calling gtk_text_buffer_insert(), then gtk_text_buffer_apply_tag() on the inserted text; gtk_text_buffer_insert_with_tags() is just a convenience function.

buffer : a GtkTextBuffer
iter : an iterator in buffer
text : UTF-8 text
len : length of text, or -1
first_tag : first tag to apply to text
... : NULL-terminated list of tags to apply


gtk_text_buffer_insert_with_tags_by_name ()

void        gtk_text_buffer_insert_with_tags_by_name
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             const gchar *text,
                                             gint len,
                                             const gchar *first_tag_name,
                                             ...);

Same as gtk_text_buffer_insert_with_tags(), but allows you to pass in tag names instead of tag objects.

buffer : a GtkTextBuffer
iter : position in buffer
text : UTF-8 text
len : length of text, or -1
first_tag_name : name of a tag to apply to text
... : more tag names


gtk_text_buffer_delete ()

void        gtk_text_buffer_delete          (GtkTextBuffer *buffer,
                                             GtkTextIter *start,
                                             GtkTextIter *end);

Deletes text between start and end. The order of start and end is not actually relevant; gtk_text_buffer_delete() will reorder them. This function actually emits the "delete_text" signal, and the default handler of that signal deletes the text. Because the buffer is modified, all outstanding iterators become invalid after calling this function; however, the start and end will be re-initialized to point to the location where text was deleted.

Note that the final newline in the buffer may not be deleted; a GtkTextBuffer always contains at least one newline. You can safely include the final newline in the range [start,end) but it won't be affected by the deletion.

buffer : a GtkTextBuffer
start : a position in buffer
end : another position in buffer


gtk_text_buffer_delete_interactive ()

gboolean    gtk_text_buffer_delete_interactive
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *start_iter,
                                             GtkTextIter *end_iter,
                                             gboolean default_editable);

Deletes all <emphasis>editable</emphasis> text in the given range. Calls gtk_text_buffer_delete() for each editable sub-range of [start,end). start and end are revalidated to point to the location of the last deleted range, or left untouched if no text was deleted.

buffer : a GtkTextBuffer
start_iter : start of range to delete
end_iter : end of range
default_editable : whether the buffer is editable by default
Returns : whether some text was actually deleted


gtk_text_buffer_set_text ()

void        gtk_text_buffer_set_text        (GtkTextBuffer *buffer,
                                             const gchar *text,
                                             gint len);

Deletes current contents of buffer, and inserts text instead. If text doesn't end with a newline, a newline is added; GtkTextBuffer contents must always end with a newline. If text ends with a newline, the new buffer contents will be exactly text. If len is -1, text must be nul-terminated.

buffer : a GtkTextBuffer
text : UTF-8 text to insert
len : length of text in bytes


gtk_text_buffer_get_text ()

gchar*      gtk_text_buffer_get_text        (GtkTextBuffer *buffer,
                                             const GtkTextIter *start,
                                             const GtkTextIter *end,
                                             gboolean include_hidden_chars);

Returns the text in the range [start,end). Excludes undisplayed text (text marked with tags that set the invisibility attribute) if include_hidden_chars is FALSE. Does not include characters representing embedded images, so byte and character indexes into the returned string do <emphasis>not</emphasis> correspond to byte and character indexes into the buffer. Contrast with gtk_text_buffer_get_slice().

buffer : a GtkTextBuffer
start : start of a range
end : end of a range
include_hidden_chars : whether to include invisible text
Returns : an allocated UTF-8 string


gtk_text_buffer_get_slice ()

gchar*      gtk_text_buffer_get_slice       (GtkTextBuffer *buffer,
                                             const GtkTextIter *start,
                                             const GtkTextIter *end,
                                             gboolean include_hidden_chars);

Returns the text in the range [start,end). Excludes undisplayed text (text marked with tags that set the invisibility attribute) if include_hidden_chars is FALSE. The returned string includes a 0xFFFD character whenever the buffer contains embedded images, so byte and character indexes into the returned string <emphasis>do</emphasis> correspond to byte and character indexes into the buffer. Contrast with gtk_text_buffer_get_text(). Note that 0xFFFD can occur in normal text as well, so it is not a reliable indicator that a pixbuf or widget is in the buffer.

buffer : a GtkTextBuffer
start : start of a range
end : end of a range
include_hidden_chars : whether to include invisible text
Returns : an allocated UTF-8 string


gtk_text_buffer_insert_pixbuf ()

void        gtk_text_buffer_insert_pixbuf   (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             GdkPixbuf *pixbuf);

buffer : 
iter : 
pixbuf : 


gtk_text_buffer_create_child_anchor ()

GtkTextChildAnchor* gtk_text_buffer_create_child_anchor
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter);

buffer : 
iter : 
Returns : 


gtk_text_buffer_create_mark ()

GtkTextMark* gtk_text_buffer_create_mark    (GtkTextBuffer *buffer,
                                             const gchar *mark_name,
                                             const GtkTextIter *where,
                                             gboolean left_gravity);

Creates a mark at position where. If mark_name is NULL, the mark is anonymous; otherwise, the mark can be retrieved by name using gtk_text_buffer_get_mark(). If a mark has left gravity, and text is inserted at the mark's current location, the mark will be moved to the left of the newly-inserted text. If the mark has right gravity (left_gravity = FALSE), the mark will end up on the right of newly-inserted text. The standard left-to-right cursor is a mark with right gravity (when you type, the cursor stays on the right side of the text you're typing).

The caller of this function does <emphasis>not</emphasis> own a reference to the returned GtkTextMark, so you can ignore the return value if you like. Marks are owned by the buffer and go away when the buffer does.

Emits the "mark_set" signal as notification of the mark's initial placement.

buffer : a GtkTextBuffer
mark_name : name for mark, or NULL
where : location to place mark
left_gravity : whether the mark has left gravity
Returns : the new GtkTextMark object


gtk_text_buffer_move_mark ()

void        gtk_text_buffer_move_mark       (GtkTextBuffer *buffer,
                                             GtkTextMark *mark,
                                             const GtkTextIter *where);

Moves mark to the new location where. Emits the "mark_set" signal as notification of the move.

buffer : a GtkTextBuffer
mark : a GtkTextMark
where : new location for mark in buffer


gtk_text_buffer_move_mark_by_name ()

void        gtk_text_buffer_move_mark_by_name
                                            (GtkTextBuffer *buffer,
                                             const gchar *name,
                                             const GtkTextIter *where);

Moves the mark named name (which must exist) to location where. See gtk_text_buffer_move_mark() for details.

buffer : a GtkTextBuffer
name : name of a mark
where : new location for mark


gtk_text_buffer_delete_mark ()

void        gtk_text_buffer_delete_mark     (GtkTextBuffer *buffer,
                                             GtkTextMark *mark);

Deletes mark, so that it's no longer located anywhere in the buffer. Removes the reference the buffer holds to the mark, so if you haven't called g_object_ref() on the mark, it will be freed. Even if the mark isn't freed, most operations on mark become invalid. There is no way to undelete a mark. gtk_text_mark_get_deleted() will return TRUE after this function has been called on a mark; gtk_text_mark_get_deleted() indicates that a mark no longer belongs to a buffer. The "mark_deleted" signal will be emitted as notification after the mark is deleted.

buffer : a GtkTextBuffer
mark : a GtkTextMark in buffer


gtk_text_buffer_delete_mark_by_name ()

void        gtk_text_buffer_delete_mark_by_name
                                            (GtkTextBuffer *buffer,
                                             const gchar *name);

Deletes the mark named name; the mark must exist. See gtk_text_buffer_delete_mark() for details.

buffer : a GtkTextBuffer
name : name of a mark in buffer


gtk_text_buffer_get_mark ()

GtkTextMark* gtk_text_buffer_get_mark       (GtkTextBuffer *buffer,
                                             const gchar *name);

Returns the mark named name in buffer buffer, or NULL if no such mark exists in the buffer.

buffer : a GtkTextBuffer
name : a mark name
Returns : a GtkTextMark, or NULL


gtk_text_buffer_get_insert ()

GtkTextMark* gtk_text_buffer_get_insert     (GtkTextBuffer *buffer);

Returns the mark that represents the cursor (insertion point). Equivalent to calling gtk_text_buffer_get_mark() to get the mark name "insert," but very slightly more efficient, and involves less typing.

buffer : a GtkTextBuffer
Returns : insertion point mark


gtk_text_buffer_get_selection_bound ()

GtkTextMark* gtk_text_buffer_get_selection_bound
                                            (GtkTextBuffer *buffer);

Returns the mark that represents the selection bound. Equivalent to calling gtk_text_buffer_get_mark() to get the mark name "selection_bound," but very slightly more efficient, and involves less typing.

The currently-selected text in buffer is the region between the "selection_bound" and "insert" marks. If "selection_bound" and "insert" are in the same place, then there is no current selection. gtk_text_buffer_get_selection_bounds() is another convenient function for handling the selection, if you just want to know whether there's a selection and what its bounds are.

buffer : a GtkTextBuffer
Returns : selection bound mark


gtk_text_buffer_place_cursor ()

void        gtk_text_buffer_place_cursor    (GtkTextBuffer *buffer,
                                             const GtkTextIter *where);

This function moves the "insert" and "selection_bound" marks simultaneously. If you move them to the same place in two steps with gtk_text_buffer_move_mark(), you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized.

buffer : a GtkTextBuffer
where : where to put the cursor


gtk_text_buffer_apply_tag ()

void        gtk_text_buffer_apply_tag       (GtkTextBuffer *buffer,
                                             GtkTextTag *tag,
                                             const GtkTextIter *start_index,
                                             const GtkTextIter *end_index);

buffer : 
tag : 
start_index : 
end_index : 


gtk_text_buffer_remove_tag ()

void        gtk_text_buffer_remove_tag      (GtkTextBuffer *buffer,
                                             GtkTextTag *tag,
                                             const GtkTextIter *start_index,
                                             const GtkTextIter *end_index);

buffer : 
tag : 
start_index : 
end_index : 


gtk_text_buffer_apply_tag_by_name ()

void        gtk_text_buffer_apply_tag_by_name
                                            (GtkTextBuffer *buffer,
                                             const gchar *name,
                                             const GtkTextIter *start_index,
                                             const GtkTextIter *end_index);

buffer : 
name : 
start_index : 
end_index : 


gtk_text_buffer_remove_tag_by_name ()

void        gtk_text_buffer_remove_tag_by_name
                                            (GtkTextBuffer *buffer,
                                             const gchar *name,
                                             const GtkTextIter *start_index,
                                             const GtkTextIter *end_index);

buffer : 
name : 
start_index : 
end_index : 


gtk_text_buffer_create_tag ()

GtkTextTag* gtk_text_buffer_create_tag      (GtkTextBuffer *buffer,
                                             const gchar *tag_name);

Creates a tag and adds it to the tag table for buffer. Equivalent to calling gtk_text_tag_new() and then adding the tag to the buffer's tag table. The returned tag has its refcount incremented, as if you'd called gtk_text_tag_new().

If tag_name is NULL, the tag is anonymous.

buffer : a GtkTextBuffer
tag_name : name of the new tag, or NULL
Returns : a new tag


gtk_text_buffer_get_iter_at_line_offset ()

void        gtk_text_buffer_get_iter_at_line_offset
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             gint line_number,
                                             gint char_offset);

buffer : 
iter : 
line_number : 
char_offset : 


gtk_text_buffer_get_iter_at_offset ()

void        gtk_text_buffer_get_iter_at_offset
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             gint char_offset);

buffer : 
iter : 
char_offset : 


gtk_text_buffer_get_iter_at_line ()

void        gtk_text_buffer_get_iter_at_line
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             gint line_number);

buffer : 
iter : 
line_number : 


gtk_text_buffer_get_iter_at_line_index ()

void        gtk_text_buffer_get_iter_at_line_index
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             gint line_number,
                                             gint byte_index);

buffer : 
iter : 
line_number : 
byte_index : 


gtk_text_buffer_get_iter_at_mark ()

void        gtk_text_buffer_get_iter_at_mark
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             GtkTextMark *mark);

Initializes iter with the current position of mark.

buffer : a GtkTextBuffer
iter : iterator to initialize
mark : a GtkTextMark in buffer


gtk_text_buffer_get_iter_at_child_anchor ()

void        gtk_text_buffer_get_iter_at_child_anchor
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *iter,
                                             GtkTextChildAnchor *anchor);

buffer : 
iter : 
anchor : 


gtk_text_buffer_get_last_iter ()

void        gtk_text_buffer_get_last_iter   (GtkTextBuffer *buffer,
                                             GtkTextIter *iter);

buffer : 
iter : 


gtk_text_buffer_get_bounds ()

void        gtk_text_buffer_get_bounds      (GtkTextBuffer *buffer,
                                             GtkTextIter *start,
                                             GtkTextIter *end);

buffer : 
start : 
end : 


gtk_text_buffer_modified ()

gboolean    gtk_text_buffer_modified        (GtkTextBuffer *buffer);

buffer : 
Returns : 


gtk_text_buffer_set_modified ()

void        gtk_text_buffer_set_modified    (GtkTextBuffer *buffer,
                                             gboolean setting);

buffer : 
setting : 


gtk_text_buffer_delete_selection ()

gboolean    gtk_text_buffer_delete_selection
                                            (GtkTextBuffer *buffer,
                                             gboolean interactive,
                                             gboolean default_editable);

buffer : 
interactive : 
default_editable : 
Returns : 


gtk_text_buffer_paste_clipboard ()

void        gtk_text_buffer_paste_clipboard (GtkTextBuffer *buffer,
                                             gboolean default_editable);

buffer : 
default_editable : 


gtk_text_buffer_copy_clipboard ()

void        gtk_text_buffer_copy_clipboard  (GtkTextBuffer *buffer);

buffer : 


gtk_text_buffer_cut_clipboard ()

void        gtk_text_buffer_cut_clipboard   (GtkTextBuffer *buffer,
                                             gboolean default_editable);

buffer : 
default_editable : 


gtk_text_buffer_paste_primary ()

void        gtk_text_buffer_paste_primary   (GtkTextBuffer *buffer,
                                             const GtkTextIter *override_location,
                                             gboolean default_editable);

buffer : 
override_location : 
default_editable : 


gtk_text_buffer_get_selection_bounds ()

gboolean    gtk_text_buffer_get_selection_bounds
                                            (GtkTextBuffer *buffer,
                                             GtkTextIter *start,
                                             GtkTextIter *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). start and end will be in ascending order. If start and end are NULL, then they are not filled in, but the return value still indicates whether text is selected.

buffer : a GtkTextBuffer
start : iterator to initialize with selection start
end : iterator to initialize with selection end
Returns : whether the selection has nonzero length

Signals

The "apply-tag" signal

void        user_function                  (GtkTextBuffer *textbuffer,
                                            GObject arg1,
                                            GtkTextIter arg2,
                                            GtkTextIter arg3,
                                            gpointer user_data);

textbuffer :the object which received the signal.
arg1 : 
arg2 : 
arg3 : 
user_data :user data set when the signal handler was connected.


The "changed" signal

void        user_function                  (GtkTextBuffer *textbuffer,
                                            gpointer user_data);

textbuffer :the object which received the signal.
user_data :user data set when the signal handler was connected.


The "delete-text" signal

void        user_function                  (GtkTextBuffer *textbuffer,
                                            GtkTextIter arg1,
                                            GtkTextIter arg2,
                                            gboolean arg3,
                                            gpointer user_data);

textbuffer :the object which received the signal.
arg1 : 
arg2 : 
arg3 : 
user_data :user data set when the signal handler was connected.


The "insert-text" signal

void        user_function                  (GtkTextBuffer *textbuffer,
                                            GtkTextIter arg1,
                                            GtkTextIter arg2,
                                            gint arg3,
                                            gboolean arg4,
                                            gpointer user_data);

textbuffer :the object which received the signal.
arg1 : 
arg2 : 
arg3 : 
arg4 : 
user_data :user data set when the signal handler was connected.


The "mark-deleted" signal

void        user_function                  (GtkTextBuffer *textbuffer,
                                            GObject arg1,
                                            gpointer user_data);

textbuffer :the object which received the signal.
arg1 : 
user_data :user data set when the signal handler was connected.


The "mark-set" signal

void        user_function                  (GtkTextBuffer *textbuffer,
                                            GtkTextIter arg1,
                                            GObject arg2,
                                            gpointer user_data);

textbuffer :the object which received the signal.
arg1 : 
arg2 : 
user_data :user data set when the signal handler was connected.


The "modified-changed" signal

void        user_function                  (GtkTextBuffer *textbuffer,
                                            gpointer user_data);

textbuffer :the object which received the signal.
user_data :user data set when the signal handler was connected.


The "remove-tag" signal

void        user_function                  (GtkTextBuffer *textbuffer,
                                            GObject arg1,
                                            GtkTextIter arg2,
                                            GtkTextIter arg3,
                                            gpointer user_data);

textbuffer :the object which received the signal.
arg1 : 
arg2 : 
arg3 : 
user_data :user data set when the signal handler was connected.

See Also

GtkTextView, GtkTextIter, GtkTextMark