GtkTextTagTable
GtkTextTagTable — Collection of tags that can be used together
|
|
Object Hierarchy
GObject
╰── GtkTextTagTable
Implemented Interfaces
GtkTextTagTable implements
GtkBuildable.
Includes
#include <gtk/gtk.h>
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.
GtkTextTagTables as GtkBuildable
The GtkTextTagTable implementation of the GtkBuildable interface
supports adding tags by specifying “tag” as the “type” attribute
of a <child> element.
An example of a UI definition fragment specifying tags:
Functions
GtkTextTagTableForeach ()
void
(*GtkTextTagTableForeach) (GtkTextTag *tag,
gpointer data);
gtk_text_tag_table_add ()
gboolean
gtk_text_tag_table_add (GtkTextTagTable *table,
GtkTextTag *tag);
Add a tag to the table. The tag is assigned the highest priority
in the table.
tag
must not be in a tag table already, and may not have
the same name as an already-added tag.
gtk_text_tag_table_remove ()
void
gtk_text_tag_table_remove (GtkTextTagTable *table,
GtkTextTag *tag);
Remove a tag from the table. If a GtkTextBuffer has table
as its tag table,
the tag is removed from the buffer. The table’s reference to the tag is
removed, so the tag will end up destroyed if you don’t have a reference to
it.
gtk_text_tag_table_lookup ()
GtkTextTag *
gtk_text_tag_table_lookup (GtkTextTagTable *table,
const gchar *name);
Look up a named tag.
Returns
The tag, or NULL if none by that
name is in the table.
[nullable][transfer none]
gtk_text_tag_table_foreach ()
void
gtk_text_tag_table_foreach (GtkTextTagTable *table,
GtkTextTagTableForeach func,
gpointer data);
Calls func
on each tag in table
, with user data data
.
Note that the table may not be modified while iterating
over it (you can’t add/remove tags).
gtk_text_tag_table_get_size ()
gint
gtk_text_tag_table_get_size (GtkTextTagTable *table);
Returns the size of the table (number of tags)
Returns
number of tags in table
Types and Values
GtkTextTagTable
typedef struct _GtkTextTagTable GtkTextTagTable;