~ubuntu-branches/ubuntu/natty/pygtk/natty-proposed

« back to all changes in this revision

Viewing changes to docs/html/class-gtktreemodelfilter.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-01-07 11:08:47 UTC
  • mfrom: (1.2.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107110847-f5av7e1ttudh7ra6
Tags: 2.17.0-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.TreeModelFilter</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtktreemodel.html" title="gtk.TreeModel"><link rel="next" href="class-gtktreemodelsort.html" title="gtk.TreeModelSort"></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.TreeModelFilter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktreemodel.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtktreemodelsort.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktreemodelfilter"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.TreeModelFilter</h2><p>gtk.TreeModelFilter — a <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
2
 
which hides parts of an underlying tree (new in PyGTK 2.4)</p></div><div class="refsect1" lang="en"><a name="id3799004"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.TreeModelFilter</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel">gtk.TreeModel</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gtktreedragsource.html" title="gtk.TreeDragSource">gtk.TreeDragSource</a></span></span>):
3
 
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--set-visible-func" title="gtk.TreeModelFilter.set_visible_func">set_visible_func</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-gtktreemodelfilter-%20-set-modify-func">set_modify_func</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--set-visible-column" title="gtk.TreeModelFilter.set_visible_column">set_visible_column</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>column</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--get-model" title="gtk.TreeModelFilter.get_model">get_model</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--convert-child-iter-to-iter" title="gtk.TreeModelFilter.convert_child_iter_to_iter">convert_child_iter_to_iter</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_iter</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--convert-iter-to-child-iter" title="gtk.TreeModelFilter.convert_iter_to_child_iter">convert_iter_to_child_iter</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_iter</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--convert-child-path-to-path" title="gtk.TreeModelFilter.convert_child_path_to_path">convert_child_path_to_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_path</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--convert-path-to-child-path" title="gtk.TreeModelFilter.convert_path_to_child_path">convert_path_to_child_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_path</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--refilter" title="gtk.TreeModelFilter.refilter">refilter</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--clear-cache" title="gtk.TreeModelFilter.clear_cache">clear_cache</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3799352"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.TreeModelFilter</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.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="prev" href="class-gtktreemodel.html" title="gtk.TreeModel"><link rel="next" href="class-gtktreemodelsort.html" title="gtk.TreeModelSort"></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.TreeModelFilter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktreemodel.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtktreemodelsort.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.TreeModelFilter"><a name="class-gtktreemodelfilter"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.TreeModelFilter</h2><p>gtk.TreeModelFilter — a <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
 
2
which hides parts of an underlying tree (new in PyGTK 2.4)</p></div><div class="refsect1" title="Synopsis"><a name="id4109053"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.TreeModelFilter</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel">gtk.TreeModel</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gtktreedragsource.html" title="gtk.TreeDragSource">gtk.TreeDragSource</a></span></span>):
 
