<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
<refentry id="GtkTextTagTable">
<refmeta>
<refentrytitle role="top_of_page" id="GtkTextTagTable.top_of_page">GtkTextTagTable</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkTextTagTable</refname>
<refpurpose>Collection of tags that can be used together</refpurpose>
</refnamediv>

<refsynopsisdiv id="GtkTextTagTable.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;gtk/gtk.h&gt;

                    <link linkend="GtkTextTagTable-struct">GtkTextTagTable</link>;
<link linkend="void">void</link>                (<link linkend="GtkTextTagTableForeach">*GtkTextTagTableForeach</link>)           (<link linkend="GtkTextTag">GtkTextTag</link> *tag,
                                                         <link linkend="gpointer">gpointer</link> data);
<link linkend="GtkTextTagTable">GtkTextTagTable</link> *   <link linkend="gtk-text-tag-table-new">gtk_text_tag_table_new</link>              (void);
<link linkend="void">void</link>                <link linkend="gtk-text-tag-table-add">gtk_text_tag_table_add</link>              (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table,
                                                         <link linkend="GtkTextTag">GtkTextTag</link> *tag);
<link linkend="void">void</link>                <link linkend="gtk-text-tag-table-remove">gtk_text_tag_table_remove</link>           (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table,
                                                         <link linkend="GtkTextTag">GtkTextTag</link> *tag);
<link linkend="GtkTextTag">GtkTextTag</link> *        <link linkend="gtk-text-tag-table-lookup">gtk_text_tag_table_lookup</link>           (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table,
                                                         const <link linkend="gchar">gchar</link> *name);
<link linkend="void">void</link>                <link linkend="gtk-text-tag-table-foreach">gtk_text_tag_table_foreach</link>          (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table,
                                                         <link linkend="GtkTextTagTableForeach">GtkTextTagTableForeach</link> func,
                                                         <link linkend="gpointer">gpointer</link> data);
