Sophie

Sophie

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

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 GtkTreeStore</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_GtkTreeSortable.html">Previous: Class GtkTreeSortable</a></li>
         <li class="next"><a href="gtk_GtkTreeView.html">Next: Class GtkTreeView</a></li>
         <li class="clear"></li>
         </ul><div id="page_body"><h1><span class="toc_number">10.136</span>Class GtkTreeStore</h1><p class="brief">A tree-like data structure that can be used with the GtkTreeView </p>
         <pre class="prototype">Class GtkTreeStore( types )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">types</td><td class="content"> an array of all GType types for the columns, from first to last </td></tr>
               </tbody>
            </table>
         <p>The GtkTreeStore object is a list model for use with a GtkTreeView widget. It implements the GtkTreeModel interface, and consequentialy, can use all of the methods available there. It also implements the GtkTreeSortable interface so it can be sorted by the view. Finally, it also implements the tree drag and drop interfaces. </p>
<table class="members">
         <tbody><tr class="member_type"><td class="member_type" colspan="2">Methods</td></tr>
               <tr><td><a href="#append">append</a></td><td>Appends a new row to tree_store. </td></tr>
               <tr><td><a href="#clear">clear</a></td><td>Removes all rows from tree_store </td></tr>
               <tr><td><a href="#insert">insert</a></td><td>Creates a new row at position. </td></tr>
               <tr><td><a href="#insert_after">insert_after</a></td><td>Inserts a new row after sibling. </td></tr>
               <tr><td><a href="#insert_before">insert_before</a></td><td>Inserts a new row before sibling. </td></tr>
               <tr><td><a href="#insert_with_values">insert_with_values</a></td><td>Creates a new row at position. </td></tr>
               <tr><td><a href="#is_ancestor">is_ancestor</a></td><td>Returns TRUE if iter is an ancestor of descendant. </td></tr>
               <tr><td><a href="#iter_depth">iter_depth</a></td><td>Returns the depth of iter. </td></tr>
               <tr><td><a href="#iter_is_valid">iter_is_valid</a></td><td>Checks if the given iter is a valid iter for this GtkTreeStore. </td></tr>
               <tr><td><a href="#move_after">move_after</a></td><td>Moves iter in tree_store to the position after position. </td></tr>
               <tr><td><a href="#move_before">move_before</a></td><td>Moves iter in tree_store to the position before position. </td></tr>
               <tr><td><a href="#prepend">prepend</a></td><td>Prepends a new row to tree_store. </td></tr>
               <tr><td><a href="#remove">remove</a></td><td>Removes iter from tree_store. </td></tr>
               <tr><td><a href="#reorder">reorder</a></td><td>Reorders the children of parent in tree_store to follow the order indicated by new_order. </td></tr>
               <tr><td><a href="#set">set</a></td><td>Sets the value of one or more cells in the row referenced by iter. </td></tr>
               <tr><td><a href="#set_column_types">set_column_types</a></td><td>Sets the column types. </td></tr>
               <tr><td><a href="#set_value">set_value</a></td><td>Sets the data in the cell specified by iter and column. </td></tr>
               <tr><td><a href="#swap">swap</a></td><td>Swaps a and b in the same level of tree_store. </td></tr>
               </tbody>
            </table>
         <h2>Methods</h2><h3><a name="append">append</a></h3><p class="brief">Appends a new row to tree_store. </p>
         <pre class="prototype">GtkTreeStore.append( iter, parent )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> An unset GtkTreeIter to set to the appended row </td></tr>
               <tr class="param"><td class="name">parent</td><td class="content"> A valid GtkTreeIter, or NULL. </td></tr>
               </tbody>
            </table>
         <p>If parent is non-NULL, then it will append the new row after the last child of parent, otherwise it will append a row to the top level. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value(). </p>
<h3><a name="clear">clear</a></h3><p class="brief">Removes all rows from tree_store </p>
         <pre class="prototype">GtkTreeStore.clear()</pre>
         <h3><a name="insert">insert</a></h3><p class="brief">Creates a new row at position. </p>
         <pre class="prototype">GtkTreeStore.insert( iter, parent, position )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> An unset GtkTreeIter to set to the new row </td></tr>
               <tr class="param"><td class="name">parent</td><td class="content"> A valid GtkTreeIter, or NULL. </td></tr>
               <tr class="param"><td class="name">position</td><td class="content"> position to insert the new row </td></tr>
               </tbody>
            </table>
         <p>If parent is non-NULL, then the row will be made a child of parent. Otherwise, the row will be created at the toplevel. If position is larger than the number of rows at that level, then the new row will be inserted to the end of the list. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value(). </p>
