<?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="GtkTree">
<refmeta>
<refentrytitle role="top_of_page" id="GtkTree.top_of_page">GtkTree</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkTree</refname>
<refpurpose>A tree widget</refpurpose>
</refnamediv>

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

<synopsis>

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

                    <link linkend="GtkTree-struct">GtkTree</link>;
#define             <link linkend="GTK-IS-ROOT-TREE--CAPS">GTK_IS_ROOT_TREE</link>                    (obj)
#define             <link linkend="GTK-TREE-ROOT-TREE--CAPS">GTK_TREE_ROOT_TREE</link>                  (obj)
#define             <link linkend="GTK-TREE-SELECTION-OLD--CAPS">GTK_TREE_SELECTION_OLD</link>              (obj)
enum                <link linkend="GtkTreeViewMode">GtkTreeViewMode</link>;
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gtk-tree-new">gtk_tree_new</link>                        (void);
<link linkend="void">void</link>                <link linkend="gtk-tree-append">gtk_tree_append</link>                     (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item);
<link linkend="void">void</link>                <link linkend="gtk-tree-prepend">gtk_tree_prepend</link>                    (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item);
<link linkend="void">void</link>                <link linkend="gtk-tree-insert">gtk_tree_insert</link>                     (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item,
                                                         <link linkend="gint">gint</link> position);