3
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--set-visible-func" title="gtk.TreeModelFilter.set_visible_func">set_visible_func</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><PYGTKDOCLINK HREF="method-gtktreemodelfilter-%20-set-modify-func">set_modify_func</PYGTKDOCLINK></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--set-visible-column" title="gtk.TreeModelFilter.set_visible_column">set_visible_column</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>column</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--get-model" title="gtk.TreeModelFilter.get_model">get_model</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--convert-child-iter-to-iter" title="gtk.TreeModelFilter.convert_child_iter_to_iter">convert_child_iter_to_iter</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_iter</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--convert-iter-to-child-iter" title="gtk.TreeModelFilter.convert_iter_to_child_iter">convert_iter_to_child_iter</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_iter</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--convert-child-path-to-path" title="gtk.TreeModelFilter.convert_child_path_to_path">convert_child_path_to_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_path</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--convert-path-to-child-path" title="gtk.TreeModelFilter.convert_path_to_child_path">convert_path_to_child_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_path</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--refilter" title="gtk.TreeModelFilter.refilter">refilter</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--clear-cache" title="gtk.TreeModelFilter.clear_cache">clear_cache</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id4109401"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
4
4
  +-- <a class="link" href="class-gtktreemodelfilter.html" title="gtk.TreeModelFilter">gtk.TreeModelFilter</a> (implements <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel">gtk.TreeModel</a>, <a class="link" href="class-gtktreedragsource.html" title="gtk.TreeDragSource">gtk.TreeDragSource</a>)
5
 
</pre></div><div class="refsect1" lang="en"><a name="properties-gtktreemodelfilter"></a><h2>gtk.TreeModelFilter Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"child-model"</td><td valign="top">Read-Write-Construct Only</td><td valign="top">The <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a> for
 
5
</pre></div><div class="refsect1" title="gtk.TreeModelFilter Properties"><a name="properties-gtktreemodelfilter"></a><h2>gtk.TreeModelFilter Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"child-model"</td><td valign="top">Read-Write-Construct Only</td><td valign="top">The <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a> for
6
6
the filtermodel to filter. Available in GTK+ 2.4 and above.</td></tr><tr valign="top"><td valign="top">"virtual-root"</td><td valign="top">Read-Write-Construct Only</td><td valign="top">The virtual root (relative to the child model) for this
7
 
filtermodel. Available in GTK+ 2.4 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtktreemodelfilter"></a><h2>gtk.TreeModelFilter Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtktreemodel.html#signal-prototypes-gtktreemodel" title="gtk.TreeModel Signal Prototypes">gtk.TreeModel Signal Prototypes</a></p></div><div class="refsect1" lang="en"><a name="id3799520"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This object is available in PyGTK 2.4 and above.</p></div><p>A <a class="link" href="class-gtktreemodelfilter.html" title="gtk.TreeModelFilter"><code class="classname">gtk.TreeModelFilter</code></a>
 
7
filtermodel. Available in GTK+ 2.4 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.TreeModelFilter Signal Prototypes"><a name="signal-prototypes-gtktreemodelfilter"></a><h2>gtk.TreeModelFilter Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtktreemodel.html#signal-prototypes-gtktreemodel" title="gtk.TreeModel Signal Prototypes">gtk.TreeModel Signal Prototypes</a></p></div><div class="refsect1" title="Description"><a name="id4109570"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This object is available in PyGTK 2.4 and above.</p></div><p>A <a class="link" href="class-gtktreemodelfilter.html" title="gtk.TreeModelFilter"><code class="classname">gtk.TreeModelFilter</code></a>
8
8
is a tree model which wraps another tree model, and can do the following
9
 
things:</p><div class="itemizedlist"><ul type="disc"><li>Filter specific rows, based on data from a "visible
 
9
things:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">Filter specific rows, based on data from a "visible
10
10
column", a column storing booleans indicating whether the row should be
11
11
filtered or not, or based on the return value of a "visible function", which
12
12
gets a <em class="parameter"><code>model</code></em>, <em class="parameter"><code>iter</code></em> and
13
13
<em class="parameter"><code>user_data</code></em> and returns a boolean indicating whether
14
 
the row should be filtered or not.</li><li>Modify the "appearance" of the model, using a modify
 
14
the row should be filtered or not.</li><li class="listitem">Modify the "appearance" of the model, using a modify
15
15
function. This is extremely powerful and allows for just changing some
16
16
values and also for creating a completely different synthetic model based on
17
17
the child model. For example, you can create a model with columns
18
 
synthesized from the data in the child model.</li><li>Set a different root node, also known as a "virtual
 
18
synthesized from the data in the child model.</li><li class="listitem">Set a different root node, also known as a "virtual
19
19
root". You can pass in a tree path indicating the root node for the filter
20
20
at construction time.</li></ul></div><p>A <a class="link" href="class-gtktreemodelfilter.html" title="gtk.TreeModelFilter"><code class="classname">gtk.TreeModelFilter</code></a> is 
21
21
created using the <a class="link" href="class-gtktreemodel.html#method-gtktreemodel--filter-new" title="gtk.TreeModel.filter_new"><code class="methodname">gtk.TreeModel.filter_new</code>()</a> method. For example:</p><pre class="programlisting">
24
24
</pre><p>The <a class="link" href="class-gtktreemodelfilter.html" title="gtk.TreeModelFilter"><code class="classname">gtk.TreeModelFilter</code></a>
25
25
objects support the Python mapping and iterator protocols. See the <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
26
26
Description and the <a class="ulink" href="http://www.pygtk.org/pygtk2tutorial/sec-TreeModelInterface.html#sec-PythonProtocolSupport" target="_top">PyGTK
27
 
tutorial</a> for more information.</p></div><div class="refsect1" lang="en"><a name="id3799660"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter--set-visible-func"></a><h3>gtk.TreeModelFilter.set_visible_func</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_visible_func</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>func</code></strong> :</span></p></td><td>a function called to determine the visibility
 
27
tutorial</a> for more information.</p></div><div class="refsect1" title="Methods"><a name="id4109710"></a><h2>Methods</h2><div class="refsect2" title="gtk.TreeModelFilter.set_visible_func"><a name="method-gtktreemodelfilter--set-visible-func"></a><h3>gtk.TreeModelFilter.set_visible_func</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_visible_func</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>func</code></strong> :</span></p></td><td>a function called to determine the visibility
28
28
          of a row</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>User data to pass to
29
 
          <code class="literal">func</code></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 <code class="methodname">set_visible_func</code>() method sets the
 
29
          <code class="literal">func</code></td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_visible_func</code>() method sets the
30
30
visible function used when filtering the rows of the treemodel filter to the
31
31
value of <em class="parameter"><code>func</code></em>. <em class="parameter"><code>data</code></em> is the
32
32
user data that is passed to func (see below). This method will fail if the
37
37
<em class="parameter"><code>iter</code></em> is a <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
38
38
pointing at a row in model and <em class="parameter"><code>user_data</code></em> is the data
39
39
parameter. The function should return <code class="literal">True</code> if the row
40
 
should be visible.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter-%20-set-modify-func"></a><h3>gtk.TreeModelFilter.set_modify_func</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_modify_func</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>types</code></strong> :</span></p></td><td>a sequence containing the column
 
40
should be visible.</p></div><div class="refsect2" title="gtk.TreeModelFilter.set_modify_func"><a name="method-gtktreemodelfilter-%20-set-modify-func"></a><h3>gtk.TreeModelFilter.set_modify_func</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_modify_func</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>types</code></strong> :</span></p></td><td>a sequence containing the column
41
41
          types</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>func</code></strong> :</span></p></td><td>a function that is called to provide the data
42
42
          for a specific row and column</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>user data to pass to the modify function, or
43
 
          <code class="literal">None</code>.</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 <code class="methodname">set_modify_func</code>() method uses the
 
43
          <code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_modify_func</code>() method uses the
44
44
list of column types specified by <em class="parameter"><code>types</code></em> and the
45
45
function specified by <em class="parameter"><code>func</code></em> to provide a synthetic
46
46
model based on the child model of the <a class="link" href="class-gtktreemodelfilter.html" title="gtk.TreeModelFilter"><code class="classname">gtk.TreeModelFilter</code></a>. <em class="parameter"><code>data</code></em>
56
56
and <em class="parameter"><code>user_data</code></em> is
57
57
<em class="parameter"><code>data</code></em>. <em class="parameter"><code>func</code></em> should returns the
58
58
generated value for the specified location in
59
 
<em class="parameter"><code>model</code></em>.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method must be called before the <a class="link" href="class-gtktreemodelfilter.html" title="gtk.TreeModelFilter"><code class="classname">gtk.TreeModelFilter</code></a>
 
59
<em class="parameter"><code>model</code></em>.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method must be called before the <a class="link" href="class-gtktreemodelfilter.html" title="gtk.TreeModelFilter"><code class="classname">gtk.TreeModelFilter</code></a>
60
60
is associated with a <a class="link" href="class-gtktreeview.html" title="gtk.TreeView"><code class="classname">gtk.TreeView</code></a> and
61
61
before either of the <a class="link" href="class-gtktreemodel.html#method-gtktreemodel--get-n-columns" title="gtk.TreeModel.get_n_columns"><code class="methodname">gtk.TreeModel.get_n_columns</code>()</a>
62
62
or <a class="link" href="class-gtktreemodel.html#method-gtktreemodel--get-column-type" title="gtk.TreeModel.get_column_type"><code class="methodname">gtk.TreeModel.get_column_type</code>()</a>
63
63
methods are called. Also this method can only be called once - there is no
64
64
way to change the modify function once it is set.</p></div><p>Since <em class="parameter"><code>func</code></em> is called for every access to
65
65
a value in <em class="parameter"><code>model</code></em>, it will be slow for models with a
66
 
large number of rows and/or columns.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter--set-visible-column"></a><h3>gtk.TreeModelFilter.set_visible_column</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_visible_column</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>column</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>column</code></strong> :</span></p></td><td>the number of the column containing the visible
67
 
          information.</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 <code class="methodname">set_visible_column</code>() method sets
 
66
large number of rows and/or columns.</p></div><div class="refsect2" title="gtk.TreeModelFilter.set_visible_column"><a name="method-gtktreemodelfilter--set-visible-column"></a><h3>gtk.TreeModelFilter.set_visible_column</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_visible_column</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>column</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>column</code></strong> :</span></p></td><td>the number of the column containing the visible
 
67
          information.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_visible_column</code>() method sets
68
68
the visible column setting to the value of
69
69
<em class="parameter"><code>column</code></em>. The visible column setting contains the
70
70
number of the "child-model" column that is used to determine the visibility
72
72
<code class="literal">gobject.TYPE_BOOLEAN</code>, where <code class="literal">True</code> means
73
73
that a row is visible, and <code class="literal">False</code>, not visible. This
74
74
method will fail if the <a class="link" href="class-gtktreemodelfilter.html#method-gtktreemodelfilter--set-visible-func" title="gtk.TreeModelFilter.set_visible_func"><code class="methodname">set_visible_func</code>()</a>
75
 
method has already been called.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter--get-model"></a><h3>gtk.TreeModelFilter.get_model</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_model</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the child <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></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 <code class="methodname">get_model</code>() method returns the
 
75
method has already been called.</p></div><div class="refsect2" title="gtk.TreeModelFilter.get_model"><a name="method-gtktreemodelfilter--get-model"></a><h3>gtk.TreeModelFilter.get_model</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_model</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the child <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a></td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_model</code>() method returns the
76
76
child <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a> of
77
 
the treemodel filter</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter--convert-child-iter-to-iter"></a><h3>gtk.TreeModelFilter.convert_child_iter_to_iter</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_child_iter_to_iter</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_iter</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>child_iter</code></strong> :</span></p></td><td>A valid <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
 
77
the treemodel filter</p></div><div class="refsect2" title="gtk.TreeModelFilter.convert_child_iter_to_iter"><a name="method-gtktreemodelfilter--convert-child-iter-to-iter"></a><h3>gtk.TreeModelFilter.convert_child_iter_to_iter</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_child_iter_to_iter</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_iter</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>child_iter</code></strong> :</span></p></td><td>A valid <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
78
78
          pointing to a row on the child model.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
79
 
          pointing to a row in the treemodel filter.</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 <code class="methodname">convert_child_iter_to_iter</code>() method
 
79
          pointing to a row in the treemodel filter.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">convert_child_iter_to_iter</code>() method
80
80
returns a <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
81
81
pointing to the row in the treemodel filter that corresponds to the child
82
82
treemodel row pointed to by the <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
83
 
specified by <em class="parameter"><code>child_iter</code></em>.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter--convert-iter-to-child-iter"></a><h3>gtk.TreeModelFilter.convert_iter_to_child_iter</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_iter_to_child_iter</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_iter</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>filter_iter</code></strong> :</span></p></td><td>A valid <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
 
83
specified by <em class="parameter"><code>child_iter</code></em>.</p></div><div class="refsect2" title="gtk.TreeModelFilter.convert_iter_to_child_iter"><a name="method-gtktreemodelfilter--convert-iter-to-child-iter"></a><h3>gtk.TreeModelFilter.convert_iter_to_child_iter</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_iter_to_child_iter</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_iter</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>filter_iter</code></strong> :</span></p></td><td>A valid <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
84
84
          pointing to a row in the treemodel filter.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
85
 
          pointing to a row in the child treemodel.</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 <code class="methodname">convert_iter_to_child_iter</code>() method
 
85
          pointing to a row in the child treemodel.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">convert_iter_to_child_iter</code>() method
86
86
a <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
87
87
pointing to the row in the child treemodel that corresponds to the treemodel
88
88
filter row pointed to by the <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
89
 
specified by <em class="parameter"><code>filter_iter</code></em>.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter--convert-child-path-to-path"></a><h3>gtk.TreeModelFilter.convert_child_path_to_path</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_child_path_to_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>child_path</code></strong> :</span></p></td><td>a tree path in the child treemodel to
 
89
specified by <em class="parameter"><code>filter_iter</code></em>.</p></div><div class="refsect2" title="gtk.TreeModelFilter.convert_child_path_to_path"><a name="method-gtktreemodelfilter--convert-child-path-to-path"></a><h3>gtk.TreeModelFilter.convert_child_path_to_path</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_child_path_to_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>child_path</code></strong> :</span></p></td><td>a tree path in the child treemodel to
90
90
          convert.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a treemodel filter tree path, or
91
 
          <code class="literal">None</code>.</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 <code class="methodname">convert_child_path_to_path</code>() method
 
91
          <code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">convert_child_path_to_path</code>() method
92
92
returns a treemodel filter tree path that corresponds to the child treemodel
93
93
tree path specified by <em class="parameter"><code>child_path</code></em>. If
94
94
<em class="parameter"><code>child_path</code></em> isn't a valid path on the child model,
95
 
<code class="literal">None</code> is returned.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter--convert-path-to-child-path"></a><h3>gtk.TreeModelFilter.convert_path_to_child_path</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_path_to_child_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>filter_path</code></strong> :</span></p></td><td>a treemodel filter tree path to
 
95
<code class="literal">None</code> is returned.</p></div><div class="refsect2" title="gtk.TreeModelFilter.convert_path_to_child_path"><a name="method-gtktreemodelfilter--convert-path-to-child-path"></a><h3>gtk.TreeModelFilter.convert_path_to_child_path</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">convert_path_to_child_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filter_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>filter_path</code></strong> :</span></p></td><td>a treemodel filter tree path to
96
96
          convert.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a child treemodel tree path, or
97
 
          <code class="literal">None</code>.</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 <code class="methodname">convert_path_to_child_path</code>() method
 
97
          <code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">convert_path_to_child_path</code>() method
98
98
returns a child treemodel tree path that corresponds to the treemodel filter
99
99
tree path specified by <em class="parameter"><code>filter_path</code></em>. If
100
100
<em class="parameter"><code>filter_path</code></em> does not point to a row in the child
101
 
model, <code class="literal">None</code> is returned.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter--refilter"></a><h3>gtk.TreeModelFilter.refilter</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">refilter</span>(<span class="methodparam"></span>)</code></pre><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 <code class="methodname">refilter</code>() method emits the <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
 
101
model, <code class="literal">None</code> is returned.</p></div><div class="refsect2" title="gtk.TreeModelFilter.refilter"><a name="method-gtktreemodelfilter--refilter"></a><h3>gtk.TreeModelFilter.refilter</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">refilter</span>(<span class="methodparam"></span>)</code></pre><div class="note" title="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 <code class="methodname">refilter</code>() method emits the <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>
102
102
"<a class="link" href="class-gtktreemodel.html#signal-gtktreemodel--row-changed" title='The "row-changed" gtk.TreeModel Signal'>row-changed</a>" signal
103
103
for each row in the child model, thereby causing the filter to re-evaluate
104
 
whether a row is visible or not.</p></div><div class="refsect2" lang="en"><a name="method-gtktreemodelfilter--clear-cache"></a><h3>gtk.TreeModelFilter.clear_cache</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">clear_cache</span>(<span class="methodparam"></span>)</code></pre><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 <code class="methodname">clear_cache</code>() method clears the
 
104
whether a row is visible or not.</p></div><div class="refsect2" title="gtk.TreeModelFilter.clear_cache"><a name="method-gtktreemodelfilter--clear-cache"></a><h3>gtk.TreeModelFilter.clear_cache</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">clear_cache</span>(<span class="methodparam"></span>)</code></pre><div class="note" title="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 <code class="methodname">clear_cache</code>() method clears the
105
105
treemodel filter of any cached iterators that haven't been reffed with the
106
106
<a class="link" href="class-gtktreemodel.html#method-gtktreemodel--ref-node" title="gtk.TreeModel.ref_node"><code class="methodname">gtk.TreeModel.ref_node()</code></a>. This
107
107
might be useful if the child model being filtered is static (and doesn't