Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > e3918135d52936bad0ecc8654eedea12 > files > 358

Falcon-doc-0.9.6.8-1.fc15.noarch.rpm

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head><meta content="text/html;charset=&amp;quot;utf-8&amp;quot;" http-equiv="Content-type"/><link href="faldoc.css" rel="stylesheet" type="text/css"/><title> - Class GtkTreeModelFilter</title></head><body class="faldoc"><ul class="navi_top"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="gtk.html">Up: The Falcon GTK Binding module</a></li>
         <li class="prev"><a href="gtk_GtkTreeModel.html">Previous: Class GtkTreeModel</a></li>
         <li class="next"><a href="gtk_GtkTreeModelSort.html">Next: Class GtkTreeModelSort</a></li>
         <li class="clear"></li>
         </ul><div id="page_body"><h1><span class="toc_number">10.131</span>Class GtkTreeModelFilter</h1><p class="brief">A GtkTreeModel which hides parts of an underlying tree model </p>
         <pre class="prototype">Class GtkTreeModelFilter( child_model, root )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">child_model</td><td class="content"> A GtkTreeModel. </td></tr>
               <tr class="param"><td class="name">root</td><td class="content"> A GtkTreePath or NULL. </td></tr>
               </tbody>
            </table>
         <p>A GtkTreeModelFilter is a tree model which wraps another tree model, and can do the following things: </p>
<p>- Filter specific rows, based on data from a "visible column", a column storing booleans indicating whether the row should be filtered or not, or based on the return value of a "visible function", which gets a model, iter and user_data and returns a boolean indicating whether the row should be filtered or not. </p>
<p>- Modify the "appearance" of the model, using a modify function. This is extremely powerful and allows for just changing some values and also for creating a completely different model based on the given child model. </p>
<p>- Set a different root node, also known as a "virtual root". You can pass in a GtkTreePath indicating the root node for the filter at construction time. </p>
<table class="members">
         <tbody><tr class="member_type"><td class="member_type" colspan="2">Methods</td></tr>
               <tr><td><a href="#clear_cache">clear_cache</a></td><td>This function should almost never be called. </td></tr>
               <tr><td><a href="#convert_child_iter_to_iter">convert_child_iter_to_iter</a></td><td>Returns an iterator pointing to the row in filter that corresponds to the row pointed at by child_iter. </td></tr>
               <tr><td><a href="#convert_child_path_to_path">convert_child_path_to_path</a></td><td>Converts child_path to a path relative to filter. </td></tr>
               <tr><td><a href="#convert_iter_to_child_iter">convert_iter_to_child_iter</a></td><td>Returns an iterator pointing to the row pointed to by filter_iter. </td></tr>
               <tr><td><a href="#convert_path_to_child_path">convert_path_to_child_path</a></td><td>Converts filter_path to a path on the child model of filter. </td></tr>
               <tr><td><a href="#get_model">get_model</a></td><td>Returns a pointer to the child model of filter. </td></tr>
               <tr><td><a href="#refilter">refilter</a></td><td>Emits ::row_changed for each row in the child model, which causes the filter to re-evaluate whether a row is visible or not. </td></tr>
               <tr><td><a href="#set_visible_column">set_visible_column</a></td><td>Sets column of the child_model to be the column where filter should look for visibility information. </td></tr>
               <tr><td><a href="#set_visible_func">set_visible_func</a></td><td>Sets the visible function used when filtering the filter to be func. </td></tr>
               </tbody>
            </table>
         <h2>Methods</h2><h3><a name="clear_cache">clear_cache</a></h3><p class="brief">This function should almost never be called. </p>
         <pre class="prototype">GtkTreeModelFilter.clear_cache()</pre>
         <p>It clears the filter of any cached iterators that haven't been reffed with gtk_tree_model_ref_node(). This might be useful if the child model being filtered is static (and doesn't change often) and there has been a lot of unreffed access to nodes. As a side effect of this function, all unreffed iters will be invalid. </p>
