2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
2001-09-08 18:23:47 +00:00
|
|
|
GtkTreeModel
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2001-09-08 18:23:47 +00:00
|
|
|
The tree interface used by #GtkTreeView
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2002-03-09 18:06:05 +00:00
|
|
|
The #GtkTreeModel interface defines a generic tree interface for use by
|
|
|
|
the #GtkTreeView widget. It is an abstract interface, and is designed
|
|
|
|
to be usable with any appropriate data structure. The programmer just
|
|
|
|
has to implement this interface on their own data type for it to be
|
|
|
|
viewable by a #GtkTreeView widget.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The model is represented as a hierarchical tree of strongly-typed,
|
|
|
|
columned data. In other words, the model can be seen as a tree where
|
|
|
|
every node has different values depending on which column is being
|
|
|
|
queried. The type of data found in a column is determined by using the
|
|
|
|
GType system (ie. #G_TYPE_INT, #GTK_TYPE_BUTTON, #G_TYPE_POINTER, etc.).
|
|
|
|
The types are homogeneous per column across all nodes. It is important
|
|
|
|
to note that this interface only provides a way of examining a model and
|
|
|
|
observing changes. The implementation of each individual model decides
|
|
|
|
how and if changes are made.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
In order to make life simpler for programmers who do not need to write
|
|
|
|
their own specialized model, two generic models are provided — the
|
|
|
|
#GtkTreeStore and the #GtkListStore. To use these, the developer simply
|
|
|
|
pushes data into these models as necessary. These models provide the
|
|
|
|
data structure as well as all appropriate tree interfaces. As a result,
|
|
|
|
implementing drag and drop, sorting, and storing data is trivial. For
|
|
|
|
the vast majority of trees and lists, these two models are sufficient.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Models are accessed on a node/column level of granularity. One can
|
|
|
|
query for the value of a model at a certain node and a certain column
|
|
|
|
on that node. There are two structures used to reference a particular
|
|
|
|
node in a model. They are the #GtkTreePath and the #GtkTreeIter
|
|
|
|
<footnote>
|
|
|
|
<para>
|
|
|
|
Here, <abbrev>iter</abbrev> is short for <quote>iterator</quote>
|
|
|
|
</para>
|
|
|
|
</footnote>
|
|
|
|
Most of the interface consists of operations on a #GtkTreeIter.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
A path is essentially a potential node. It is a location on a model
|
|
|
|
that may or may not actually correspond to a node on a specific model.
|
|
|
|
The #GtkTreePath struct can be converted into either an array of
|
|
|
|
unsigned integers or a string. The string form is a list of numbers
|
|
|
|
separated by a colon. Each number refers to the offset at that level.
|
|
|
|
Thus, the path <quote>0</quote> refers to the root node and the path
|
|
|
|
<quote>2:4</quote> refers to the fifth child of the third node.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
By contrast, a #GtkTreeIter is a reference to a specific node on a
|
|
|
|
specific model. It is a generic struct with an integer and three
|
|
|
|
generic pointers. These are filled in by the model in a model-specific
|
|
|
|
way. One can convert a path to an iterator by calling
|
|
|
|
gtk_tree_model_get_iter(). These iterators are the primary way of
|
|
|
|
accessing a model and are similar to the iterators used by
|
|
|
|
#GtkTextBuffer. They are generally statically allocated on the heap and
|
|
|
|
only used for a short time. The model interface defines a set of
|
|
|
|
operations using them for navigating the model.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
It is expected that models fill in the iterator with private data. For
|
|
|
|
example, the #GtkListStore model, which is internally a simple linked
|
|
|
|
list, stores a list node in one of the pointers. The #GtkTreeModelSort
|
|
|
|
stores an array and an offset in two of the pointers. Additionally,
|
|
|
|
there is an integer field. This field is generally filled with a unique
|
|
|
|
stamp per model. This stamp is for catching errors resulting from using
|
|
|
|
invalid iterators with a model.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The lifecycle of an iterator can be a little confusing at first.
|
|
|
|
Iterators are expected to always be valid for as long as the model is
|
|
|
|
unchanged (and doesn't emit a signal). The model is considered to own
|
|
|
|
all outstanding iterators and nothing needs to be done to free them from
|
|
|
|
the user's point of view. Additionally, some models guarantee that an
|
|
|
|
iterator is valid for as long as the node it refers to is valid (most
|
|
|
|
notably the #GtkTreeStore and #GtkListStore). Although generally
|
|
|
|
uninteresting, as one always has to allow for the case where iterators
|
|
|
|
do not persist beyond a signal, some very important performance
|
|
|
|
enhancements were made in the sort model. As a result, the
|
|
|
|
#GTK_TREE_MODEL_ITERS_PERSIST flag was added to indicate this behavior.
|
|
|
|
</para>
|
2000-10-30 23:21:38 +00:00
|
|
|
|
2002-03-09 18:06:05 +00:00
|
|
|
<para>
|
|
|
|
To help show some common operation of a model, some examples are
|
|
|
|
provided. The first example shows three ways of getting the iter at the
|
|
|
|
location <quote>3:2:5</quote>. While the first method shown is easier,
|
|
|
|
the second is much more common, as you often get paths from callbacks.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title>Acquiring a <structname>GtkTreeIter</structname></title>
|
2002-03-12 00:20:02 +00:00
|
|
|
<programlisting>
|
2002-03-09 18:06:05 +00:00
|
|
|
/* Three ways of getting the iter pointing to the location
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
GtkTreePath *path;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreeIter parent_iter;
|
|
|
|
|
|
|
|
/* get the iterator from a string */
|
2002-03-12 00:20:02 +00:00
|
|
|
gtk_tree_model_get_iter_from_string (model, &iter, "3:2:5");
|
2002-03-09 18:06:05 +00:00
|
|
|
|
|
|
|
/* get the iterator from a path */
|
|
|
|
path = gtk_tree_path_new_from_string ("3:2:5");
|
2002-03-12 00:20:02 +00:00
|
|
|
gtk_tree_model_get_iter (model, &iter, path);
|
2002-03-09 18:06:05 +00:00
|
|
|
gtk_tree_path_free (path);
|
|
|
|
|
|
|
|
|
|
|
|
/* walk the tree to find the iterator */
|
2002-03-12 00:20:02 +00:00
|
|
|
gtk_tree_model_get_nth_child (model, &iter, NULL, 3);
|
2002-03-09 18:06:05 +00:00
|
|
|
parent_iter = iter;
|
2002-03-12 00:20:02 +00:00
|
|
|
gtk_tree_model_get_nth_child (model, &iter, &parent_iter, 2);
|
2002-03-09 18:06:05 +00:00
|
|
|
parent_iter = iter;
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
gtk_tree_model_get_nth_child (model, &iter, &parent_iter, 5);
|
2002-03-09 18:06:05 +00:00
|
|
|
}
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This second example shows a quick way of iterating through a list and
|
|
|
|
getting a string and an integer from each row. The
|
|
|
|
<function>populate_model</function> function used below is not shown, as
|
|
|
|
it is specific to the #GtkListStore. For information on how to write
|
|
|
|
such a function, see the #GtkListStore documentation.
|
|
|
|
<example>
|
|
|
|
<title>Reading data from a <structname>GtkTreeModel</structname></title>
|
2002-03-12 00:20:02 +00:00
|
|
|
<programlisting>
|
2002-03-09 18:06:05 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
STRING_COLUMN,
|
|
|
|
INT_COLUMN,
|
|
|
|
N_COLUMNS
|
|
|
|
};
|
|
|
|
|
|
|
|
{
|
|
|
|
GtkTreeModel *list_store;
|
|
|
|
GtkTreeIter iter;
|
2002-03-12 05:36:12 +00:00
|
|
|
gboolean valid;
|
|
|
|
gint row_count = 0;
|
2002-03-09 18:06:05 +00:00
|
|
|
|
|
|
|
/* make a new list_store */
|
|
|
|
list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
|
|
|
|
|
|
|
|
/* Fill the list store with data */
|
|
|
|
populate_model (list_store);
|
|
|
|
|
|
|
|
/* Get the first iter in the list */
|
2003-02-21 01:36:30 +00:00
|
|
|
valid = gtk_tree_model_get_iter_first (list_store, &iter);
|
2002-03-09 18:06:05 +00:00
|
|
|
|
2002-03-12 05:36:12 +00:00
|
|
|
while (valid)
|
2002-03-09 18:06:05 +00:00
|
|
|
{
|
2002-03-12 05:36:12 +00:00
|
|
|
/* Walk through the list, reading each row */
|
|
|
|
gchar *str_data;
|
|
|
|
gint int_data;
|
|
|
|
|
2002-04-18 22:04:46 +00:00
|
|
|
/* Make sure you terminate calls to gtk_tree_model_get(<!-- -->)
|
2002-03-12 05:36:12 +00:00
|
|
|
* with a '-1' value
|
|
|
|
*/
|
|
|
|
gtk_tree_model_get (list_store, &iter,
|
|
|
|
STRING_COLUMN, &str_data,
|
|
|
|
INT_COLUMN, &int_data,
|
|
|
|
-1);
|
|
|
|
|
|
|
|
/* Do something with the data */
|
2002-06-03 17:47:31 +00:00
|
|
|
g_print ("Row %d: (%s,%d)\n", row_count, str_data, int_data);
|
2002-03-12 05:36:12 +00:00
|
|
|
g_free (str_data);
|
|
|
|
|
|
|
|
row_count ++;
|
2003-02-21 01:36:30 +00:00
|
|
|
valid = gtk_tree_model_iter_next (list_store, &iter);
|
2002-03-09 18:06:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
2000-10-30 23:21:38 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
2002-04-20 23:57:41 +00:00
|
|
|
#GtkTreeView, #GtkTreeStore, #GtkListStore, <link linkend="gtk-GtkTreeView-drag-and-drop">GtkTreeDnd</link>, #GtkTreeSortable
|
2000-10-30 23:21:38 +00:00
|
|
|
</para>
|
|
|
|
|
2001-11-15 22:20:18 +00:00
|
|
|
<!-- ##### STRUCT GtkTreeModel ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2003-10-24 22:16:07 +00:00
|
|
|
<!-- ##### SIGNAL GtkTreeModel::row-changed ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@treemodel: the object which received the signal.
|
|
|
|
@arg1:
|
|
|
|
@arg2:
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkTreeModel::row-deleted ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@treemodel: the object which received the signal.
|
|
|
|
@arg1:
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkTreeModel::row-has-child-toggled ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@treemodel: the object which received the signal.
|
|
|
|
@arg1:
|
|
|
|
@arg2:
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkTreeModel::row-inserted ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@treemodel: the object which received the signal.
|
|
|
|
@arg1:
|
|
|
|
@arg2:
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkTreeModel::rows-reordered ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@treemodel: the object which received the signal.
|
|
|
|
@arg1:
|
|
|
|
@arg2:
|
|
|
|
@arg3:
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### STRUCT GtkTreeIter ##### -->
|
|
|
|
<para>
|
2002-03-09 18:06:05 +00:00
|
|
|
The <structname>GtkTreeIter</structname> is the primary structure for
|
|
|
|
accessing a structure. Models are expected to put a unique integer in
|
|
|
|
the <structfield>stamp</structfield> member, and put model-specific
|
|
|
|
data in the three <structfield>user_data</structfield> members.
|
2000-10-30 23:21:38 +00:00
|
|
|
</para>
|
|
|
|
|
2002-03-09 18:06:05 +00:00
|
|
|
@stamp: A unique stamp to catch invalid iterators
|
|
|
|
@user_data: Model specific data
|
|
|
|
@user_data2: Model specific data
|
|
|
|
@user_data3: Model specific data
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
<!-- ##### STRUCT GtkTreePath ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2001-10-03 04:44:13 +00:00
|
|
|
<!-- ##### STRUCT GtkTreeRowReference ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### STRUCT GtkTreeModelIface ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@g_iface:
|
2001-09-12 23:16:18 +00:00
|
|
|
@row_changed:
|
|
|
|
@row_inserted:
|
|
|
|
@row_has_child_toggled:
|
|
|
|
@row_deleted:
|
|
|
|
@rows_reordered:
|
2000-11-14 16:36:20 +00:00
|
|
|
@get_flags:
|
2000-10-30 23:21:38 +00:00
|
|
|
@get_n_columns:
|
|
|
|
@get_column_type:
|
|
|
|
@get_iter:
|
|
|
|
@get_path:
|
|
|
|
@get_value:
|
|
|
|
@iter_next:
|
|
|
|
@iter_children:
|
|
|
|
@iter_has_child:
|
|
|
|
@iter_n_children:
|
|
|
|
@iter_nth_child:
|
|
|
|
@iter_parent:
|
2001-03-09 14:49:00 +00:00
|
|
|
@ref_node:
|
|
|
|
@unref_node:
|
2000-11-14 16:36:20 +00:00
|
|
|
|
2001-10-03 04:44:13 +00:00
|
|
|
<!-- ##### USER_FUNCTION GtkTreeModelForeachFunc ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@model:
|
|
|
|
@path:
|
|
|
|
@iter:
|
|
|
|
@data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-11-14 16:36:20 +00:00
|
|
|
<!-- ##### ENUM GtkTreeModelFlags ##### -->
|
|
|
|
<para>
|
2002-03-09 18:06:05 +00:00
|
|
|
These flags indicate various properties of a #GtkTreeModel. They are
|
|
|
|
returned by gtk_tree_model_get_flags(), and must be static for the
|
|
|
|
lifetime of the object. A more complete description of
|
|
|
|
#GTK_TREE_MODEL_ITERS_PERSIST can be found in the overview of this
|
|
|
|
section.
|
2000-11-14 16:36:20 +00:00
|
|
|
</para>
|
|
|
|
|
2002-03-09 18:06:05 +00:00
|
|
|
@GTK_TREE_MODEL_ITERS_PERSIST: Iterators survive all signals emitted by the tree.
|
|
|
|
@GTK_TREE_MODEL_LIST_ONLY: The model is a list only, and never has children
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_new ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_new_from_string ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_path_new_from_indices ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@first_index:
|
|
|
|
@Varargs:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_path_to_string ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-02-24 04:45:31 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_path_new_first ##### -->
|
2000-10-30 23:21:38 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-02-24 04:45:31 +00:00
|
|
|
<!-- ##### MACRO gtk_tree_path_new_root ##### -->
|
|
|
|
<para>
|
Minor documentation fixes
2002-08-10 Soren Sandmann <sandmann@daimi.au.dk>
* docs/reference/gtk/tree_widget.sgml,
docs/reference/gtk/tmpl/gtkdialog.sgml,
docs/reference/gtk/tmpl/gtkentry.sgml,
docs/reference/gtk/tmpl/gtkfilesel.sgml,
docs/reference/gtk/tmpl/gtkfontsel.sgml,
docs/reference/gtk/tmpl/gtkfontseldlg.sgml,
docs/reference/gtk/tmpl/gtktreemodel.sgml,
docs/reference/gtk/tmpl/gtkwidget.sgml, gdk/x11/gdkdisplay-x11.c,
gtk/gtkbbox.c, gtk/gtkbox.c, gtk/gtkbutton.c, gtk/gtkcellrenderer.c,
gtk/gtkcellrendererpixbuf.c, gtk/gtkcellrenderertext.c,
gtk/gtkcheckmenuitem.c, gtk/gtkcontainer.c, gtk/gtkcurve.c,
gtk/gtkdialog.h, gtk/gtkentry.c, gtk/gtkfilesel.c, gtk/gtkfontsel.c,
gtk/gtkframe.c, gtk/gtkhandlebox.c, gtk/gtkiconfactory.c,
gtk/gtkimage.c, gtk/gtkinvisible.c, gtk/gtkitemfactory.c,
gtk/gtklabel.c, gtk/gtklayout.c, gtk/gtkmenu.c, gtk/gtkprogress.c,
gtk/gtkprogressbar.c, gtk/gtkscrolledwindow.c, gtk/gtksizegroup.c,
gtk/gtktable.c, gtk/gtktextiter.c, gtk/gtktexttag.c,
gtk/gtktexttag.h, gtk/gtktextview.c, gtk/gtktogglebutton.c,
gtk/gtktoolbar.c, gtk/gtktreemodel.c, gtk/gtktreeselection.c,
gtk/gtktreestore.c, gtk/gtktreeview.c, gtk/gtktreeviewcolumn.c,
gtk/gtkviewport.c, gtk/gtkwidget.c, gtk/gtkwidget.h,
gtk/gtkwindow.c:
Minor documentation fixes
(#89254, patch from Brett Nash;
#85809, patch from daten@dnetc.org;
#76391, patch from Ross Burton;
#74559, Manuel Clos;
#73569, #72005, Alexey A. Malyshev;
#70061, patch from Dennis Bj"orklund;
#64566, #63388, #58328, #57499, #81007, #77349, Vitaly Tishkov;
#78932, Vitaly Tishkov, patch from Ross Burton;
#73306)
2002-08-10 09:55:41 +00:00
|
|
|
An alternate name for gtk_tree_path_new_iter() provided for
|
2002-02-24 04:45:31 +00:00
|
|
|
compatibility reasons; this macro will be deprecated in future
|
|
|
|
versions of GTK+.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Returns: A new #GtkTreePath.
|
|
|
|
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_path_append_index ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
2002-11-08 19:41:50 +00:00
|
|
|
@index_:
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_prepend_index ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
2002-11-08 19:41:50 +00:00
|
|
|
@index_:
|
2000-10-30 23:21:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_get_depth ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_get_indices ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_free ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_copy ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_compare ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@a:
|
|
|
|
@b:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_next ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_prev ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_up ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_down ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
|
|
|
|
|
2001-10-03 04:44:13 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_path_is_ancestor ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
@descendant:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_path_is_descendant ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@path:
|
|
|
|
@ancestor:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_row_reference_new ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@model:
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_row_reference_new_proxy ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@proxy:
|
|
|
|
@model:
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_row_reference_get_path ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@reference:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_row_reference_valid ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@reference:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_row_reference_free ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@reference:
|
|
|
|
|
|
|
|
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_row_reference_copy ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@reference:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-10-03 04:44:13 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_row_reference_inserted ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@proxy:
|
|
|
|
@path:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_row_reference_deleted ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@proxy:
|
|
|
|
@path:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_row_reference_reordered ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@proxy:
|
|
|
|
@path:
|
|
|
|
@iter:
|
|
|
|
@new_order:
|
|
|
|
|
|
|
|
|
2000-11-14 16:36:20 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_iter_copy ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@iter:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_iter_free ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@iter:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_flags ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_n_columns ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_column_type ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
2002-11-08 19:41:50 +00:00
|
|
|
@index_:
|
2000-10-30 23:21:38 +00:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_iter ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@path:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-11-21 21:43:47 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_iter_from_string ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@path_string:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-02-24 04:45:31 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_iter_first ##### -->
|
2001-10-03 04:44:13 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-02-24 04:45:31 +00:00
|
|
|
<!-- ##### MACRO gtk_tree_model_get_iter_root ##### -->
|
|
|
|
<para>
|
2003-02-24 19:12:34 +00:00
|
|
|
A alternate name for gtk_tree_model_get_iter_first() provided for
|
2002-02-24 04:45:31 +00:00
|
|
|
compatibility reasons; this macro will be deprecated in future
|
|
|
|
versions of GTK+.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model: A #GtkTreeModel.
|
|
|
|
@iter: uninitialized #GtkTreeIter.
|
|
|
|
@Returns: %TRUE, if @iter was set.
|
|
|
|
|
|
|
|
|
2000-10-30 23:21:38 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_path ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_value ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@column:
|
|
|
|
@value:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_iter_next ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_iter_children ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@parent:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_iter_has_child ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_iter_n_children ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_iter_nth_child ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@parent:
|
|
|
|
@n:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_iter_parent ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@child:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_string_from_iter ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-03-23 22:21:06 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_model_ref_node ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_unref_node ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
|
|
|
|
|
2001-10-03 04:44:13 +00:00
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@Varargs:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_get_valist ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@iter:
|
|
|
|
@var_args:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_foreach ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@model:
|
|
|
|
@func:
|
|
|
|
@user_data:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_row_changed ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@path:
|
|
|
|
@iter:
|
|
|
|
<!-- # Unused Parameters # -->
|
|
|
|
@start_path:
|
|
|
|
@start_iter:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_row_inserted ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@path:
|
|
|
|
@iter:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_row_has_child_toggled ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@path:
|
|
|
|
@iter:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_row_deleted ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@path:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_tree_model_rows_reordered ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tree_model:
|
|
|
|
@path:
|
|
|
|
@iter:
|
|
|
|
@new_order:
|
|
|
|
|
|
|
|
|