<?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 pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkTreeStore">
<refmeta>
<refentrytitle role="top_of_page" id="GtkTreeStore.top_of_page">GtkTreeStore</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkTreeStore</refname>
<refpurpose>A tree-like data structure that can be used with the GtkTreeView</refpurpose>
</refnamediv>

<refsect1 id="GtkTreeStore.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkTreeStore"><returnvalue>GtkTreeStore</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-store-new">gtk_tree_store_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeStore"><returnvalue>GtkTreeStore</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-store-newv">gtk_tree_store_newv</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-set-column-types">gtk_tree_store_set_column_types</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-set-value">gtk_tree_store_set_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-set">gtk_tree_store_set</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-set-valist">gtk_tree_store_set_valist</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-set-valuesv">gtk_tree_store_set_valuesv</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-remove">gtk_tree_store_remove</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-insert">gtk_tree_store_insert</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-insert-before">gtk_tree_store_insert_before</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-insert-after">gtk_tree_store_insert_after</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-insert-with-values">gtk_tree_store_insert_with_values</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-insert-with-valuesv">gtk_tree_store_insert_with_valuesv</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-prepend">gtk_tree_store_prepend</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-append">gtk_tree_store_append</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-is-ancestor">gtk_tree_store_is_ancestor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-iter-depth">gtk_tree_store_iter_depth</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-clear">gtk_tree_store_clear</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-iter-is-valid">gtk_tree_store_iter_is_valid</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-reorder">gtk_tree_store_reorder</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-swap">gtk_tree_store_swap</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-move-before">gtk_tree_store_move_before</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-store-move-after">gtk_tree_store_move_after</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeStore.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkTreeStore-struct">GtkTreeStore</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeStore.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkTreeStore
</screen>
</refsect1>
<refsect1 id="GtkTreeStore.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkTreeStore implements
 <link linkend="GtkTreeModel">GtkTreeModel</link>,  <link linkend="GtkTreeDragSource">GtkTreeDragSource</link>,  <link linkend="GtkTreeDragDest">GtkTreeDragDest</link>,  <link linkend="GtkTreeSortable">GtkTreeSortable</link> and  <link linkend="GtkBuildable">GtkBuildable</link>.</para>

</refsect1>

<refsect1 id="GtkTreeStore.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkTreeStore.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> object is a list model for use with a <link linkend="GtkTreeView"><type>GtkTreeView</type></link>
widget.  It implements the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> interface, and consequentially,
can use all of the methods available there.  It also implements the
<link linkend="GtkTreeSortable"><type>GtkTreeSortable</type></link> interface so it can be sorted by the view.  Finally,
it also implements the tree
<link linkend="gtk3-GtkTreeView-drag-and-drop">drag and drop</link>
interfaces.</para>
<refsect2><title>GtkTreeStore as GtkBuildable</title><para>The GtkTreeStore implementation of the <link linkend="GtkBuildable"><type>GtkBuildable</type></link> interface allows
to specify the model columns with a &lt;columns> element that may contain
multiple &lt;column> elements, each specifying one model column. The “type”
attribute specifies the data type for the column.</para>
<para>An example of a UI Definition fragment for a tree store:</para>
<informalexample><programlisting role="example"><![CDATA[
<object class="GtkTreeStore">
  <columns>
    <column type="gchararray"/>
    <column type="gchararray"/>
    <column type="gint"/>
  </columns>
</object>
]]></programlisting></informalexample>
<para></para>
</refsect2>

</refsect1>
<refsect1 id="GtkTreeStore.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-tree-store-new" role="function">
<title>gtk_tree_store_new&#160;()</title>
<indexterm zone="gtk-tree-store-new"><primary>gtk_tree_store_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeStore"><returnvalue>GtkTreeStore</returnvalue></link>&#160;*
gtk_tree_store_new (<parameter><link linkend="gint"><type>gint</type></link> n_columns</parameter>,
                    <parameter>...</parameter>);</programlisting>
<para>Creates a new tree store as with <parameter>n_columns</parameter>
 columns each of the types passed