<h3><a name="insert_after">insert_after</a></h3><p class="brief">Inserts a new row after sibling. </p>
         <pre class="prototype">GtkTreeStore.insert_after( iter, parent, sibling )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> An unset GtkTreeIter to set to the new row </td></tr>
               <tr class="param"><td class="name">parent</td><td class="content"> A valid GtkTreeIter, or NULL. </td></tr>
               <tr class="param"><td class="name">sibling</td><td class="content"> A valid GtkTreeIter, or NULL. </td></tr>
               </tbody>
            </table>
         <p>If sibling is NULL, then the row will be prepended to parent 's children. If parent and sibling are NULL, then the row will be prepended to the toplevel. If both sibling and parent are set, then parent must be the parent of sibling. When sibling is set, parent is optional. </p>
<p>iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value(). </p>
<h3><a name="insert_before">insert_before</a></h3><p class="brief">Inserts a new row before sibling. </p>
         <pre class="prototype">GtkTreeStore.insert_before( iter, parent, sibling )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> An unset GtkTreeIter to set to the new row </td></tr>
               <tr class="param"><td class="name">parent</td><td class="content"> A valid GtkTreeIter, or NULL. </td></tr>
               <tr class="param"><td class="name">sibling</td><td class="content"> A valid GtkTreeIter, or NULL. </td></tr>
               </tbody>
            </table>
         <p>If sibling is NULL, then the row will be appended to parent 's children. If parent and sibling are NULL, then the row will be appended to the toplevel. If both sibling and parent are set, then parent must be the parent of sibling. When sibling is set, parent is optional. </p>
<p>iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value(). </p>
<h3><a name="insert_with_values">insert_with_values</a></h3><p class="brief">Creates a new row at position. </p>
         <pre class="prototype">GtkTreeStore.insert_with_values( iter, parent, pos, values )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> An unset GtkTreeIter to set to the new row, or NULL. </td></tr>
               <tr class="param"><td class="name">parent</td><td class="content"> A valid GtkTreeIter, or NULL. </td></tr>
               <tr class="param"><td class="name">pos</td><td class="content"> position to insert the new row </td></tr>
               <tr class="param"><td class="name">values</td><td class="content"> an array of pairs [ column index, column value, ... ] </td></tr>
               </tbody>
            </table>
         <p>iter will be changed to point to this new row. If position is larger than the number of rows on the list, then the new row will be appended to the list. The row will be filled with the values given to this function. </p>
<h3><a name="is_ancestor">is_ancestor</a></h3><p class="brief">Returns TRUE if iter is an ancestor of descendant. </p>
         <pre class="prototype">GtkTreeStore.is_ancestor( iter, descendant )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> A valid GtkTreeIter </td></tr>
               <tr class="param"><td class="name">descendant</td><td class="content"> A valid GtkTreeIter </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">TRUE, if iter is an ancestor of descendant </td></tr>
               </tbody>
            </table>
         <p>That is, iter is the parent (or grandparent or great-grandparent) of descendant. </p>
<h3><a name="iter_depth">iter_depth</a></h3><p class="brief">Returns the depth of iter. </p>
         <pre class="prototype">GtkTreeStore.iter_depth( iter )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> A valid GtkTreeIter </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">The depth of iter </td></tr>
               </tbody>
            </table>
         <p>This will be 0 for anything on the root level, 1 for anything down a level, etc. </p>
<h3><a name="iter_is_valid">iter_is_valid</a></h3><p class="brief">Checks if the given iter is a valid iter for this GtkTreeStore. </p>
         <pre class="prototype">GtkTreeStore.iter_is_valid( iter )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> A GtkTreeIter. </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">TRUE if the iter is valid, FALSE if the iter is invalid. </td></tr>
               </tbody>
            </table>
         <p>Warning: This function is slow. Only use it for debugging and/or testing purposes. </p>
<h3><a name="move_after">move_after</a></h3><p class="brief">Moves iter in tree_store to the position after position. </p>
         <pre class="prototype">GtkTreeStore.move_after( iter, position )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> A GtkTreeIter. </td></tr>
               <tr class="param"><td class="name">position</td><td class="content"> A GtkTreeIter or NULL. </td></tr>
               </tbody>
            </table>
         <p>iter and position should be in the same level. Note that this function only works with unsorted stores. If position is NULL, iter will be moved to the start of the level. </p>
