1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.TreeModel</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="previous" href="class-gtktreeiter.html" title="gtk.TreeIter"><link rel="next" href="class-gtktreemodelfilter.html" title="gtk.TreeModelFilter"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.TreeModel</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktreeiter.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtktreemodelfilter.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktreemodel"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.TreeModel</h2><p>gtk.TreeModel — the tree interface used by <a href="class-gtktreeview.html" title="gtk.TreeView"><tt class="classname">gtk.TreeView</tt></a></p></div><div class="refsect1" lang="en"><a name="id3579007"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.TreeModel</span></span>(<span class="ooclass"><span class="classname">gobject.GInterface</span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-flags" title="gtk.TreeModel.get_flags">get_flags</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-n-columns" title="gtk.TreeModel.get_n_columns">get_n_columns</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-column-type" title="gtk.TreeModel.get_column_type">get_column_type</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>index</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-iter" title="gtk.TreeModel.get_iter">get_iter</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-iter-from-string" title="gtk.TreeModel.get_iter_from_string">get_iter_from_string</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path_string</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-string-from-iter" title="gtk.TreeModel.get_string_from_iter">get_string_from_iter</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-iter-root" title="gtk.TreeModel.get_iter_root">get_iter_root</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-iter-first" title="gtk.TreeModel.get_iter_first">get_iter_first</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-path" title="gtk.TreeModel.get_path">get_path</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get-value" title="gtk.TreeModel.get_value">get_value</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>column</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--iter-next" title="gtk.TreeModel.iter_next">iter_next</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--iter-children" title="gtk.TreeModel.iter_children">iter_children</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>parent</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--iter-has-child" title="gtk.TreeModel.iter_has_child">iter_has_child</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--iter-n-children" title="gtk.TreeModel.iter_n_children">iter_n_children</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--iter-nth-child" title="gtk.TreeModel.iter_nth_child">iter_nth_child</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>parent</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>n</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--iter-parent" title="gtk.TreeModel.iter_parent">iter_parent</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--ref-node" title="gtk.TreeModel.ref_node">ref_node</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--unref-node" title="gtk.TreeModel.unref_node">unref_node</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--get" title="gtk.TreeModel.get">get</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>column</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--foreach" title="gtk.TreeModel.foreach">foreach</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>func</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_data</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--row-changed" title="gtk.TreeModel.row_changed">row_changed</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--row-inserted" title="gtk.TreeModel.row_inserted">row_inserted</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--row-has-child-toggled" title="gtk.TreeModel.row_has_child_toggled">row_has_child_toggled</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--row-deleted" title="gtk.TreeModel.row_deleted">row_deleted</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--rows-reordered" title="gtk.TreeModel.rows_reordered">rows_reordered</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>new_order</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#method-gtktreemodel--filter-new" title="gtk.TreeModel.filter_new">filter_new</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>root</tt></b></span><span class="initializer">=None</span></span>)</code><br></pre></td></tr></table><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<span class="bold"><b>Functions</b></span>
<code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#function-gtk--tree-row-reference-inserted" title="gtk.tree_row_reference_inserted">gtk.tree_row_reference_inserted</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>proxy</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtktreemodel.html#function-gtk--tree-row-reference-deleted" title="gtk.tree_row_reference_deleted">gtk.tree_row_reference_deleted</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>proxy</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3579671"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtktreemodel.html#signal-gtktreemodel--row-changed" title='The "row-changed" gtk.TreeModel Signal'>row-changed</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktreemodel.html#signal-gtktreemodel--row-deleted" title='The "row-deleted" gtk.TreeModel Signal'>row-deleted</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktreemodel.html#signal-gtktreemodel--row-has-child-toggled" title='The "row-has-child-toggled" gtk.TreeModel Signal'>row-has-child-toggled</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktreemodel.html#signal-gtktreemodel--row-inserted" title='The "row-inserted" gtk.TreeModel Signal'>row-inserted</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktreemodel.html#signal-gtktreemodel--rows-reordered" title='The "rows-reordered" gtk.TreeModel Signal'>rows-reordered</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>new_order</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3579936"></a><h2>Description</h2><p>The <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>
interface defines a generic tree interface for use by the <a href="class-gtktreeview.html" title="gtk.TreeView"><tt class="classname">gtk.TreeView</tt></a>
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 <a href="class-gtktreeview.html" title="gtk.TreeView"><tt class="classname">gtk.TreeView</tt></a>
widget.</p><p>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 Python or GObject
type system (i.e. gobject.TYPE_INT, gtk.BUTTON, gobject.TYPE_STRING, 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.</p><p>In order to make life simpler for programmers who do not need to
write their own specialized model, two generic models are provided: the
<a href="class-gtktreestore.html" title="gtk.TreeStore"><tt class="classname">gtk.TreeStore</tt></a> and
the <a href="class-gtkliststore.html" title="gtk.ListStore"><tt class="classname">gtk.ListStore</tt></a>. 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.</p><p>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. A particular node in a model is referenced using a path or a
<a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
object. Most of the interface consists of operations on a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>.</p><p>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.
A path 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 "0" refers to the
root node and the path "2:4" refers to the fifth child of the third
node.</p><p>By contrast, a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> is a
reference to a specific node on a specific model. One can convert a path to
a treeiter by calling <a href="class-gtktreemodel.html#method-gtktreemodel--get-iter" title="gtk.TreeModel.get_iter"><tt class="methodname">get_iter</tt>()</a>.
These treeiters are the primary way of accessing a model and are similar to
the textiters used by <a href="class-gtktextbuffer.html" title="gtk.TextBuffer"><tt class="classname">gtk.TextBuffer</tt></a>.
The model interface defines a set of operations using them for navigating
the model.</p><p>It is expected that models fill in the treeiter with private data.
For example, the <a href="class-gtkliststore.html" title="gtk.ListStore"><tt class="classname">gtk.ListStore</tt></a>
model, which is internally a simple linked list, stores a list node in one
of the pointers. The <a href="class-gtktreemodelsort.html" title="gtk.TreeModelSort"><tt class="classname">gtk.TreeModelSort</tt></a>
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
treeiters with a model.</p><p>The lifecycle of a treeiter can be a little confusing at first.
treeiters 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 treeiters and nothing needs to be done to free them from the
user's point of view. Additionally, some models guarantee that an treeiter
is valid for as long as the node it refers to is valid (most notably the
<a href="class-gtktreestore.html" title="gtk.TreeStore"><tt class="classname">gtk.TreeStore</tt></a> and
<a href="class-gtkliststore.html" title="gtk.ListStore"><tt class="classname">gtk.ListStore</tt></a>).
Although generally uninteresting, as one always has to allow for the case
where treeiters do not persist beyond a signal, some very important
performance enhancements were made in the sort model. As a result, the
<tt class="literal">gtk.TREE_MODEL_ITERS_PERSIST</tt> flag was added to indicate
this behavior.</p><p>A <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>
object supports some of the Python Mapping protocol that allows you to
retrieve a <a href="class-pygtktreemodelrow.html" title="gtk.TreeModelRow"><tt class="classname">gtk.TreeModelRow</tt></a>
object representing a row in the model. You can also set the values in a row
using the same protocol. For example, you can retrieve the second row of a
<a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>
using any of:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
treemodelrow = model[1]
treemodelrow = model[(1,)]
treemodelrow = model['1']
treemodelrow = model["1"]
</pre></td></tr></table><p>Also if the model has two columns both containing strings then the
following will set the values of the third row.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
model[(2,)] = ('new string value', 'string 2')
</pre></td></tr></table><p>You can also retrieve the number of top level items in the <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a> by
using the Python <tt class="function">len</tt>() function:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
n_rows = len(model)
</pre></td></tr></table><p>A <a href="class-pygtktreemodelrowiter.html" title="gtk.TreeModelRowIter"><tt class="classname">gtk.TreeModelRowIter</tt></a>
object can be retrieved for iterating over the top level rows of a <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a> by
calling the Python <tt class="function">iter</tt>() function:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
treemodelrowiter = iter(model)
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3580230"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-flags"></a><h3>gtk.TreeModel.get_flags</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_flags</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the flags supported by this
interface.</td></tr></tbody></table><p>The <tt class="methodname">get_flags</tt>() method returns a set of
flags supported by this interface. The flags are a bitwise combination
of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.TREE_MODEL_ITERS_PERSIST</tt></span></td><td>Treeiters survive all signals emitted by the
tree.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TREE_MODEL_LIST_ONLY</tt></span></td><td>The model is a list only, and never has
children</td></tr></tbody></table><p>The flags supported should not change during the lifecycle of
the tree_model.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-n-columns"></a><h3>gtk.TreeModel.get_n_columns</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_n_columns</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>The number of columns.</td></tr></tbody></table><p>The <tt class="methodname">get_n_columns</tt>() method returns the
number of columns supported by the treemodel.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-column-type"></a><h3>gtk.TreeModel.get_column_type</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_column_type</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>index</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>index</tt></b>:</span></td><td>the column index.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the type of the column.</td></tr></tbody></table><p>The <tt class="methodname">get_column_type</tt>() method returns
the type of the column.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-iter"></a><h3>gtk.TreeModel.get_iter</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_iter</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a path</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> that
points at <i class="parameter"><tt>path</tt></i>.</td></tr></tbody></table><p>The <tt class="methodname">get_iter</tt>() method returns a new
<a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to <i class="parameter"><tt>path</tt></i>. This method raises a
<tt class="literal">ValueError</tt> exception if <i class="parameter"><tt>path</tt></i> is
not a valid tree path.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-iter-from-string"></a><h3>gtk.TreeModel.get_iter_from_string</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_iter_from_string</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path_string</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>path_string</tt></b>:</span></td><td>a string representation of a
path.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> that
points at the path represented by
<i class="parameter"><tt>path_string</tt></i></td></tr></tbody></table><p>The <tt class="methodname">get_iter_from_string</tt>() method
returns a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the path represented by <i class="parameter"><tt>path_string</tt></i>, if
it exists. This method raises a <tt class="literal">ValueError</tt> exception if
<i class="parameter"><tt>path_string</tt></i> does not represent a valid tree
path.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-string-from-iter"></a><h3>gtk.TreeModel.get_string_from_iter</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_string_from_iter</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>An <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>A string representation of iter</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <tt class="methodname">get_string_from_iter</tt>() method
returns a string representation of the path pointed to by
<i class="parameter"><tt>iter</tt></i>. This string is a ':' separated list of
numbers. For example, "4:10:0:3" would be an acceptable return value for
this string.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-iter-root"></a><h3>gtk.TreeModel.get_iter_root</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_iter_root</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> that
points at the first path in the treemodel or
<tt class="literal">None</tt></td></tr></tbody></table><p>The <tt class="methodname">get_iter_root</tt>() method returns a
<a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the path "0" or <tt class="literal">None</tt> if the tree is
empty.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-iter-first"></a><h3>gtk.TreeModel.get_iter_first</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_iter_first</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> that points at the first path in the treemodel or <tt class="literal">None</tt></td></tr></tbody></table><p>The <tt class="methodname">get_iter_first</tt>() method returns a
<a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the path "0" or <tt class="literal">None</tt> if the tree is
empty.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-path"></a><h3>gtk.TreeModel.get_path</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_path</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the tree path referenced by
<i class="parameter"><tt>iter</tt></i>.</td></tr></tbody></table><p>The <tt class="methodname">get_path</tt>() method returns the tree
path referenced by <i class="parameter"><tt>iter</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get-value"></a><h3>gtk.TreeModel.get_value</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_value</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>column</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>column</tt></b>:</span></td><td>the column value to
retrieve.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a value.</td></tr></tbody></table><p>The <tt class="methodname">get_value</tt>() method returns the
value at <i class="parameter"><tt>column</tt></i> at the path pointed to by
<i class="parameter"><tt>iter</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--iter-next"></a><h3>gtk.TreeModel.iter_next</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">iter_next</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing at the next row or <tt class="literal">None</tt> if there is no
next row.</td></tr></tbody></table><p>The <tt class="methodname">iter_next</tt>() method returns a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing at the row at the current level after the row referenced by
<i class="parameter"><tt>iter</tt></i>. If there is no next row,
<tt class="literal">None</tt> is returned. <i class="parameter"><tt>iter</tt></i> is
unchanged.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--iter-children"></a><h3>gtk.TreeModel.iter_children</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">iter_children</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>parent</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>parent</tt></b>:</span></td><td>the <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the parent</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the new <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> to be
set to the first child or <tt class="literal">None</tt></td></tr></tbody></table><p>The <tt class="methodname">iter_children</tt>() method returns a
new <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the first child of <i class="parameter"><tt>parent</tt></i>. If
<i class="parameter"><tt>parent</tt></i> has no children, <tt class="literal">None</tt> is
returned. <i class="parameter"><tt>parent</tt></i> will remain a valid node after this
method has been called.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--iter-has-child"></a><h3>gtk.TreeModel.iter_has_child</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">iter_has_child</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> to
test for children.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if
<i class="parameter"><tt>iter</tt></i> has children.</td></tr></tbody></table><p>The <tt class="methodname">iter_has_child</tt>() method returns
<tt class="literal">TRUE</tt> if <i class="parameter"><tt>iter</tt></i> has children, or
<tt class="literal">FALSE</tt> otherwise.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--iter-n-children"></a><h3>gtk.TreeModel.iter_n_children</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">iter_n_children</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>, or
<tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the number of children of
<i class="parameter"><tt>iter</tt></i>.</td></tr></tbody></table><p>The <tt class="methodname">iter_n_children</tt>() method returns
the number of children that <i class="parameter"><tt>iter</tt></i> has. As a special
case, if <i class="parameter"><tt>iter</tt></i> is <tt class="literal">None</tt>, then the
number of top level nodes is returned.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--iter-nth-child"></a><h3>gtk.TreeModel.iter_nth_child</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">iter_nth_child</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>parent</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>n</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>parent</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> to
get the child from, or <tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>n</tt></b>:</span></td><td>Then index of the desired
child.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> that
is set to the nth child or <tt class="literal">None</tt></td></tr></tbody></table><p>The <tt class="methodname">iter_nth_child</tt>() method returns a
new <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the child of <i class="parameter"><tt>parent</tt></i>, with the index
specified by <i class="parameter"><tt>n</tt></i>. The first index is 0. If
<i class="parameter"><tt>n</tt></i> is too big, or <i class="parameter"><tt>parent</tt></i> has no
children, this method returns <tt class="literal">None</tt>.
<i class="parameter"><tt>parent</tt></i> will remain a valid node after this function
has been called. As a special case, if <i class="parameter"><tt>parent</tt></i> is
<tt class="literal">None</tt>, then the treeiter points to the
<i class="parameter"><tt>n</tt></i>th root node.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--iter-parent"></a><h3>gtk.TreeModel.iter_parent</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">iter_parent</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>child</tt></b>:</span></td><td>The <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a> set
to the parent of <i class="parameter"><tt>child</tt></i> or
<tt class="literal">None</tt></td></tr></tbody></table><p>The <tt class="methodname">iter_parent</tt>() method returns a
<a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the parent of <i class="parameter"><tt>child</tt></i>. If
<i class="parameter"><tt>child</tt></i> is at the top level, and doesn't have a parent,
then <tt class="literal">None</tt> is returned. <i class="parameter"><tt>child</tt></i> will
remain a valid node after this method has been called.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--ref-node"></a><h3>gtk.TreeModel.ref_node</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ref_node</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>.</td></tr></tbody></table><p>The <tt class="methodname">ref_node</tt>() method lets the
treemodel ref the node that <i class="parameter"><tt>iter</tt></i> points to. This is
an optional method for models to implement. To be more specific, models may
ignore this call as it exists primarily for performance reasons. This
function is primarily meant as a way for views to let the caching model know
when nodes are being displayed (and hence, whether or not to cache that
node.) For example, a file-system based model would not want to keep the
entire file-hierarchy in memory, just the sections that are currently being
displayed by every current view. A model should be expected to be able to
get a treeiter independent of it's reffed state.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--unref-node"></a><h3>gtk.TreeModel.unref_node</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unref_node</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>.</td></tr></tbody></table><p>The <tt class="methodname">unref_node</tt>() method lets the
treemodel unref the node that <i class="parameter"><tt>iter</tt></i> points to. This is
an optional method for models to implement. To be more specific, models may
ignore this call as it exists primarily for performance reasons. For more
information on what this means, see the <a href="class-gtktreemodel.html#method-gtktreemodel--ref-node" title="gtk.TreeModel.ref_node"><tt class="methodname">ref_node</tt>()</a>
method. Please note that nodes that are deleted are not unreffed.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--get"></a><h3>gtk.TreeModel.get</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>column</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing at the row to retrieve data value
from</td></tr><tr><td><span class="term"><i class="parameter"><tt>column</tt></i>:</span></td><td>a column number</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>zero or more column numbers</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing the column
values</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <tt class="methodname">get</tt>() method returns a tuple
containing the values of one or more cells in the row referenced by the
<a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
specified by <i class="parameter"><tt>iter</tt></i>. column specifies the first column
number to retrieve a value from. The additional arguments should contain
integer column numbers for additional column values. For example, to get
values from columns 0 and 3, you would write:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
value0, value3 = treemodel_get(iter, 0, 3)
</pre></td></tr></table><p></p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--foreach"></a><h3>gtk.TreeModel.foreach</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">foreach</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>func</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_data</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>func</tt></i>:</span></td><td>a function to be called on each
row</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_data</tt></i>:</span></td><td>the user data to passed to
<i class="parameter"><tt>func</tt></i>.</td></tr></tbody></table><p>The <tt class="methodname">foreach</tt>() method calls
<i class="parameter"><tt>func</tt></i> on each node in model in a depth-first fashion.
<i class="parameter"><tt>user_data</tt></i> is passed to <i class="parameter"><tt>func</tt></i>
each time it is called. If <i class="parameter"><tt>func</tt></i> returns
<tt class="literal">TRUE</tt>, then the operation ceases, and
<tt class="methodname">foreach</tt>() returns.</p><p>The signature of <i class="parameter"><tt>func</tt></i> is:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
def func(model, path, iter, user_data)
</pre></td></tr></table><p>where <i class="parameter"><tt>model</tt></i> is the treemodel,
<i class="parameter"><tt>path</tt></i> is the current path, and
<i class="parameter"><tt>iter</tt></i> is a treeiter pointing to
<i class="parameter"><tt>path</tt></i>.</p><p>If <i class="parameter"><tt>func</tt></i> is an object method its signature
will be:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
def func(self, model, path, iter, user_data)
</pre></td></tr></table><p></p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--row-changed"></a><h3>gtk.TreeModel.row_changed</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">row_changed</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a path pointing to the changed
row</td></tr><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the changed row</td></tr></tbody></table><p>The <tt class="methodname">row_changed</tt>() method emits the
"row-changed" signal on the treemodel with the parameters
<i class="parameter"><tt>path</tt></i> and <i class="parameter"><tt>iter</tt></i> that are the
path and a treeiter pointing to the path of the changed row.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--row-inserted"></a><h3>gtk.TreeModel.row_inserted</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">row_inserted</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a path pointing to the inserted
row</td></tr><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the inserted row</td></tr></tbody></table><p>The <tt class="methodname">row_inserted</tt>() method emits the
"row-inserted" signal on the treemodel with the parameters
<i class="parameter"><tt>path</tt></i> and <i class="parameter"><tt>iter</tt></i> that are the
path and a treeiter pointing to the path of the inserted row.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--row-has-child-toggled"></a><h3>gtk.TreeModel.row_has_child_toggled</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">row_has_child_toggled</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a path pointing to the changed
row</td></tr><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the changed row</td></tr></tbody></table><p>The <tt class="methodname">row_has_child_toggled</tt>() method
emits the "row-has-child-toggled" signal on the treemodel with the
parameters <i class="parameter"><tt>path</tt></i> and <i class="parameter"><tt>iter</tt></i> that
are the path and a treeiter pointing to the path of the changed row. This
should be called by models after the child state of a node changes.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--row-deleted"></a><h3>gtk.TreeModel.row_deleted</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">row_deleted</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a path pointing to the previous location of the
deleted row.</td></tr></tbody></table><p>The <tt class="methodname">row_deleted</tt>() method emits the
"row-deleted" signal on the treemodel. This should be called by models after
a row has been removed. The location pointed to by
<i class="parameter"><tt>path</tt></i> should be the location that the deleted row was
at. It may not be a valid location anymore.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--rows-reordered"></a><h3>gtk.TreeModel.rows_reordered</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">rows_reordered</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>iter</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>new_order</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>A tree path pointing to the tree node whose
children have been reordered, or <tt class="literal">None</tt> or () or
"" to indicate the top level node.</td></tr><tr><td><span class="term"><b class="parameter"><tt>iter</tt></b>:</span></td><td>A valid <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing to the node whose children have been reordered, or
<tt class="literal">None</tt> to indicate the top level
node.</td></tr><tr><td><span class="term"><b class="parameter"><tt>new_order</tt></b>:</span></td><td>a sequence of integers containing the new
indexes of the children, i.e. the former child <tt class="literal">n</tt> is now
at the position specified by
<i class="parameter"><tt>new_order</tt></i><tt class="literal">[n]</tt>.</td></tr></tbody></table><p>The <tt class="methodname">rows_reordered</tt>() method emits the
"rows_reordered" signal on the tree model. This method should be called by a
tree model when its rows have been reordered. If <i class="parameter"><tt>iter</tt></i>
is <tt class="literal">None</tt> to indicate that the top level rows have been
reordered, <i class="parameter"><tt>path</tt></i> should be <tt class="literal">None</tt> or
() or "".</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodel--filter-new"></a><h3>gtk.TreeModel.filter_new</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">filter_new</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>root</tt></b></span><span class="initializer">=None</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>root</tt></b>:</span></td><td>a tree path or
<tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>A new <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <tt class="methodname">filter_new</tt>() method creates a new
<a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>,
with the tree model as the child_model and the virtual root specified by
<i class="parameter"><tt>root</tt></i>.</p></div></div><div class="refsect1" lang="en"><a name="id3582943"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--tree-row-reference-inserted"></a><h3>gtk.tree_row_reference_inserted</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.tree_row_reference_inserted</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>proxy</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>proxy</tt></b>:</span></td><td>a <a href="class-gobject.html" title="gobject.GObject"><tt class="classname">GObject</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a row position that was
inserted</td></tr></tbody></table><p>The <tt class="function">gtk.tree_row_reference_inserted</tt>()
function lets a set of row references know that the model emitted the
"row_inserted" signal for the row specified by
<i class="parameter"><tt>path</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-gtk--tree-row-reference-deleted"></a><h3>gtk.tree_row_reference_deleted</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.tree_row_reference_deleted</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>proxy</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>proxy</tt></b>:</span></td><td>a <a href="class-gobject.html" title="gobject.GObject"><tt class="classname">GObject</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a row position that was
deleted</td></tr></tbody></table><p>The <tt class="function">gtk.tree_row_reference_deleted</tt>()
function lets a set of row references know that the model emitted the
"row_deleted" signal for the row specified by
<i class="parameter"><tt>path</tt></i>.</p></div></div><div class="refsect1" lang="en"><a name="id3583142"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtktreemodel--row-changed"></a><h3>The "row-changed" gtk.TreeModel Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>treemodel</tt></i>:</span></td><td>the treemodel that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>path</tt></i>:</span></td><td>a path</td></tr><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing at <i class="parameter"><tt>path</tt></i></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "row-changed" signal is emitted when the row specified by
<i class="parameter"><tt>path</tt></i> and pointed to by <i class="parameter"><tt>iter</tt></i>
has changed in the <i class="parameter"><tt>treemodel</tt></i>. Usually, this means
that one or more column values have changed.</p></div><div class="refsect2" lang="en"><a name="signal-gtktreemodel--row-deleted"></a><h3>The "row-deleted" gtk.TreeModel Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>treemodel</tt></i>:</span></td><td>the treemodel that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>path</tt></i>:</span></td><td>a path</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "row-deleted" signal is emitted when the row that was
specified by <i class="parameter"><tt>path</tt></i> is deleted from
<i class="parameter"><tt>treemodel</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtktreemodel--row-has-child-toggled"></a><h3>The "row-has-child-toggled" gtk.TreeModel Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>treemodel</tt></i>:</span></td><td>the treemodel that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>path</tt></i>:</span></td><td>a path</td></tr><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing at <i class="parameter"><tt>path</tt></i></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "row-has-child-toggled" signal is emitted when the child
state of the row specified by <i class="parameter"><tt>path</tt></i> and pointed to by
<i class="parameter"><tt>iter</tt></i> has changed in
<i class="parameter"><tt>treemodel</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtktreemodel--row-inserted"></a><h3>The "row-inserted" gtk.TreeModel Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>treemodel</tt></i>:</span></td><td>the treemodel that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>path</tt></i>:</span></td><td>a path</td></tr><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing at <i class="parameter"><tt>path</tt></i></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "row-inserted" signal is emitted when the row specified by
<i class="parameter"><tt>path</tt></i> and pointed to by <i class="parameter"><tt>iter</tt></i> is
inserted into <i class="parameter"><tt>treemodel</tt></i>. The row referenced by
<i class="parameter"><tt>iter</tt></i> will be empty so using the <a href="class-gtktreemodel.html#method-gtktreemodel--get-value" title="gtk.TreeModel.get_value"><tt class="methodname">get_value</tt>()</a>
method will always return <tt class="literal">None</tt>. Connect to the
"row-changed" signal if you want to track value changes.</p></div><div class="refsect2" lang="en"><a name="signal-gtktreemodel--rows-reordered"></a><h3>The "rows-reordered" gtk.TreeModel Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>treemodel</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>path</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>iter</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>new_order</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>treemodel</tt></i>:</span></td><td>the treemodel that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>path</tt></i>:</span></td><td>a path</td></tr><tr><td><span class="term"><i class="parameter"><tt>iter</tt></i>:</span></td><td>a <a href="class-gtktreeiter.html" title="gtk.TreeIter"><tt class="classname">gtk.TreeIter</tt></a>
pointing at <i class="parameter"><tt>path</tt></i></td></tr><tr><td><span class="term"><i class="parameter"><tt>new_order</tt></i>:</span></td><td>an array of reordered row
numbers</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "rows-reordered" signal is emitted when the
<i class="parameter"><tt>treemodel</tt></i> child rows of the row specified by
<i class="parameter"><tt>path</tt></i> and pointed to by <i class="parameter"><tt>iter</tt></i>
are reordered. <i class="parameter"><tt>new_order</tt></i> is an array of node index
numbers representing the new order of the rows. The value of
<i class="parameter"><tt>new_order</tt></i> cannot be retrieved in PyGTK because it is
passed as an opaque pointer (<a href="class-gobjectgpointer.html" title="gobject.GPointer"><tt class="classname">gobject.GPointer</tt></a>)
value. <i class="parameter"><tt>iter</tt></i> may be <tt class="literal">None</tt> and
<i class="parameter"><tt>path</tt></i> an empty tuple to indicate that the top level
rows were reordered.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtktreeiter.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gtktreemodelfilter.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.TreeIter</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.TreeModelFilter</td></tr></table></div></body></html>
|