in.  Note that only types derived from standard GObject fundamental types
are supported.</para>
<para>As an example, <literal>gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
GDK_TYPE_TEXTURE);</literal> will create a new <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> with three columns, of type
<link linkend="gint"><type>gint</type></link>, <link linkend="gchararray"><type>gchararray</type></link>, and <link linkend="GdkTexture"><type>GdkTexture</type></link> respectively.</para>
<refsect3 id="gtk-tree-store-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>n_columns</para></entry>
<entry role="parameter_description"><para>number of columns in the tree store</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>all <link linkend="GType"><type>GType</type></link> types for the columns, from first to last</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-store-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-newv" role="function">
<title>gtk_tree_store_newv&#160;()</title>
<indexterm zone="gtk-tree-store-newv"><primary>gtk_tree_store_newv</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeStore"><returnvalue>GtkTreeStore</returnvalue></link>&#160;*
gtk_tree_store_newv (<parameter><link linkend="gint"><type>gint</type></link> n_columns</parameter>,
                     <parameter><link linkend="GType"><type>GType</type></link> *types</parameter>);</programlisting>
<para>Non vararg creation function.  Used primarily by language bindings.</para>

<para><emphasis role="annotation">[<acronym>rename-to</acronym> gtk_tree_store_new]</emphasis></para><refsect3 id="gtk-tree-store-newv.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>n_columns</para></entry>
<entry role="parameter_description"><para>number of columns in the tree store</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>types</para></entry>
<entry role="parameter_description"><para>an array of <link linkend="GType"><type>GType</type></link> types for the columns, from first to last. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=n_columns]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-store-newv.returns" role="returns">
<title>Returns</title>
<para>a new <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-set-column-types" role="function">
<title>gtk_tree_store_set_column_types&#160;()</title>
<indexterm zone="gtk-tree-store-set-column-types"><primary>gtk_tree_store_set_column_types</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_set_column_types (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                                 <parameter><link linkend="gint"><type>gint</type></link> n_columns</parameter>,
                                 <parameter><link linkend="GType"><type>GType</type></link> *types</parameter>);</programlisting>
<para>This function is meant primarily for <link linkend="GObjects"><type>GObjects</type></link> that inherit from 
<link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>, and should only be used when constructing a new 
<link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>.  It will not function after a row has been added, 
or a method on the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> interface is called.</para>
<refsect3 id="gtk-tree-store-set-column-types.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>n_columns</para></entry>
<entry role="parameter_description"><para>Number of columns for the tree store</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>types</para></entry>
<entry role="parameter_description"><para>An array of <link linkend="GType"><type>GType</type></link> types, one for each column. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=n_columns]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-set-value" role="function">
<title>gtk_tree_store_set_value&#160;()</title>
<indexterm zone="gtk-tree-store-set-value"><primary>gtk_tree_store_set_value</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_set_value (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                          <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                          <parameter><link linkend="gint"><type>gint</type></link> column</parameter>,
                          <parameter><link linkend="GValue"><type>GValue</type></link> *value</parameter>);</programlisting>
<para>Sets the data in the cell specified by <parameter>iter</parameter>
 and <parameter>column</parameter>
.
The type of <parameter>value</parameter>
 must be convertible to the type of the