<link linkend="void">void</link>                <link linkend="gtk-tree-remove-items">gtk_tree_remove_items</link>               (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GList">GList</link> *items);
<link linkend="void">void</link>                <link linkend="gtk-tree-clear-items">gtk_tree_clear_items</link>                (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="gint">gint</link> start,
                                                         <link linkend="gint">gint</link> end);
<link linkend="void">void</link>                <link linkend="gtk-tree-select-item">gtk_tree_select_item</link>                (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="gint">gint</link> item);
<link linkend="void">void</link>                <link linkend="gtk-tree-unselect-item">gtk_tree_unselect_item</link>              (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="gint">gint</link> item);
<link linkend="void">void</link>                <link linkend="gtk-tree-select-child">gtk_tree_select_child</link>               (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item);
<link linkend="void">void</link>                <link linkend="gtk-tree-unselect-child">gtk_tree_unselect_child</link>             (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item);
<link linkend="gint">gint</link>                <link linkend="gtk-tree-child-position">gtk_tree_child_position</link>             (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *child);
<link linkend="void">void</link>                <link linkend="gtk-tree-set-selection-mode">gtk_tree_set_selection_mode</link>         (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkSelectionMode">GtkSelectionMode</link> mode);
<link linkend="void">void</link>                <link linkend="gtk-tree-set-view-mode">gtk_tree_set_view_mode</link>              (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkTreeViewMode">GtkTreeViewMode</link> mode);
<link linkend="void">void</link>                <link linkend="gtk-tree-set-view-lines">gtk_tree_set_view_lines</link>             (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="gboolean">gboolean</link> flag);
<link linkend="void">void</link>                <link linkend="gtk-tree-remove-item">gtk_tree_remove_item</link>                (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *child);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GtkTree.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
         +----<link linkend="GtkObject">GtkObject</link>
               +----<link linkend="GtkWidget">GtkWidget</link>
                     +----<link linkend="GtkContainer">GtkContainer</link>
                           +----GtkTree
</synopsis>
</refsect1>



<refsect1 id="GtkTree.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkTree implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link> and  <link linkend="GtkBuildable">GtkBuildable</link>.</para>
</refsect1>



<refsect1 id="GtkTree.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="GtkTree-select-child">select-child</link>&quot;                                   : Run First
  &quot;<link linkend="GtkTree-selection-changed">selection-changed</link>&quot;                              : Run First
  &quot;<link linkend="GtkTree-unselect-child">unselect-child</link>&quot;                                 : Run First
</synopsis>
</refsect1>


<refsect1 id="GtkTree.description" role="desc">
<title role="desc.title">Description</title>
<para>
<warning>
<para>
<link linkend="GtkTree"><type>GtkTree</type></link> is deprecated and unsupported. It is known to be
buggy. To use it, you must define the symbol <link linkend="GTK-ENABLE-BROKEN--CAPS"><literal>GTK_ENABLE_BROKEN</literal></link>
prior to including the GTK+ header files. Use <link linkend="GtkTreeView"><type>GtkTreeView</type></link> instead.
</para>
</warning>
The <link linkend="GtkTree"><type>GtkTree</type></link> widget is a container that shows users a list of items, in a tree format complete with branches and leafnodes. Branches can be expanded to show their child items, or collapsed to hide them.
</para>
</refsect1>

<refsect1 id="GtkTree.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkTree-struct" role="struct">
<title>GtkTree</title>
<indexterm zone="GtkTree-struct" role="deprecated"><primary sortas="Tree">GtkTree</primary></indexterm><programlisting>typedef struct _GtkTree GtkTree;</programlisting>
<warning><para><literal>GtkTree</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
<programlisting>
struct _GtkTree
{
  GtkContainer container;
  GList *children;
  GtkTree* root_tree; /* owner of selection list */
  GtkWidget* tree_owner;
  GList *selection;
  guint level;
  guint indent_value;
  guint current_indent;
  guint selection_mode : 2;
  guint view_mode : 1;
  guint view_line : 1;
};
</programlisting>
</para></refsect2>
<refsect2 id="GTK-IS-ROOT-TREE--CAPS" role="macro" condition="deprecated:">
<title>GTK_IS_ROOT_TREE()</title>
<indexterm zone="GTK-IS-ROOT-TREE--CAPS" role="deprecated"><primary sortas="IS_ROOT_TREE">GTK_IS_ROOT_TREE</primary></indexterm><programlisting>#define GTK_IS_ROOT_TREE(obj)   ((GtkObject*) GTK_TREE(obj)-&gt;root_tree == (GtkObject*)obj)
</programlisting>
<warning><para><literal>GTK_IS_ROOT_TREE</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
A macro that returns a boolean value which indicates if <parameter>obj</parameter> is a root tree or not.
</para><variablelist role="params">
<varlistentry><term><parameter>obj</parameter>&#160;:</term>
<listitem><simpara>A pointer to the <link linkend="GtkTree"><type>GtkTree</type></link>. <parameter>obj</parameter> will accept any pointer, but if the pointer does not point to a <link linkend="GtkTree"><type>GtkTree</type></link>, the results are undefined.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GTK-TREE-ROOT-TREE--CAPS" role="macro" condition="deprecated:">
<title>GTK_TREE_ROOT_TREE()</title>
<indexterm zone="GTK-TREE-ROOT-TREE--CAPS" role="deprecated"><primary sortas="TREE_ROOT_TREE">GTK_TREE_ROOT_TREE</primary></indexterm><programlisting>#define GTK_TREE_ROOT_TREE(obj) (GTK_TREE(obj)-&gt;root_tree ? GTK_TREE(obj)-&gt;root_tree : GTK_TREE(obj))
</programlisting>
<warning><para><literal>GTK_TREE_ROOT_TREE</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
A macro that returns the root tree of <parameter>obj</parameter>.
</para>
<para>
If <parameter>obj</parameter> is already a root tree, <parameter>obj</parameter> is cast to <link linkend="GtkTree"><type>GtkTree</type></link> and returned.
</para><variablelist role="params">
<varlistentry><term><parameter>obj</parameter>&#160;:</term>
<listitem><simpara>A pointer to the <link linkend="GtkTree"><type>GtkTree</type></link>. <parameter>obj</parameter> will accept any pointer, but if the pointer does not point to a <link linkend="GtkTree"><type>GtkTree</type></link>, the results are undefined.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GTK-TREE-SELECTION-OLD--CAPS" role="macro" condition="deprecated:">
<title>GTK_TREE_SELECTION_OLD()</title>
<indexterm zone="GTK-TREE-SELECTION-OLD--CAPS" role="deprecated"><primary sortas="TREE_SELECTION_OLD">GTK_TREE_SELECTION_OLD</primary></indexterm><programlisting>#define GTK_TREE_SELECTION_OLD(obj) (GTK_TREE_ROOT_TREE(obj)-&gt;selection)
</programlisting>
<warning><para><literal>GTK_TREE_SELECTION_OLD</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>obj</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GtkTreeViewMode" role="enum" condition="deprecated:">
<title>enum GtkTreeViewMode</title>
<indexterm zone="GtkTreeViewMode" role="deprecated"><primary sortas="TreeViewMode">GtkTreeViewMode</primary></indexterm><programlisting>typedef enum 
{
  GTK_TREE_VIEW_LINE,  /* default view mode */
  GTK_TREE_VIEW_ITEM
} GtkTreeViewMode;
</programlisting>
<warning><para><literal>GtkTreeViewMode</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
</para></refsect2>
<refsect2 id="gtk-tree-new" role="function" condition="deprecated:">
<title>gtk_tree_new ()</title>
<indexterm zone="gtk-tree-new" role="deprecated"><primary sortas="tree_new">gtk_tree_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gtk_tree_new                        (void);</programlisting>
<warning><para><literal>gtk_tree_new</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Creates a new <link linkend="GtkTree"><type>GtkTree</type></link>.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A pointer to the newly allocated widget.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-append" role="function" condition="deprecated:">
<title>gtk_tree_append ()</title>
<indexterm zone="gtk-tree-append" role="deprecated"><primary sortas="tree_append">gtk_tree_append</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_append                     (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item);</programlisting>
<warning><para><literal>gtk_tree_append</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Adds the <link linkend="GtkTreeItem"><type>GtkTreeItem</type></link> in <parameter>tree_item</parameter> to the end of the items in <parameter>tree</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tree_item</parameter>&#160;:</term>
<listitem><simpara>A pointer to the <link linkend="GtkWidget"><type>GtkWidget</type></link> that is to be appended to the tree.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-prepend" role="function" condition="deprecated:">
<title>gtk_tree_prepend ()</title>
<indexterm zone="gtk-tree-prepend" role="deprecated"><primary sortas="tree_prepend">gtk_tree_prepend</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_prepend                    (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item);</programlisting>
<warning><para><literal>gtk_tree_prepend</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Adds the <link linkend="GtkTreeItem"><type>GtkTreeItem</type></link> in <parameter>tree_item</parameter> to the start of the items in <parameter>tree</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tree_item</parameter>&#160;:</term>
<listitem><simpara>A pointer to the <link linkend="GtkWidget"><type>GtkWidget</type></link> that is to be prepended to the tree.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-insert" role="function" condition="deprecated:">
<title>gtk_tree_insert ()</title>
<indexterm zone="gtk-tree-insert" role="deprecated"><primary sortas="tree_insert">gtk_tree_insert</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_insert                     (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item,
                                                         <link linkend="gint">gint</link> position);</programlisting>
<warning><para><literal>gtk_tree_insert</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Adds the <link linkend="GtkTreeItem"><type>GtkTreeItem</type></link> in <parameter>tree_item</parameter> to the list of items in <parameter>tree</parameter> at the position indicated by <parameter>position</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tree_item</parameter>&#160;:</term>
<listitem><simpara>A pointer to the <link linkend="GtkWidget"><type>GtkWidget</type></link> that is to be added to the tree.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>position</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="gint"><type>gint</type></link> that indicates the position in the tree, that the <parameter>tree_item</parameter> is to be added at.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-remove-items" role="function" condition="deprecated:">
<title>gtk_tree_remove_items ()</title>
<indexterm zone="gtk-tree-remove-items" role="deprecated"><primary sortas="tree_remove_items">gtk_tree_remove_items</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_remove_items               (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GList">GList</link> *items);</programlisting>
<warning><para><literal>gtk_tree_remove_items</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Removes a list of items from the <link linkend="GtkTree"><type>GtkTree</type></link> in <parameter>tree</parameter>.
</para>
<para>
If only one item is to be removed from the <link linkend="GtkTree"><type>GtkTree</type></link>, <link linkend="gtk-container-remove"><function>gtk_container_remove()</function></link> can be used instead.
</para>
<para>
Removing an item from a <link linkend="GtkTree"><type>GtkTree</type></link> dereferences the item, and thus usually destroys the item and any subtrees it may contain. If the item is not to be destroyed, use <link linkend="g-object-ref"><function>g_object_ref()</function></link> before removing it.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>items</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GList"><type>GList</type></link> that contains the items to be removed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-clear-items" role="function" condition="deprecated:">
<title>gtk_tree_clear_items ()</title>
<indexterm zone="gtk-tree-clear-items" role="deprecated"><primary sortas="tree_clear_items">gtk_tree_clear_items</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_clear_items                (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="gint">gint</link> start,
                                                         <link linkend="gint">gint</link> end);</programlisting>
<warning><para><literal>gtk_tree_clear_items</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Removes the items at positions between <parameter>start</parameter> and <parameter>end</parameter> from the <link linkend="GtkTree"><type>GtkTree</type></link> <parameter>tree</parameter>.
</para>
<para>
Removing an item from a <link linkend="GtkTree"><type>GtkTree</type></link> dereferences the item, and thus usually destroys the item and any subtrees it may contain. If the item is not to be destroyed, use <link linkend="g-object-ref"><function>g_object_ref()</function></link> before removing it.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="gint"><type>gint</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="gint"><type>gint</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-select-item" role="function" condition="deprecated:">
<title>gtk_tree_select_item ()</title>
<indexterm zone="gtk-tree-select-item" role="deprecated"><primary sortas="tree_select_item">gtk_tree_select_item</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_select_item                (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="gint">gint</link> item);</programlisting>
<warning><para><literal>gtk_tree_select_item</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Emits the <link linkend="select-item"><type>select_item</type></link> signal for the child at position <parameter>item</parameter>, and thus selects it (unless it is unselected in a signal handler).
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>item</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="gint"><type>gint</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-unselect-item" role="function" condition="deprecated:">
<title>gtk_tree_unselect_item ()</title>
<indexterm zone="gtk-tree-unselect-item" role="deprecated"><primary sortas="tree_unselect_item">gtk_tree_unselect_item</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_unselect_item              (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="gint">gint</link> item);</programlisting>
<warning><para><literal>gtk_tree_unselect_item</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Emits the <link linkend="unselect-item"><type>unselect_item</type></link> for the child at position <parameter>item</parameter>, and thus unselects it.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>item</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="gint"><type>gint</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-select-child" role="function" condition="deprecated:">
<title>gtk_tree_select_child ()</title>
<indexterm zone="gtk-tree-select-child" role="deprecated"><primary sortas="tree_select_child">gtk_tree_select_child</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_select_child               (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item);</programlisting>
<warning><para><literal>gtk_tree_select_child</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Emits the <link linkend="select-item"><type>select_item</type></link> signal for the child <parameter>tree_item</parameter>, and thus selects it (unless it is unselected in a signal handler).
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tree_item</parameter>&#160;:</term>
<listitem><simpara>A pointer to the <link linkend="GtkWidget"><type>GtkWidget</type></link> that is to be selected.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-unselect-child" role="function" condition="deprecated:">
<title>gtk_tree_unselect_child ()</title>
<indexterm zone="gtk-tree-unselect-child" role="deprecated"><primary sortas="tree_unselect_child">gtk_tree_unselect_child</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_unselect_child             (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *tree_item);</programlisting>
<warning><para><literal>gtk_tree_unselect_child</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Emits the <link linkend="unselect-item"><type>unselect_item</type></link> signal for the child <parameter>tree_item</parameter>, and thus unselects it.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tree_item</parameter>&#160;:</term>
<listitem><simpara>A pointer to the <link linkend="GtkWidget"><type>GtkWidget</type></link> that is to be selected.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-child-position" role="function" condition="deprecated:">
<title>gtk_tree_child_position ()</title>
<indexterm zone="gtk-tree-child-position" role="deprecated"><primary sortas="tree_child_position">gtk_tree_child_position</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_tree_child_position             (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *child);</programlisting>
<warning><para><literal>gtk_tree_child_position</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Returns the position of <parameter>child</parameter> in the <link linkend="GtkTree"><type>GtkTree</type></link> <parameter>tree</parameter>.
</para>
<para>
If <parameter>child</parameter> is not a child of <parameter>tree</parameter>, then -1 is returned.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>child</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkWidget"><type>GtkWidget</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A <link linkend="gint"><type>gint</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-set-selection-mode" role="function" condition="deprecated:">
<title>gtk_tree_set_selection_mode ()</title>
<indexterm zone="gtk-tree-set-selection-mode" role="deprecated"><primary sortas="tree_set_selection_mode">gtk_tree_set_selection_mode</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_set_selection_mode         (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkSelectionMode">GtkSelectionMode</link> mode);</programlisting>
<warning><para><literal>gtk_tree_set_selection_mode</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Sets the selection mode for the <link linkend="GtkTree"><type>GtkTree</type></link> <parameter>tree</parameter>.
</para>
<para>
<parameter>mode</parameter> can be one of
</para>
<itemizedlist>
<listitem>
<para>
<link linkend="GTK-SELECTION-SINGLE--CAPS"><literal>GTK_SELECTION_SINGLE</literal></link> for when only one item can be selected at a time.
</para>
</listitem>
<listitem>
<para>
<link linkend="GTK-SELECTION-BROWSE--CAPS"><literal>GTK_SELECTION_BROWSE</literal></link> for when one item must be selected.
</para>
</listitem>
<listitem>
<para>
<link linkend="GTK-SELECTION-MULTIPLE--CAPS"><literal>GTK_SELECTION_MULTIPLE</literal></link> for when many items can be selected at once.
</para>
</listitem>
<listitem>
<para>
<link linkend="GTK-SELECTION-EXTENDED--CAPS"><literal>GTK_SELECTION_EXTENDED</literal></link> Reserved for later use.
</para>
</listitem>
</itemizedlist>
<para>
The selection mode is only defined for a root tree, as the root tree "owns" the selection.
</para>
<para>
The default mode is <link linkend="GTK-SELECTION-SINGLE--CAPS"><literal>GTK_SELECTION_SINGLE</literal></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="GtkSelectionMode"><type>GtkSelectionMode</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-set-view-mode" role="function" condition="deprecated:">
<title>gtk_tree_set_view_mode ()</title>
<indexterm zone="gtk-tree-set-view-mode" role="deprecated"><primary sortas="tree_set_view_mode">gtk_tree_set_view_mode</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_set_view_mode              (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkTreeViewMode">GtkTreeViewMode</link> mode);</programlisting>
<warning><para><literal>gtk_tree_set_view_mode</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Sets the 'viewmode' for the <link linkend="GtkTree"><type>GtkTree</type></link> in <parameter>tree</parameter>. The 'viewmode' defines how the tree looks when an item is selected.
</para>
<para>
<parameter>mode</parameter> can be one of:
</para>
<itemizedlist>
<listitem>
<para>
<link linkend="GTK-TREE-VIEW-LINE--CAPS"><literal>GTK_TREE_VIEW_LINE</literal></link> : When an item is selected the entire <link linkend="GtkTreeItem"><type>GtkTreeItem</type></link> is highlighted.
</para>
</listitem>
<listitem>
<para>
<link linkend="GTK-TREE-VIEW-ITEM--CAPS"><literal>GTK_TREE_VIEW_ITEM</literal></link> : When an item is selected only the selected item's child widget is highlighted.
</para>
</listitem>
</itemizedlist>
<para>
The default mode is <link linkend="GTK-TREE-VIEW-LINE--CAPS"><literal>GTK_TREE_VIEW_LINE</literal></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="GtkTreeViewMode"><type>GtkTreeViewMode</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-set-view-lines" role="function" condition="deprecated:">
<title>gtk_tree_set_view_lines ()</title>
<indexterm zone="gtk-tree-set-view-lines" role="deprecated"><primary sortas="tree_set_view_lines">gtk_tree_set_view_lines</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_set_view_lines             (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="gboolean">gboolean</link> flag);</programlisting>
<warning><para><literal>gtk_tree_set_view_lines</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Sets whether or not the connecting lines between branches and children are drawn.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flag</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="guint"><type>guint</type></link>, indicating <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, or <link linkend="FALSE--CAPS"><literal>FALSE</literal></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-tree-remove-item" role="function" condition="deprecated:">
<title>gtk_tree_remove_item ()</title>
<indexterm zone="gtk-tree-remove-item" role="deprecated"><primary sortas="tree_remove_item">gtk_tree_remove_item</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_tree_remove_item                (<link linkend="GtkTree">GtkTree</link> *tree,
                                                         <link linkend="GtkWidget">GtkWidget</link> *child);</programlisting>
<warning><para><literal>gtk_tree_remove_item</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Removes the item <parameter>child</parameter> from the <link linkend="GtkTree"><type>GtkTree</type></link> <parameter>tree</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>A pointer to a <link linkend="GtkTree"><type>GtkTree</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>child</parameter>&#160;:</term>
<listitem><simpara>A pointer to the <link linkend="GtkWidget"><type>GtkWidget</type></link> that is to be removed from the tree.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

<refsect1 id="GtkTree.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkTree-select-child" role="signal"><title>The <literal>&quot;select-child&quot;</literal> signal</title>
<indexterm zone="GtkTree-select-child"><primary sortas="Tree::select-child">GtkTree::select-child</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkTree">GtkTree</link>   *tree,
                                                        <link linkend="GtkWidget">GtkWidget</link> *widget,
                                                        <link linkend="gpointer">gpointer</link>   user_data)      : Run First</programlisting>
<para>
This signal is emitted by <parameter>tree</parameter> whenever <parameter>widget</parameter> is about to be selected.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>widget</parameter>&#160;:</term>
<listitem><simpara>The child that is about to be selected.
</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="GtkTree-selection-changed" role="signal"><title>The <literal>&quot;selection-changed&quot;</literal> signal</title>
<indexterm zone="GtkTree-selection-changed"><primary sortas="Tree::selection-changed">GtkTree::selection-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkTree">GtkTree</link> *tree,
                                                        <link linkend="gpointer">gpointer</link> user_data)      : Run First</programlisting>
<para>
This signal is emitted by the root tree whenever the selection changes.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</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="GtkTree-unselect-child" role="signal"><title>The <literal>&quot;unselect-child&quot;</literal> signal</title>
<indexterm zone="GtkTree-unselect-child"><primary sortas="Tree::unselect-child">GtkTree::unselect-child</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkTree">GtkTree</link>   *tree,
                                                        <link linkend="GtkWidget">GtkWidget</link> *widget,
                                                        <link linkend="gpointer">gpointer</link>   user_data)      : Run First</programlisting>
<para>
This signal is emitted by <parameter>tree</parameter> whenever <parameter>widget</parameter> is about to be unselected.
</para><variablelist role="params">
<varlistentry><term><parameter>tree</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>widget</parameter>&#160;:</term>
<listitem><simpara>The child that is about to be unselected.
</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>


<refsect1 id="GtkTree.see-also">
<title>See Also</title>
<para>
<link linkend="GtkTreeList"><type>GtkTreeList</type></link> for the items to put into a <link linkend="GtkTree"><type>GtkTree</type></link>.
</para>
<para>
<link linkend="GtkScrolledWindow"><type>GtkScrolledWindow</type></link> for details on how to scroll around a <link linkend="GtkTree"><type>GtkTree</type></link>.
</para>
</refsect1>

</refentry>