<h3><a name="move_before">move_before</a></h3><p class="brief">Moves iter in tree_store to the position before position. </p>
         <pre class="prototype">GtkTreeStore.move_before( iter, position )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> A GtkTreeIter. </td></tr>
               <tr class="param"><td class="name">position</td><td class="content"> A GtkTreeIter or NULL. </td></tr>
               </tbody>
            </table>
         <p>iter and position should be in the same level. Note that this function only works with unsorted stores. If position is NULL, iter will be moved to the end of the level. </p>
<h3><a name="prepend">prepend</a></h3><p class="brief">Prepends a new row to tree_store. </p>
         <pre class="prototype">GtkTreeStore.prepend( iter, parent )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> An unset GtkTreeIter to set to the prepended row. </td></tr>
               <tr class="param"><td class="name">parent</td><td class="content"> A valid GtkTreeIter, or NULL. </td></tr>
               </tbody>
            </table>
         <p>If parent is non-NULL, then it will prepend the new row before the first child of parent, otherwise it will prepend a row to the top level. iter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value(). </p>
<h3><a name="remove">remove</a></h3><p class="brief">Removes iter from tree_store. </p>
         <pre class="prototype">GtkTreeStore.remove( iter )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> A valid GtkTreeIter </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">TRUE if iter is still valid, FALSE if not. </td></tr>
               </tbody>
            </table>
         <p>After being removed, iter is set to the next valid row at that level, or invalidated if it previously pointed to the last one. </p>
<h3><a name="reorder">reorder</a></h3><p class="brief">Reorders the children of parent in tree_store to follow the order indicated by new_order. </p>
         <pre class="prototype">GtkTreeStore.reorder( parent, new_order )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">parent</td><td class="content"> A GtkTreeIter. </td></tr>
               <tr class="param"><td class="name">new_order</td><td class="content"> an array of integers mapping the new position of each child to its old position before the re-ordering, i.e. new_order[newpos] = oldpos. </td></tr>
               </tbody>
            </table>
         <p>Note that this function only works with unsorted stores. </p>
<h3><a name="set">set</a></h3><p class="brief">Sets the value of one or more cells in the row referenced by iter. </p>
         <pre class="prototype">GtkTreeStore.set( iter, values )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> row iterator (GtkTreeIter) </td></tr>
               <tr class="param"><td class="name">values</td><td class="content"> an array of pairs [ column index, column value, ... ] </td></tr>
               </tbody>
            </table>
         <p>The variable argument list should contain integer column numbers, each column number followed by the value to be set. For example, to set column 0 with type G_TYPE_STRING to "Foo", you would write gtk_tree_store_set ( iter, [ 0, "Foo" ] ). </p>
<h3><a name="set_column_types">set_column_types</a></h3><p class="brief">Sets the column types. </p>
         <pre class="prototype">GtkTreeStore.set_column_types( types )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">types</td><td class="content"> an array of GType </td></tr>
               </tbody>
            </table>
         <p>This function is meant primarily for GObjects that inherit from GtkTreeStore, and should only be used when constructing a new GtkTreeStore. </p>
<p>It will not function after a row has been added, or a method on the GtkTreeModel interface is called. </p>
<h3><a name="set_value">set_value</a></h3><p class="brief">Sets the data in the cell specified by iter and column. </p>
         <pre class="prototype">GtkTreeStore.set_value( iter, column, value )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> A valid GtkTreeIter for the row being modified </td></tr>
               <tr class="param"><td class="name">column</td><td class="content"> column number to modify </td></tr>
               <tr class="param"><td class="name">value</td><td class="content"> new value for the cell </td></tr>
               </tbody>
            </table>
         <p>The type of value must be convertible to the type of the column. </p>
<h3><a name="swap">swap</a></h3><p class="brief">Swaps a and b in the same level of tree_store. </p>
         <pre class="prototype">GtkTreeStore.swap( a, b )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">a</td><td class="content"> A GtkTreeIter. </td></tr>
               <tr class="param"><td class="name">b</td><td class="content"> Another GtkTreeIter. </td></tr>
               </tbody>
            </table>
         <p>Note that this function only works with unsorted stores. </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_GtkTreeSortable.html">Previous: Class GtkTreeSortable</a></li>
         <li class="next"><a href="gtk_GtkTreeView.html">Next: Class GtkTreeView</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>