column.</para>
<refsect3 id="gtk-tree-store-set-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> for the row being modified</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>column</para></entry>
<entry role="parameter_description"><para>column number to modify</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>new value for the cell</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-set" role="function">
<title>gtk_tree_store_set&#160;()</title>
<indexterm zone="gtk-tree-store-set"><primary>gtk_tree_store_set</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_set (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                    <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                    <parameter>...</parameter>);</programlisting>
<para>Sets the value of one or more cells in the row referenced by <parameter>iter</parameter>
.
The variable argument list should contain integer column numbers,
each column number followed by the value to be set.
The list is terminated by a -1. For example, to set column 0 with type
<link linkend="G-TYPE-STRING:CAPS"><literal>G_TYPE_STRING</literal></link> to “Foo”, you would write
<literal>gtk_tree_store_set (store, iter, 0, "Foo", -1)</literal>.</para>
<para>The value will be referenced by the store if it is a <link linkend="G-TYPE-OBJECT:CAPS"><literal>G_TYPE_OBJECT</literal></link>, and it
will be copied if it is a <link linkend="G-TYPE-STRING:CAPS"><literal>G_TYPE_STRING</literal></link> or <link linkend="G-TYPE-BOXED:CAPS"><literal>G_TYPE_BOXED</literal></link>.</para>
<refsect3 id="gtk-tree-store-set.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> for the row being modified</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>pairs of column number and value, terminated with -1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-set-valist" role="function">
<title>gtk_tree_store_set_valist&#160;()</title>
<indexterm zone="gtk-tree-store-set-valist"><primary>gtk_tree_store_set_valist</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_set_valist (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                           <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                           <parameter><link linkend="va-list"><type>va_list</type></link> var_args</parameter>);</programlisting>
<para>See <link linkend="gtk-tree-store-set"><function>gtk_tree_store_set()</function></link>; this version takes a va_list for
use by language bindings.</para>
<refsect3 id="gtk-tree-store-set-valist.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> for the row being modified</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>var_args</para></entry>
<entry role="parameter_description"><para>va_list of column/value pairs</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-set-valuesv" role="function">
<title>gtk_tree_store_set_valuesv&#160;()</title>
<indexterm zone="gtk-tree-store-set-valuesv"><primary>gtk_tree_store_set_valuesv</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_set_valuesv (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                            <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                            <parameter><link linkend="gint"><type>gint</type></link> *columns</parameter>,
                            <parameter><link linkend="GValue"><type>GValue</type></link> *values</parameter>,
                            <parameter><link linkend="gint"><type>gint</type></link> n_values</parameter>);</programlisting>
<para>A variant of <link linkend="gtk-tree-store-set-valist"><function>gtk_tree_store_set_valist()</function></link> which takes
the columns and values as two arrays, instead of varargs.  This
function is mainly intended for language bindings or in case
the number of columns to change is not known until run-time.</para>