<h3><a name="convert_child_iter_to_iter">convert_child_iter_to_iter</a></h3><p class="brief">Returns an iterator pointing to the row in filter that corresponds to the row pointed at by child_iter. </p>
         <pre class="prototype">GtkTreeModelFilter.convert_child_iter_to_iter( child_iter )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">child_iter</td><td class="content"> A valid GtkTreeIter pointing to a row on the child model. </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">a valid GtkTreeIter pointing to a visible row in child model. </td></tr>
               <tr class="raise"><td class="name">Raise</td><td class="content"><table>
                     <tbody><tr><td class="name"><b>ParamError</b></td><td class="content"> if child_iter is invalid </td></tr>
                           </tbody>
                        </table>
                     </td></tr>
               </tbody>
            </table>
         <h3><a name="convert_child_path_to_path">convert_child_path_to_path</a></h3><p class="brief">Converts child_path to a path relative to filter. </p>
         <pre class="prototype">GtkTreeModelFilter.convert_child_path_to_path( child_path )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">child_path</td><td class="content"> A GtkTreePath to convert. </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">A GtkTreePath, or NULL. </td></tr>
               </tbody>
            </table>
         <p>That is, child_path points to a path in the child model. The returned path will point to the same row in the filtered model. If child_path isn't a valid path on the child model or points to a row which is not visible in filter, then NULL is returned. </p>
<h3><a name="convert_iter_to_child_iter">convert_iter_to_child_iter</a></h3><p class="brief">Returns an iterator pointing to the row pointed to by filter_iter. </p>
         <pre class="prototype">GtkTreeModelFilter.convert_iter_to_child_iter( filter_iter )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">filter_iter</td><td class="content"> A valid GtkTreeIter pointing to a row on filter. </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">a GtkTreeIter. </td></tr>
               </tbody>
            </table>
         <h3><a name="convert_path_to_child_path">convert_path_to_child_path</a></h3><p class="brief">Converts filter_path to a path on the child model of filter. </p>
         <pre class="prototype">GtkTreeModelFilter.convert_path_to_child_path()</pre>
         <p>That is, filter_path points to a location in filter. The returned path will point to the same location in the model not being filtered. If filter_path does not point to a location in the child model, NULL is returned. </p>
<h3><a name="get_model">get_model</a></h3><p class="brief">Returns a pointer to the child model of filter. </p>
         <pre class="prototype">GtkTreeModelFilter.get_model()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">a GtkTreeModel. </td></tr>
               </tbody>
            </table>
         <h3><a name="refilter">refilter</a></h3><p class="brief">Emits ::row_changed for each row in the child model, which causes the filter to re-evaluate whether a row is visible or not. </p>
         <pre class="prototype">GtkTreeModelFilter.refilter()</pre>
         <h3><a name="set_visible_column">set_visible_column</a></h3><p class="brief">Sets column of the child_model to be the column where filter should look for visibility information. </p>
         <pre class="prototype">GtkTreeModelFilter.set_visible_column( column )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">column</td><td class="content"> An integer which is the column containing the visible information. </td></tr>
               </tbody>
            </table>
         <p>columns should be a column of type G_TYPE_BOOLEAN, where TRUE means that a row is visible, and FALSE if not. </p>
<h3><a name="set_visible_func">set_visible_func</a></h3><p class="brief">Sets the visible function used when filtering the filter to be func. </p>
         <pre class="prototype">GtkTreeModelFilter.set_visible_func( func, data )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">func</td><td class="content"> A GtkTreeModelFilterVisibleFunc, the visible function. </td></tr>
               <tr class="param"><td class="name">data</td><td class="content"> User data to pass to the visible function, or NULL. </td></tr>
               </tbody>
            </table>
         <p>The function should return TRUE if the given row should be visible and FALSE otherwise. </p>
<p>If the condition calculated by the function changes over time (e.g. because it depends on some global parameters), you must call gtk_tree_model_filter_refilter() to keep the visibility information of the model uptodate. </p>
<p>Note that func is called whenever a row is inserted, when it may still be empty. The visible function should therefore take special care of empty rows, like in the example below. </p>
<p>[...] </p>
</div><ul class="navi_bottom"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="gtk.html">Up: The Falcon GTK Binding module</a></li>
         <li class="prev"><a href="gtk_GtkTreeModel.html">Previous: Class GtkTreeModel</a></li>
         <li class="next"><a href="gtk_GtkTreeModelSort.html">Next: Class GtkTreeModelSort</a></li>
         <li class="clear"></li>
         </ul><div class="signature">Made with <a href="faldoc 3.0">http://www.falconpl.org</a></div></body></html>