Sophie

Sophie

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

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 GtkListStore</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_GtkLinkButton.html">Previous: Class GtkLinkButton</a></li>
         <li class="next"><a href="gtk_GtkMain.html">Next: Class GtkMain</a></li>
         <li class="clear"></li>
         </ul><div id="page_body"><h1><span class="toc_number">10.81</span>Class GtkListStore</h1><p class="brief">A list-like data structure that can be used with the GtkTreeView </p>
         <pre class="prototype">Class GtkListStore( 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>The GtkListStore 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>
<p>The GtkListStore can accept most GObject types as a column type, though it can't accept all custom types. Internally, it will keep a copy of data passed in (such as a string or a boxed pointer). Columns that accept GObject s are handled a little differently. The GtkListStore will keep a reference to the object instead of copying the value. As a result, if the object is modified, it is up to the application writer to call gtk_tree_model_row_changed to emit the "row_changed" signal. This most commonly affects lists with GdkPixbufs stored. </p>
<p>[...] </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 list_store. </td></tr>
               <tr><td><a href="#clear">clear</a></td><td>Removes all rows from the list 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="#iter_is_valid">iter_is_valid</a></td><td>Checks if the given iter is a valid iter for this GtkListStore. </td></tr>
               <tr><td><a href="#move_after">move_after</a></td><td>Moves iter in store to the position after position. </td></tr>
               <tr><td><a href="#move_before">move_before</a></td><td>Moves iter in store to the position before position. </td></tr>
               <tr><td><a href="#prepend">prepend</a></td><td>Prepends a new row to list_store. </td></tr>
               <tr><td><a href="#remove">remove</a></td><td>Removes the given row from the list store. </td></tr>
               <tr><td><a href="#reorder">reorder</a></td><td>Reorders 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 store. Note that this function only works with unsorted stores. </td></tr>
               </tbody>
            </table>
         <h2>Methods</h2><h3><a name="append">append</a></h3><p class="brief">Appends a new row to list_store. </p>
         <pre class="prototype">GtkListStore.append()</pre>
         <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_list_store_set() or gtk_list_store_set_value(). </p>
<h3><a name="clear">clear</a></h3><p class="brief">Removes all rows from the list store. </p>
         <pre class="prototype">GtkListStore.clear()</pre>
         <h3><a name="insert">insert</a></h3><p class="brief">Creates a new row at position. </p>
         <pre class="prototype">GtkListStore.insert( iter, 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">position</td><td class="content"> position to insert the new row </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 empty after this function is called. To fill in values, you need to call gtk_list_store_set() or gtk_list_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">GtkListStore.insert_after( iter, 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">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 the beginning 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_list_store_set() or gtk_list_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">GtkListStore.insert_before( iter, 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">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 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_list_store_set() or gtk_list_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">GtkListStore.insert_with_values( iter, 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">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="iter_is_valid">iter_is_valid</a></h3><p class="brief">Checks if the given iter is a valid iter for this GtkListStore. </p>
         <pre class="prototype">GtkListStore.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 store to the position after position. </p>
         <pre class="prototype">GtkListStore.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>Note that this function only works with unsorted stores. If position is NULL, iter will be moved to the start of the list. </p>
<h3><a name="move_before">move_before</a></h3><p class="brief">Moves iter in store to the position before position. </p>
         <pre class="prototype">GtkListStore.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>Note that this function only works with unsorted stores. If position is NULL, iter will be moved to the end of the list. </p>
<h3><a name="prepend">prepend</a></h3><p class="brief">Prepends a new row to list_store. </p>
         <pre class="prototype">GtkListStore.prepend( iter )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">iter</td><td class="content"> An unset GtkTreeIter to set to the prepend row </td></tr>
               </tbody>
            </table>
         <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_list_store_set() or gtk_list_store_set_value(). </p>
<h3><a name="remove">remove</a></h3><p class="brief">Removes the given row from the list store. </p>
         <pre class="prototype">GtkListStore.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 valid, FALSE if not. </td></tr>
               </tbody>
            </table>
         <p>After being removed, iter is set to be the next valid row, or invalidated if it pointed to the last row in list_store. </p>
<h3><a name="reorder">reorder</a></h3><p class="brief">Reorders store to follow the order indicated by new_order. </p>
         <pre class="prototype">GtkListStore.reorder( new_order )</pre>
         <table class="prototype">
         <tbody><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">GtkListStore.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 array 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_list_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">GtkListStore.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 GtkListStore, and should only be used when constructing a new GtkListStore. </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">GtkListStore.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 store. Note that this function only works with unsorted stores. </p>
         <pre class="prototype">GtkListStore.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>
         </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_GtkLinkButton.html">Previous: Class GtkLinkButton</a></li>
         <li class="next"><a href="gtk_GtkMain.html">Next: Class GtkMain</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>