<link linkend="gint">gint</link>                <link linkend="gtk-text-tag-table-get-size">gtk_text_tag_table_get_size</link>         (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GtkTextTagTable.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GtkTextTagTable
</synopsis>
</refsect1>






<refsect1 id="GtkTextTagTable.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="GtkTextTagTable-tag-added">tag-added</link>&quot;                                      : Run Last
  &quot;<link linkend="GtkTextTagTable-tag-changed">tag-changed</link>&quot;                                    : Run Last
  &quot;<link linkend="GtkTextTagTable-tag-removed">tag-removed</link>&quot;                                    : Run Last
</synopsis>
</refsect1>


<refsect1 id="GtkTextTagTable.description" role="desc">
<title role="desc.title">Description</title>
<para>
You may wish to begin by reading the <link linkend="TextWidget">text widget
conceptual overview</link> which gives an overview of all the objects and data
types related to the text widget and how they work together.
</para>
<para>
</para>
</refsect1>

<refsect1 id="GtkTextTagTable.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkTextTagTable-struct" role="struct">
<title>GtkTextTagTable</title>
<indexterm zone="GtkTextTagTable-struct"><primary sortas="TextTagTable">GtkTextTagTable</primary></indexterm><programlisting>typedef struct _GtkTextTagTable GtkTextTagTable;</programlisting>
<para>
</para></refsect2>
<refsect2 id="GtkTextTagTableForeach" role="function">
<title>GtkTextTagTableForeach ()</title>
<indexterm zone="GtkTextTagTableForeach"><primary sortas="TextTagTableForeach">GtkTextTagTableForeach</primary></indexterm><programlisting><link linkend="void">void</link>                (*GtkTextTagTableForeach)           (<link linkend="GtkTextTag">GtkTextTag</link> *tag,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>tag</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-text-tag-table-new" role="function">
<title>gtk_text_tag_table_new ()</title>
<indexterm zone="gtk-text-tag-table-new"><primary sortas="text_tag_table_new">gtk_text_tag_table_new</primary></indexterm><programlisting><link linkend="GtkTextTagTable">GtkTextTagTable</link> *   gtk_text_tag_table_new              (void);</programlisting>
<para>
Creates a new <link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link>. The table contains no tags by
default.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-text-tag-table-add" role="function">
<title>gtk_text_tag_table_add ()</title>
<indexterm zone="gtk-text-tag-table-add"><primary sortas="text_tag_table_add">gtk_text_tag_table_add</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_text_tag_table_add              (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table,
                                                         <link linkend="GtkTextTag">GtkTextTag</link> *tag);</programlisting>
<para>
Add a tag to the table. The tag is assigned the highest priority
in the table.
</para>
<para>
<parameter>tag</parameter> must not be in a tag table already, and may not have
the same name as an already-added tag.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tag</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkTextTag"><type>GtkTextTag</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-text-tag-table-remove" role="function">
<title>gtk_text_tag_table_remove ()</title>
<indexterm zone="gtk-text-tag-table-remove"><primary sortas="text_tag_table_remove">gtk_text_tag_table_remove</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_text_tag_table_remove           (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table,
                                                         <link linkend="GtkTextTag">GtkTextTag</link> *tag);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tag</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkTextTag"><type>GtkTextTag</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-text-tag-table-lookup" role="function">
<title>gtk_text_tag_table_lookup ()</title>
<indexterm zone="gtk-text-tag-table-lookup"><primary sortas="text_tag_table_lookup">gtk_text_tag_table_lookup</primary></indexterm><programlisting><link linkend="GtkTextTag">GtkTextTag</link> *        gtk_text_tag_table_lookup           (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table,
                                                         const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Look up a named tag.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> name of a tag
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The tag, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if none by that name is in the table.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-text-tag-table-foreach" role="function">
<title>gtk_text_tag_table_foreach ()</title>
<indexterm zone="gtk-text-tag-table-foreach"><primary sortas="text_tag_table_foreach">gtk_text_tag_table_foreach</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_text_tag_table_foreach          (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table,
                                                         <link linkend="GtkTextTagTableForeach">GtkTextTagTableForeach</link> func,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Calls <parameter>func</parameter> on each tag in <parameter>table</parameter>, with user data <parameter>data</parameter>.
Note that the table may not be modified while iterating 
over it (you can't add/remove tags).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&#160;:</term>
<listitem><simpara> a function to call on each tag
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara> user data
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-text-tag-table-get-size" role="function">
<title>gtk_text_tag_table_get_size ()</title>
<indexterm zone="gtk-text-tag-table-get-size"><primary sortas="text_tag_table_get_size">gtk_text_tag_table_get_size</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_text_tag_table_get_size         (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *table);</programlisting>
<para>
Returns the size of the table (number of tags)</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> number of tags in <parameter>table</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

<refsect1 id="GtkTextTagTable.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkTextTagTable-tag-added" role="signal"><title>The <literal>&quot;tag-added&quot;</literal> signal</title>
<indexterm zone="GtkTextTagTable-tag-added"><primary sortas="TextTagTable::tag-added">GtkTextTagTable::tag-added</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *texttagtable,
                                                        <link linkend="GtkTextTag">GtkTextTag</link>      *arg1,
                                                        <link linkend="gpointer">gpointer</link>         user_data)         : Run Last</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>texttagtable</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkTextTagTable-tag-changed" role="signal"><title>The <literal>&quot;tag-changed&quot;</literal> signal</title>
<indexterm zone="GtkTextTagTable-tag-changed"><primary sortas="TextTagTable::tag-changed">GtkTextTagTable::tag-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *texttagtable,
                                                        <link linkend="GtkTextTag">GtkTextTag</link>      *arg1,
                                                        <link linkend="gboolean">gboolean</link>         arg2,
                                                        <link linkend="gpointer">gpointer</link>         user_data)         : Run Last</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>texttagtable</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg2</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkTextTagTable-tag-removed" role="signal"><title>The <literal>&quot;tag-removed&quot;</literal> signal</title>
<indexterm zone="GtkTextTagTable-tag-removed"><primary sortas="TextTagTable::tag-removed">GtkTextTagTable::tag-removed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkTextTagTable">GtkTextTagTable</link> *texttagtable,
                                                        <link linkend="GtkTextTag">GtkTextTag</link>      *arg1,
                                                        <link linkend="gpointer">gpointer</link>         user_data)         : Run Last</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>texttagtable</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>



</refentry>
