<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-pygtktreemodelrowiter">
  <refnamediv>
    <refname>gtk.TreeModelRowIter</refname>
    <refpurpose>an object for iterating over a set of <link
linkend="class-pygtktreemodelrow"><classname>gtk.TreeModelRow</classname></link>
objects.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.TreeModelRowIter</classname></ooclass>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktreemodelrowiter--next">next</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
    </classsynopsis>

</refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GBoxed</link>
    +-- <link linkend="class-gtkwidget">gtk.TreeModelRowIter</link>
</synopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-pygtktreemodelrowiter"><classname>gtk.TreeModelRowIter</classname></link>
is an object that implements the Python Iterator protocol. It provides the
means to iterate over a set of <link
linkend="class-pygtktreemodelrow"><classname>gtk.TreeModelRow</classname></link>
objects in a <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>. A
<link
linkend="class-pygtktreemodelrowiter"><classname>gtk.TreeModelRowIter</classname></link>
is created by calling the Python <function>iter</function>() function on a
<link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>
object:</para>

    <programlisting>
  treemodelrowiter = iter(treestore)
</programlisting>

    <para>or, calling the <link
linkend="method-gtktreemodelrow--iterchildren"><methodname>gtk.TreeModelRow.iterchildren</methodname>()</link>
method to iterate over its child rows.</para>

    <para>Each time you call the <link
linkend="method-gtktreemodelrowiter--next"><methodname>next</methodname>()</link>
method it returns the next sibling <link
linkend="class-pygtktreemodelrow"><classname>gtk.TreeModelRow</classname></link>
. When there are no rows left the StopIteration exception is raised. Note
that a <link
linkend="class-pygtktreemodelrowiter"><classname>gtk.TreeModelRowIter</classname></link>
does not iterate over the child rows of the rows it is iterating
over. You'll have to use the <link
linkend="method-gtktreemodelrow--iterchildren"><methodname>gtk.TreeModelRow.iterchildren</methodname>()</link>
method to retrieve an iterator for the child rows.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtktreemodelrowiter--next">
      <title>gtk.TreeModelRowIter.next</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>next</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the next <link
	  linkend="class-pygtktreemodelrow"><classname>gtk.TreeModelRow</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>next</methodname>() method returns the next
<link
linkend="class-pygtktreemodelrow"><classname>gtk.TreeModelRow</classname></link>
in the set of rows it is iterating over. When there are no more rows left
the StopIteration exception is raised.</para>

    </refsect2>

  </refsect1>

</refentry>
