File: pygtk-pygtktreemodelrowiter.xml

package info (click to toggle)
pygtk 2.24.0-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,636 kB
  • sloc: xml: 182,079; sh: 10,297; python: 10,161; ansic: 2,861; makefile: 1,351
file content (102 lines) | stat: -rw-r--r-- 3,602 bytes parent folder | download | duplicates (5)
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
<?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>