<para><emphasis role="annotation">[<acronym>rename-to</acronym> gtk_tree_store_set]</emphasis></para><refsect3 id="gtk-tree-store-set-valuesv.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> for the row being modified</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>columns</para></entry>
<entry role="parameter_description"><para>an array of column numbers. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=n_values]</emphasis></entry></row>
<row><entry role="parameter_name"><para>values</para></entry>
<entry role="parameter_description"><para>an array of GValues. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=n_values]</emphasis></entry></row>
<row><entry role="parameter_name"><para>n_values</para></entry>
<entry role="parameter_description"><para>the length of the <parameter>columns</parameter>
and <parameter>values</parameter>
arrays</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-remove" role="function">
<title>gtk_tree_store_remove&#160;()</title>
<indexterm zone="gtk-tree-store-remove"><primary>gtk_tree_store_remove</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_store_remove (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                       <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Removes <parameter>iter</parameter>
 from <parameter>tree_store</parameter>
.  After being removed, <parameter>iter</parameter>
 is set to the
next valid row at that level, or invalidated if it previously pointed to the
last one.</para>
<refsect3 id="gtk-tree-store-remove.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-store-remove.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>iter</parameter>
is still valid, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if not.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-insert" role="function">
<title>gtk_tree_store_insert&#160;()</title>
<indexterm zone="gtk-tree-store-insert"><primary>gtk_tree_store_insert</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_insert (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                       <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                       <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>,
                       <parameter><link linkend="gint"><type>gint</type></link> position</parameter>);</programlisting>
<para>Creates a new row at <parameter>position</parameter>
.  If parent is non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>, then the row will be
made a child of <parameter>parent</parameter>
.  Otherwise, the row will be created at the toplevel.
If <parameter>position</parameter>
 is -1 or is larger than the number of rows at that level, then
the new row will be inserted to the end of the list.  <parameter>iter</parameter>
 will be changed
to point to this new row.  The row will be empty after this function is
called.  To fill in values, you need to call <link linkend="gtk-tree-store-set"><function>gtk_tree_store_set()</function></link> or
<link linkend="gtk-tree-store-set-value"><function>gtk_tree_store_set_value()</function></link>.</para>
<refsect3 id="gtk-tree-store-insert.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>An unset <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> to set to the new row. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>position to insert the new row, or -1 for last</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-insert-before" role="function">
<title>gtk_tree_store_insert_before&#160;()</title>
<indexterm zone="gtk-tree-store-insert-before"><primary>gtk_tree_store_insert_before</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_insert_before (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                              <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                              <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>,
                              <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *sibling</parameter>);</programlisting>
<para>Inserts a new row before <parameter>sibling</parameter>
.  If <parameter>sibling</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, then the row will
be appended to <parameter>parent</parameter>
 ’s children.  If <parameter>parent</parameter>
 and <parameter>sibling</parameter>
 are <link linkend="NULL:CAPS"><literal>NULL</literal></link>, then
the row will be appended to the toplevel.  If both <parameter>sibling</parameter>
 and <parameter>parent</parameter>
 are
set, then <parameter>parent</parameter>
 must be the parent of <parameter>sibling</parameter>
.  When <parameter>sibling</parameter>
 is set,
<parameter>parent</parameter>
 is optional.</para>
<para><parameter>iter</parameter>
 will be changed to point to this new row.  The row will be empty after
this function is called.  To fill in values, you need to call
<link linkend="gtk-tree-store-set"><function>gtk_tree_store_set()</function></link> or <link linkend="gtk-tree-store-set-value"><function>gtk_tree_store_set_value()</function></link>.</para>
<refsect3 id="gtk-tree-store-insert-before.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>An unset <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> to set to the new row. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>sibling</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-insert-after" role="function">
<title>gtk_tree_store_insert_after&#160;()</title>
<indexterm zone="gtk-tree-store-insert-after"><primary>gtk_tree_store_insert_after</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_insert_after (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                             <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                             <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>,
                             <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *sibling</parameter>);</programlisting>
<para>Inserts a new row after <parameter>sibling</parameter>
.  If <parameter>sibling</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, then the row will be
prepended to <parameter>parent</parameter>
 ’s children.  If <parameter>parent</parameter>
 and <parameter>sibling</parameter>
 are <link linkend="NULL:CAPS"><literal>NULL</literal></link>, then
the row will be prepended to the toplevel.  If both <parameter>sibling</parameter>
 and <parameter>parent</parameter>
 are
set, then <parameter>parent</parameter>
 must be the parent of <parameter>sibling</parameter>
.  When <parameter>sibling</parameter>
 is set,
<parameter>parent</parameter>
 is optional.</para>
<para><parameter>iter</parameter>
 will be changed to point to this new row.  The row will be empty after
this function is called.  To fill in values, you need to call
<link linkend="gtk-tree-store-set"><function>gtk_tree_store_set()</function></link> or <link linkend="gtk-tree-store-set-value"><function>gtk_tree_store_set_value()</function></link>.</para>
<refsect3 id="gtk-tree-store-insert-after.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>An unset <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> to set to the new row. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>sibling</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-insert-with-values" role="function">
<title>gtk_tree_store_insert_with_values&#160;()</title>
<indexterm zone="gtk-tree-store-insert-with-values"><primary>gtk_tree_store_insert_with_values</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_insert_with_values (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                                   <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                                   <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>,
                                   <parameter><link linkend="gint"><type>gint</type></link> position</parameter>,
                                   <parameter>...</parameter>);</programlisting>
<para>Creates a new row at <parameter>position</parameter>
. <parameter>iter</parameter>
 will be changed to point to this
new row. If <parameter>position</parameter>
 is -1, or larger than the number of rows on the list, then
the new row will be appended to the list. The row will be filled with
the values given to this function.</para>
<para>Calling
<literal>gtk_tree_store_insert_with_values (tree_store, iter, position, ...)</literal>
has the same effect as calling</para>
<informalexample><programlisting role="example"><![CDATA[
gtk_tree_store_insert (tree_store, iter, position);
gtk_tree_store_set (tree_store, iter, ...);
]]></programlisting></informalexample>
<para>
with the different that the former will only emit a row_inserted signal,
while the latter will emit row_inserted, row_changed and if the tree store
is sorted, rows_reordered.  Since emitting the rows_reordered signal
repeatedly can affect the performance of the program,
<link linkend="gtk-tree-store-insert-with-values"><function>gtk_tree_store_insert_with_values()</function></link> should generally be preferred when
inserting rows in a sorted tree store.</para>
<refsect3 id="gtk-tree-store-insert-with-values.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>An unset <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> to set the new row, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>position to insert the new row, or -1 to append after existing rows</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>pairs of column number and value, terminated with -1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-insert-with-valuesv" role="function">
<title>gtk_tree_store_insert_with_valuesv&#160;()</title>
<indexterm zone="gtk-tree-store-insert-with-valuesv"><primary>gtk_tree_store_insert_with_valuesv</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_insert_with_valuesv (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                                    <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                                    <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>,
                                    <parameter><link linkend="gint"><type>gint</type></link> position</parameter>,
                                    <parameter><link linkend="gint"><type>gint</type></link> *columns</parameter>,
                                    <parameter><link linkend="GValue"><type>GValue</type></link> *values</parameter>,
                                    <parameter><link linkend="gint"><type>gint</type></link> n_values</parameter>);</programlisting>
<para>A variant of <link linkend="gtk-tree-store-insert-with-values"><function>gtk_tree_store_insert_with_values()</function></link> which takes
the columns and values as two arrays, instead of varargs.  This
function is mainly intended for language bindings.</para>

<para><emphasis role="annotation">[<acronym>rename-to</acronym> gtk_tree_store_insert_with_values]</emphasis></para><refsect3 id="gtk-tree-store-insert-with-valuesv.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>An unset <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> to set the new row, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>position to insert the new row, or -1 for last</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>columns</para></entry>
<entry role="parameter_description"><para>an array of column numbers. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=n_values]</emphasis></entry></row>
<row><entry role="parameter_name"><para>values</para></entry>
<entry role="parameter_description"><para>an array of GValues. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=n_values]</emphasis></entry></row>
<row><entry role="parameter_name"><para>n_values</para></entry>
<entry role="parameter_description"><para>the length of the <parameter>columns</parameter>
and <parameter>values</parameter>
arrays</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-prepend" role="function">
<title>gtk_tree_store_prepend&#160;()</title>
<indexterm zone="gtk-tree-store-prepend"><primary>gtk_tree_store_prepend</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_prepend (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                        <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                        <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>);</programlisting>
<para>Prepends a new row to <parameter>tree_store</parameter>
.  If <parameter>parent</parameter>
 is non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>, then it will prepend
