<?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-gtkliststore">
  <refnamediv>
    <refname>gtk.ListStore</refname>
    <refpurpose>a list model to use with a <link
linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link></refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.ListStore</classname></ooclass>
      <ooclass><classname><link
linkend="class-gobject">gobject.GObject</link></classname></ooclass>
      <ooclass><classname><link
linkend="class-gtktreemodel">gtk.TreeModel</link></classname></ooclass>
      <ooclass><classname><link
linkend="class-gtktreedragsource">gtk.TreeDragSource</link></classname></ooclass>
      <ooclass><classname><link
linkend="class-gtktreedragdest">gtk.TreeDragDest</link></classname></ooclass>
      <ooclass><classname><link
linkend="class-gtktreesortable">gtk.TreeSortable</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtkliststore">gtk.ListStore</link></methodname>
	<methodparam><parameter>column_type</parameter></methodparam>
	<methodparam><parameter>...</parameter></methodparam>
      </constructorsynopsis>

      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkliststore--set-column-types">set_column_types</link></methodname>
	<methodparam><parameter>type</parameter></methodparam>
	<methodparam><parameter>...</parameter></methodparam>
      </methodsynopsis>

      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkliststore--set-value">set_value</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">column</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">value</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkliststore--set">set</link></methodname>
	<methodparam><parameter>iter</parameter></methodparam>
	<methodparam><parameter>column_num</parameter></methodparam>
	<methodparam><parameter>value</parameter></methodparam>
	<methodparam><parameter>...</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkliststore--remove">remove</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkliststore--insert">insert</link></methodname>
	<methodparam><parameter
		       role="keyword">position</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">row</parameter><initializer>None</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkliststore--insert-before">insert_before</link></methodname>
	<methodparam><parameter
		       role="keyword">sibling</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">row</parameter><initializer>None</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkliststore--insert-after">insert_after</link></methodname>
	<methodparam><parameter
		       role="keyword">sibling</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">row</parameter><initializer>None</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkliststore--prepend">prepend</link></methodname>
	<methodparam><parameter
		       role="keyword">row</parameter><initializer>None</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkliststore--append">append</link></methodname>
	<methodparam><parameter
		       role="keyword">row</parameter><initializer>None</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkliststore--clear">clear</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>

      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkliststore--iter-is-valid">iter_is_valid</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkliststore--reorder">reorder</link></methodname>
	<methodparam><parameter>new_order</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkliststore--swap">swap</link></methodname>
	<methodparam><parameter
		       role="keyword">a</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">b</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkliststore--move-after">move_after</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">position</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtkliststore--move-before">move_before</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">position</parameter></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkliststore">gtk.ListStore</link>
</synopsis>

  </refsect1>
  
  <refsect1>
		<title>Implemented Interfaces</title>
		<para>
			<link linkend="class-gtkbin"><classname>gtk.ListStore</classname></link>
			implements 
			<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
            <link linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>
            <link linkend="class-gtktreedragsource"><classname>gtk.TreeDragSource</classname></link>
            <link linkend="class-gtktreedragdest"><classname>gtk.TreeDragDest</classname></link>
            <link linkend="class-gtktreesortable"><classname>gtk.TreeSortable</classname></link>
		</para>
	</refsect1>


  <refsect1 id="signal-prototypes-gtkliststore">
    <title>gtk.ListStore Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtktreemodel">gtk.TreeModel Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtktreesortable">gtk.TreeSortable Signal Prototypes</link></para>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>The <link
linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>
object is a list model for use with a <link
linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link>
widget. It implements the <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>
interface, the <link
linkend="class-gtktreesortable"><classname>gtk.TreeSortable</classname></link> 
and the tree drag and drop interfaces.</para>

    <para>The <link
linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>
objects support the Python mapping and iterator protocols. See the <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>
Description and the <ulink
url="http://www.pygtk.org/pygtk2tutorial/sec-TreeModelInterface.html#sec-PythonProtocolSupport">PyGTK
tutorial</ulink> for more information.</para>

  </refsect1>

  <refsect1 id="constructor-gtkliststore">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.ListStore</methodname>
	<methodparam><parameter>column_type</parameter></methodparam>
	<methodparam><parameter>...</parameter></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter>column_type</parameter>&nbsp;:</term>
	<listitem><simpara>the column type of the first
column</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter>...</parameter>&nbsp;:</term>
	<listitem><simpara>optional types for succeeding
