Permalink
Browse files

Mention that Gtk.TreePath can be treated like a list

  • Loading branch information...
sebp committed Oct 27, 2012
1 parent 7115b64 commit 33e83ac55c7dee5d43e6dec3e4f10ee6f9397eb0
Showing with 9 additions and 0 deletions.
  1. +9 −0 source/treeview.txt
View
@@ -132,6 +132,10 @@ path "2:4" refers to the fifth child of the third node.
# Get value at 2nd column
value = treestore.get_value(treeiter, 1)
+Instances of :class:`Gtk.TreePath` can be accessed like lists, i.e.
+``len(treepath)`` returns the depth of the item ``treepath`` is pointing to,
+and ``treepath[i]`` returns the child's index on the *i*-th level.
+
TreeModel Objects
^^^^^^^^^^^^^^^^^
@@ -151,6 +155,11 @@ TreeModel Objects
Returns a :class:`Gtk.TreeIter` instance pointing the node following
*treeiter* at the current level or ``None`` if there is no next iter.
+ .. method:: iter_previous(treeiter)
+
+ Returns a :class:`Gtk.TreeIter` instance pointing the node previous to
+ *treeiter* at the current level or ``None`` if there is no previous iter.
+
.. method:: iter_has_child(treeiter)
Returns ``True`` if *treeiter* has children, ``False`` otherwise.

0 comments on commit 33e83ac

Please sign in to comment.