GtkTextTagTable

## GtkTextTagTable GtkTextTagTable — Collection of tags that can be used together |

## Synopsis

    #include <gtk/gtk.h>

    struct      GtkTextTagTable;
    void        (*GtkTextTagTableForeach)       (GtkTextTag *tag,
                                                 gpointer data);
    GtkTextTagTable* gtk_text_tag_table_new     (void);
    void        gtk_text_tag_table_add          (GtkTextTagTable *table,
                                                 GtkTextTag *tag);
    void        gtk_text_tag_table_remove       (GtkTextTagTable *table,
                                                 GtkTextTag *tag);
    GtkTextTag* gtk_text_tag_table_lookup       (GtkTextTagTable *table,
                                                 const gchar *name);
    void        gtk_text_tag_table_foreach      (GtkTextTagTable *table,
                                                 GtkTextTagTableForeach func,
                                                 gpointer data);
    gint        gtk_text_tag_table_get_size     (GtkTextTagTable *table);

## Object Hierarchy

      GObject
       +----GtkTextTagTable

## Signal Prototypes

    "tag-added" void        user_function      (GtkTextTagTable *texttagtable,
                                                GtkTextTag *arg1,
                                                gpointer user_data);
    "tag-changed"
                void        user_function      (GtkTextTagTable *texttagtable,
                                                GtkTextTag *arg1,
                                                gboolean arg2,
                                                gpointer user_data);
    "tag-removed"
                void        user_function      (GtkTextTagTable *texttagtable,
                                                GtkTextTag *arg1,
                                                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

### struct GtkTextTagTable

    struct GtkTextTagTable;

### GtkTextTagTableForeach ()

    void        (*GtkTextTagTableForeach)       (GtkTextTag *tag,
                                                 gpointer data);

`tag` : |
`data` : |

### gtk_text_tag_table_new ()

    GtkTextTagTable* gtk_text_tag_table_new     (void);

Creates a new GtkTextTagTable. The table contains no tags by default.

Returns : | a new GtkTextTagTable

### gtk_text_tag_table_add ()

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

`table` : | a GtkTextTagTable
`tag` : | a GtkTextTag

### gtk_text_tag_table_remove ()

    void        gtk_text_tag_table_remove       (GtkTextTagTable *table,
                                                 GtkTextTag *tag);

Remove a tag from the table. This will remove the table's reference to the tag, so be careful - the tag will end up destroyed if you don't have a reference to it.

`table` : | a GtkTextTagTable
`tag` : | a GtkTextTag

### gtk_text_tag_table_lookup ()

    GtkTextTag* gtk_text_tag_table_lookup       (GtkTextTagTable *table,
                                                 const gchar *name);

Look up a named tag.

`table` : | a GtkTextTagTable
`name` : | name of a tag
Returns : | The tag, or `NULL` if none by that name is in the table.

### 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`.

`table` : | a GtkTextTagTable
`func` : | a function to call on each tag
`data` : | user data

### gtk_text_tag_table_get_size ()

    gint        gtk_text_tag_table_get_size     (GtkTextTagTable *table);

Returns the size of the table (number of tags)

`table` : | a GtkTextTagTable
Returns : | number of tags in `table`

## Signals

### The "tag-added" signal

    void        user_function                  (GtkTextTagTable *texttagtable,
                                                GtkTextTag *arg1,
                                                gpointer user_data);

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

### The "tag-changed" signal

    void        user_function                  (GtkTextTagTable *texttagtable,
                                                GtkTextTag *arg1,
                                                gboolean arg2,
                                                gpointer user_data);

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

### The "tag-removed" signal

    void        user_function                  (GtkTextTagTable *texttagtable,
                                                GtkTextTag *arg1,
                                                gpointer user_data);

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