columns</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new <link
linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link></simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new list store as with one or more columns with the type
specified by the arguments passed to the constructor. For example,
<literal>gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING,
gtk.gdk.Pixbuf);</literal> will create a new <link
linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>
with three columns, of type int, string and <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link>
respectively. The built-in <link
linkend="class-gobject"><classname>GObject</classname></link> types
are:</para>

    <itemizedlist>
      <listitem>
	<simpara><literal>gobject.TYPE_BOOLEAN</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_BOXED</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_CHAR</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_DOUBLE</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_ENUM</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_FLAGS</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_FLOAT</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_INT</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_INT64</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_INTERFACE</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_INVALID</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_LONG</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_NONE</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_OBJECT</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_PARAM</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_POINTER</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_PYOBJECT</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_STRING</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_UCHAR</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_UINT</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_UINT64</literal></simpara>
      </listitem>
      <listitem>
	<simpara><literal>gobject.TYPE_ULONG</literal></simpara>
      </listitem>
    </itemizedlist>

    <para>The column types can be any <link
linkend="class-gobject"><classname>GObject</classname></link> type including
those that are PyGTK objects or application defined objects that are
subclassed from the <link
linkend="class-gobject"><classname>GObject</classname></link> class.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

  <refsect2 id="method-gtkliststore--set-column-types">
    <title>gtk.ListStore.set_column_types</title>

<programlisting><methodsynopsis language="python">
    <methodname>set_column_types</methodname>
    <methodparam><parameter>type</parameter></methodparam>
    <methodparam><parameter>...</parameter></methodparam>
  </methodsynopsis></programlisting>
  <variablelist>
    <varlistentry>
      <term><parameter>type</parameter>&nbsp;:</term>
      <listitem><simpara>the type of the first column</simpara></listitem>
    </varlistentry>
    <varlistentry>
      <term><parameter>...</parameter>&nbsp;:</term>
      <listitem><simpara>zero or more type specifications</simpara></listitem>
    </varlistentry>
  </variablelist>

      <note>
	<para>This method is available in PyGTK 2.2 and above.</para>
      </note>

      <para>The <methodname>set_column_types</methodname>() method sets the
liststore columns to the types specified by <parameter>type</parameter> and
any additional type parameters. This method is meant primarily for classes
that inherit from <link
linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>,
and should only be used when constructing a new <link
linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>.
It will not function after a row has been added, or a method on the <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>
interface is called.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--set-value">
      <title>gtk.ListStore.set_value</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_value</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">column</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">value</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a valid <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link> for
the row being modified</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">column</parameter>&nbsp;:</term>
	  <listitem><simpara>the column number to
modify</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">value</parameter>&nbsp;:</term>
	  <listitem><simpara>the new value for the cell</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_value</methodname>() method sets the data in
the cell specified by <parameter>iter</parameter> and
<parameter>column</parameter>. The type of <parameter>value</parameter> must
be convertible to the type of the column.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--set">
      <title>gtk.ListStore.set</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set</methodname>
	  <methodparam><parameter>iter</parameter></methodparam>
	  <methodparam><parameter>column_num</parameter></methodparam>
	  <methodparam><parameter>value</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter>iter</parameter>&nbsp;:</term>
	  <listitem><simpara> A valid <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link> for
the row being modified</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>column_num</parameter>&nbsp;:</term>
	  <listitem><simpara>the number of the column to
modify</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>value</parameter>&nbsp;:</term>
	  <listitem><simpara>the new cell value</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional optional sets of column number -
value pairs</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set</methodname>() method sets the value of one
or more cells in the row referenced by <parameter>iter</parameter>. The
argument list should contain integer column numbers, each followed by the
value to be set (the value must be convertible to the type of the cell
column). For example, to set column 0 with type
<literal>gobject.TYPE_STRING</literal> to "Foo", you would write:</para>
      <programlisting>
  liststore.set(iter, 0, "Foo")
</programlisting>

    </refsect2>

    <refsect2 id="method-gtkliststore--remove">
      <title>gtk.ListStore.remove</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>remove</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>A valid <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link> for
the row</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if
<parameter>iter</parameter> is still valid.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>remove</methodname>() method removes the row
specified by <parameter>iter</parameter> from the list store and returns
True if <parameter>iter</parameter> is still valid.  After being removed,
<parameter>iter</parameter> is set to be the next valid row, or is
invalidated if it pointed to the last row.</para>

      <note>
        <para>Prior to PyGTK 2.4 this method returned a new <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link> that
is a copy of <parameter>iter</parameter>.</para>
      </note>

    </refsect2>

    <refsect2 id="method-gtkliststore--insert">
      <title>gtk.ListStore.insert</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert</methodname>
	  <methodparam><parameter
			 role="keyword">position</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">row</parameter><initializer>None</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">position</parameter>&nbsp;:</term>
	  <listitem><simpara>the integer position to insert the new