the new row before the first child of <parameter>parent</parameter>
, otherwise it will prepend a row
to the top level.  <parameter>iter</parameter>
 will be changed to point to this new row.  The row
will be empty after this function is called.  To fill in values, you need to
call <link linkend="gtk-tree-store-set"><function>gtk_tree_store_set()</function></link> or <link linkend="gtk-tree-store-set-value"><function>gtk_tree_store_set_value()</function></link>.</para>
<refsect3 id="gtk-tree-store-prepend.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>An unset <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> to set to the prepended row. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-append" role="function">
<title>gtk_tree_store_append&#160;()</title>
<indexterm zone="gtk-tree-store-append"><primary>gtk_tree_store_append</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_append (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                       <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                       <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>);</programlisting>
<para>Appends a new row to <parameter>tree_store</parameter>
.  If <parameter>parent</parameter>
 is non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>, then it will append the
new row after the last child of <parameter>parent</parameter>
, otherwise it will append a row to
the top level.  <parameter>iter</parameter>
 will be changed to point to this new row.  The row will
be empty after this function is called.  To fill in values, you need to call
<link linkend="gtk-tree-store-set"><function>gtk_tree_store_set()</function></link> or <link linkend="gtk-tree-store-set-value"><function>gtk_tree_store_set_value()</function></link>.</para>
<refsect3 id="gtk-tree-store-append.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>An unset <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> to set to the appended row. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-is-ancestor" role="function">
<title>gtk_tree_store_is_ancestor&#160;()</title>
<indexterm zone="gtk-tree-store-is-ancestor"><primary>gtk_tree_store_is_ancestor</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_store_is_ancestor (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                            <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                            <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *descendant</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>iter</parameter>
 is an ancestor of <parameter>descendant</parameter>
.  That is, <parameter>iter</parameter>
 is the
parent (or grandparent or great-grandparent) of <parameter>descendant</parameter>
.</para>
<refsect3 id="gtk-tree-store-is-ancestor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>descendant</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-store-is-ancestor.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if <parameter>iter</parameter>
is an ancestor of <parameter>descendant</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-iter-depth" role="function">
<title>gtk_tree_store_iter_depth&#160;()</title>
<indexterm zone="gtk-tree-store-iter-depth"><primary>gtk_tree_store_iter_depth</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_tree_store_iter_depth (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                           <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Returns the depth of <parameter>iter</parameter>
.  This will be 0 for anything on the root level, 1
for anything down a level, etc.</para>
<refsect3 id="gtk-tree-store-iter-depth.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-store-iter-depth.returns" role="returns">
<title>Returns</title>
<para> The depth of <parameter>iter</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-clear" role="function">
<title>gtk_tree_store_clear&#160;()</title>
<indexterm zone="gtk-tree-store-clear"><primary>gtk_tree_store_clear</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_clear (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>);</programlisting>
<para>Removes all rows from <parameter>tree_store</parameter>
</para>
<refsect3 id="gtk-tree-store-clear.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-iter-is-valid" role="function">
<title>gtk_tree_store_iter_is_valid&#160;()</title>
<indexterm zone="gtk-tree-store-iter-is-valid"><primary>gtk_tree_store_iter_is_valid</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_store_iter_is_valid (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                              <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>WARNING: This function is slow. Only use it for debugging and/or testing
purposes.</para>
<para>Checks if the given iter is a valid iter for this <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>.</para>
<refsect3 id="gtk-tree-store-iter-is-valid.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-store-iter-is-valid.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the iter is valid, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if the iter is invalid.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-reorder" role="function">
<title>gtk_tree_store_reorder&#160;()</title>
<indexterm zone="gtk-tree-store-reorder"><primary>gtk_tree_store_reorder</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_reorder (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                        <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>,
                        <parameter><link linkend="gint"><type>gint</type></link> *new_order</parameter>);</programlisting>
<para>Reorders the children of <parameter>parent</parameter>
 in <parameter>tree_store</parameter>
 to follow the order
indicated by <parameter>new_order</parameter>
. Note that this function only works with
unsorted stores.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gtk-tree-store-reorder.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>new_order</para></entry>
<entry role="parameter_description"><para>an array of integers mapping the new position of each child
to its old position before the re-ordering,
i.e. <parameter>new_order</parameter>
<literal>[newpos] = oldpos</literal>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-swap" role="function">
<title>gtk_tree_store_swap&#160;()</title>
<indexterm zone="gtk-tree-store-swap"><primary>gtk_tree_store_swap</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_swap (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                     <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *a</parameter>,
                     <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *b</parameter>);</programlisting>
<para>Swaps <parameter>a</parameter>
 and <parameter>b</parameter>
 in the same level of <parameter>tree_store</parameter>
. Note that this function
only works with unsorted stores.</para>
<refsect3 id="gtk-tree-store-swap.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>a</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>b</para></entry>
<entry role="parameter_description"><para>Another <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-move-before" role="function">
<title>gtk_tree_store_move_before&#160;()</title>
<indexterm zone="gtk-tree-store-move-before"><primary>gtk_tree_store_move_before</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_move_before (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                            <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                            <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *position</parameter>);</programlisting>
<para>Moves <parameter>iter</parameter>
 in <parameter>tree_store</parameter>
 to the position before <parameter>position</parameter>
. <parameter>iter</parameter>
 and
<parameter>position</parameter>
 should be in the same level. Note that this function only
works with unsorted stores. If <parameter>position</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, <parameter>iter</parameter>
 will be
moved to the end of the level.</para>
<refsect3 id="gtk-tree-store-move-before.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-store-move-after" role="function">
<title>gtk_tree_store_move_after&#160;()</title>
<indexterm zone="gtk-tree-store-move-after"><primary>gtk_tree_store_move_after</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_store_move_after (<parameter><link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> *tree_store</parameter>,
                           <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                           <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *position</parameter>);</programlisting>
<para>Moves <parameter>iter</parameter>
 in <parameter>tree_store</parameter>
 to the position after <parameter>position</parameter>
. <parameter>iter</parameter>
 and
<parameter>position</parameter>
 should be in the same level. Note that this function only
works with unsorted stores. If <parameter>position</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, <parameter>iter</parameter>
 will be moved
to the start of the level.</para>
<refsect3 id="gtk-tree-store-move-after.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_store</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkTreeStore.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkTreeStore-struct" role="struct">
<title>struct GtkTreeStore</title>
<indexterm zone="GtkTreeStore-struct"><primary>GtkTreeStore</primary></indexterm>
<programlisting language="C">struct GtkTreeStore;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkTreeStore.see-also">
<title>See Also</title>
<para><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para>

</refsect1>

</refentry>