row</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">row</parameter>&nbsp;:</term>
	  <listitem><simpara>an optional list or tuple containing ordered
column values to set on the row or
<literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>A <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
pointing at the new row</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert</methodname>() method creates a new row
at the location specified by <parameter>position</parameter>. If
<parameter>position</parameter> is larger than the number of rows on the
list, then the new row will be appended to the list. The row will be empty
if <parameter>row</parameter> is not specified or is
<literal>None</literal>. If <parameter>row</parameter> is specified it must
contain a list or tuple of ordered column values (e.g.
[<literal>gobject.TYPE_STRING</literal>,
<literal>gobject.TYPE_INT</literal>]) that are used to set the values in the
cells of the new row. Alternatively, the application can fill in row cell
values using the  <link
linkend="method-gtkliststore--set"><methodname>set</methodname>()</link> or
<link
linkend="method-gtkliststore--set-value"><methodname>set_value</methodname>()</link> 
methods.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--insert-before">
      <title>gtk.ListStore.insert_before</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_before</methodname>
	  <methodparam><parameter
			 role="keyword">sibling</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">row</parameter><initializer>None</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">sibling</parameter>&nbsp;:</term>
	  <listitem><simpara>A valid <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
or <literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">row</parameter>&nbsp;:</term>
	  <listitem><simpara>an optional list or tuple containing ordered
column values to set on the row or
<literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>A <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
pointing at the new row</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_before</methodname>() method inserts a
new row before the row specified by the <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
<parameter>sibling</parameter>. The row will be empty if
<parameter>row</parameter> is not specified or is <literal>None</literal>.
If <parameter>row</parameter> is specified it must contain a list or tuple
of ordered column values (e.g. [<literal>gobject.TYPE_STRING</literal>,
<literal>gobject.TYPE_INT</literal>]) that are used to set the values in the
cells of the new row. Alternatively, the application can fill in row cell
values using the <link
linkend="method-gtkliststore--set"><methodname>set</methodname>()</link> or
<link
linkend="method-gtkliststore--set-value"><methodname>set_value</methodname>()</link>
methods.</para>

      <para>In PyGTK 2.4, if <parameter>sibling</parameter> is
<literal>None</literal> the row will be appended to the liststore.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--insert-after">
      <title>gtk.ListStore.insert_after</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_after</methodname>
	  <methodparam><parameter
			 role="keyword">sibling</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">row</parameter><initializer>None</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">sibling</parameter>&nbsp;:</term>
	  <listitem><simpara>A valid <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
or <literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">row</parameter>&nbsp;:</term>
	  <listitem><simpara>an optional list or tuple containing ordered
column values to set on the row or
<literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>A <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
pointing at the new row</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_after</methodname>() method inserts a new
row after the row specified by the <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
<parameter>sibling</parameter>. The row will be empty if
<parameter>row</parameter> is not specified or is <literal>None</literal>.
If <parameter>row</parameter> is specified it must contain a list or tuple
of ordered column values (e.g. [<literal>gobject.TYPE_STRING</literal>,
<literal>gobject.TYPE_INT</literal>]) that are used to set the values in the
cells of the new row. Alternatively, the application can fill in row cell
values using the  <link
linkend="method-gtkliststore--set"><methodname>set</methodname>()</link> or
<link
linkend="method-gtkliststore--set-value"><methodname>set_value</methodname>()</link> 
methods.</para>

      <para>In PyGTK 2.4, if <parameter>sibling</parameter> is
<literal>None</literal> the row will be prepended to the liststore.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--prepend">
      <title>gtk.ListStore.prepend</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>prepend</methodname>
	  <methodparam><parameter
			 role="keyword">row</parameter><initializer>None</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">row</parameter>&nbsp;:</term>
	  <listitem><simpara>an optional list or tuple containing ordered
column values to set on the row or
<literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>A <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
pointing at the new row</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>prepend</methodname>() method prepends a new row
to the liststore. The row will be empty if <parameter>row</parameter> is not
specified or is <literal>None</literal>. If <parameter>row</parameter> is
specified it must contain a list or tuple of ordered column values (e.g.
[<literal>gobject.TYPE_STRING</literal>,
<literal>gobject.TYPE_INT</literal>]) that are used to set the values in the
cells of the new row. Alternatively, the application can fill in row cell
values using the  <link
linkend="method-gtkliststore--set"><methodname>set</methodname>()</link> or
<link
linkend="method-gtkliststore--set-value"><methodname>set_value</methodname>()</link> 
methods.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--append">
      <title>gtk.ListStore.append</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>append</methodname>
	  <methodparam><parameter
			 role="keyword">row</parameter><initializer>None</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">row</parameter>&nbsp;:</term>
	  <listitem><simpara>an optional list or tuple containing ordered
column values to set on the row or
<literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>A <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
pointing at the new row</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>append</methodname>() method appends a new row
to the liststore. The row will be empty if <parameter>row</parameter> is not
specified or is <literal>None</literal>. If <parameter>row</parameter> is
specified it must contain a list or tuple of ordered column values (e.g.
[<literal>gobject.TYPE_STRING</literal>,
<literal>gobject.TYPE_INT</literal>]) that are used to set the values in the
cells of the new row. Alternatively, the application can fill in row cell
values using the  <link
linkend="method-gtkliststore--set"><methodname>set</methodname>()</link> or
<link
linkend="method-gtkliststore--set-value"><methodname>set_value</methodname>()</link> 
methods.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--clear">
      <title>gtk.ListStore.clear</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>clear</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>

      <para>The <methodname>clear</methodname>() method removes all rows
from the liststore.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--iter-is-valid">
      <title>gtk.ListStore.iter_is_valid</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>iter_is_valid</methodname>
	  <methodparam><parameter role="keyword">iter</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>A <link
	  linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the iter is valid,
	  <literal>False</literal> if the iter is invalid.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.2 and above.</para>
      </note>

      <warning>
	<para>This method is slow. Only use it for debugging and/or testing
purposes.</para>
      </warning>

      <para>The <methodname>iter_is_valid</methodname>() method checks if
the <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
specified by <parameter>iter</parameter> is a valid iter for this <link
linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--reorder">
      <title>gtk.ListStore.reorder</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>reorder</methodname>
	  <methodparam><parameter>new_order</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter>new_order</parameter>&nbsp;:</term>
	  <listitem><simpara>a list of integers. The <link
	  linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>
	  nodes will be rearranged so that the <link
	  linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>
	  node that is at position index
	  <parameter>new_order</parameter><literal>[i]</literal> will be
	  located at position index
	  <literal>i</literal>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.2 and above.</para>
      </note>

      <para>The <methodname>reorder</methodname>() method reorders the <link
      linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>
      items to follow the order indicated by
      <parameter>new_order</parameter>. The <link
      linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>
      nodes will be rearranged so that the <link
      linkend="class-gtkliststore"><classname>gtk.ListStore</classname></link>
      node that is at position index
      <parameter>new_order</parameter><literal>[i]</literal> will be located
      at position index <literal>i</literal>. Note that this method only
      works with unsorted stores.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--swap">
      <title>gtk.ListStore.swap</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>swap</methodname>
	  <methodparam><parameter role="keyword">a</parameter></methodparam>
	  <methodparam><parameter role="keyword">b</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">a</parameter>&nbsp;:</term> <listitem><simpara>A
	  <link
	  linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">b</parameter>&nbsp;:</term>
	  <listitem><simpara>Another <link
	  linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.2 and above.</para>
      </note>

      <para>The <methodname>swap</methodname>() method swaps the liststore
rows specified by the <link
linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>s
<parameter>a</parameter> and <parameter>b</parameter>. Note that this method
only works with unsorted stores.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--move-after">
      <title>gtk.ListStore.move_after</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>move_after</methodname>
	  <methodparam><parameter role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter role="keyword">position</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>A <link
	  linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">position</parameter>&nbsp;:</term>
	  <listitem><simpara>A <link
	  linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>
	  or <literal>None</literal>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.2 and above.</para>
      </note>

      <para>The <methodname>move_after</methodname>() method moves the
liststore row referenced by <parameter>iter</parameter> to the position
after the row referenced by <parameter>position</parameter>. Note that this
method only works with unsorted stores. If <parameter>position</parameter>
is <literal>None</literal>, the row referenced by
<parameter>iter</parameter> will be moved to the start of the list.</para>

    </refsect2>

    <refsect2 id="method-gtkliststore--move-before">
      <title>gtk.ListStore.move_before</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>move_before</methodname>
	  <methodparam><parameter role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter role="keyword">position</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>A <link
	  linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">position</parameter>&nbsp;:</term>
	  <listitem><simpara>A <link
	  linkend="class-gtktreeiter"><classname>gtk.TreeIter</classname></link>,
	  or <literal>None</literal>.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This method is available in PyGTK 2.2 and above.</para>
      </note>

      <para>The <methodname>move_before</methodname>() method moves the
liststore row referenced by <parameter>iter</parameter> to the position
before the row referenced by <parameter>position</parameter>. Note that this
method only works with unsorted stores. If <parameter>position</parameter>
is <literal>None</literal>, the row referenced by
<parameter>iter</parameter> will be moved to the end of the list.</para>

    </refsect2>

  </refsect1>

</refentry>
