~inkscape.dev/inkscape-devlibs/devlibs-gtk3

« back to all changes in this revision

Viewing changes to share/gtk-doc/html/gtk2/GtkListStore.html

  • Committer: JazzyNico
  • Date: 2013-01-21 10:11:05 UTC
  • Revision ID: nicoduf@yahoo.fr-20130121101105-i8d8slkq9ng4olx8
Adding gtk2 libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>GtkListStore</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
 
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
 
8
<link rel="up" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
 
9
<link rel="prev" href="GtkCellRendererSpinner.html" title="GtkCellRendererSpinner">
 
10
<link rel="next" href="GtkTreeStore.html" title="GtkTreeStore">
 
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
 
17
<td><a accesskey="p" href="GtkCellRendererSpinner.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
18
<td><a accesskey="u" href="TreeWidgetObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
20
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
 
21
<td><a accesskey="n" href="GtkTreeStore.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#GtkListStore.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#GtkListStore.description" class="shortcut">Description</a>
 
27
                   | 
 
28
                  <a href="#GtkListStore.object-hierarchy" class="shortcut">Object Hierarchy</a>
 
29
                   | 
 
30
                  <a href="#GtkListStore.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
 
31
</td></tr>
 
32
</table>
 
33
<div class="refentry">
 
34
<a name="GtkListStore"></a><div class="titlepage"></div>
 
35
<div class="refnamediv"><table width="100%"><tr>
 
36
<td valign="top">
 
37
<h2><span class="refentrytitle"><a name="GtkListStore.top_of_page"></a>GtkListStore</span></h2>
 
38
<p>GtkListStore — A list-like data structure that can be used with the GtkTreeView</p>
 
39
</td>
 
40
<td valign="top" align="right"></td>
 
41
</tr></table></div>
 
42
<div class="refsynopsisdiv">
 
43
<a name="GtkListStore.synopsis"></a><h2>Synopsis</h2>
 
44
<pre class="synopsis">
 
45
#include &lt;gtk/gtk.h&gt;
 
46
 
 
47
struct              <a class="link" href="GtkListStore.html#GtkListStore-struct" title="struct GtkListStore">GtkListStore</a>;
 
48
<a class="link" href="GtkListStore.html" title="GtkListStore"><span class="returnvalue">GtkListStore</span></a> *      <a class="link" href="GtkListStore.html#gtk-list-store-new" title="gtk_list_store_new ()">gtk_list_store_new</a>                  (<em class="parameter"><code><span class="type">gint</span> n_columns</code></em>,
 
49
                                                         <em class="parameter"><code>...</code></em>);
 
50
<a class="link" href="GtkListStore.html" title="GtkListStore"><span class="returnvalue">GtkListStore</span></a> *      <a class="link" href="GtkListStore.html#gtk-list-store-newv" title="gtk_list_store_newv ()">gtk_list_store_newv</a>                 (<em class="parameter"><code><span class="type">gint</span> n_columns</code></em>,
 
51
                                                         <em class="parameter"><code><span class="type">GType</span> *types</code></em>);
 
52
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-set-column-types" title="gtk_list_store_set_column_types ()">gtk_list_store_set_column_types</a>     (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
53
                                                         <em class="parameter"><code><span class="type">gint</span> n_columns</code></em>,
 
54
                                                         <em class="parameter"><code><span class="type">GType</span> *types</code></em>);
 
55
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-set" title="gtk_list_store_set ()">gtk_list_store_set</a>                  (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
56
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
57
                                                         <em class="parameter"><code>...</code></em>);
 
58
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-set-valist" title="gtk_list_store_set_valist ()">gtk_list_store_set_valist</a>           (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
59
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
60
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
 
61
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-set-value" title="gtk_list_store_set_value ()">gtk_list_store_set_value</a>            (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
62
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
63
                                                         <em class="parameter"><code><span class="type">gint</span> column</code></em>,
 
64
                                                         <em class="parameter"><code><span class="type">GValue</span> *value</code></em>);
 
65
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-set-valuesv" title="gtk_list_store_set_valuesv ()">gtk_list_store_set_valuesv</a>          (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
66
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
67
                                                         <em class="parameter"><code><span class="type">gint</span> *columns</code></em>,
 
68
                                                         <em class="parameter"><code><span class="type">GValue</span> *values</code></em>,
 
69
                                                         <em class="parameter"><code><span class="type">gint</span> n_values</code></em>);
 
70
<span class="returnvalue">gboolean</span>            <a class="link" href="GtkListStore.html#gtk-list-store-remove" title="gtk_list_store_remove ()">gtk_list_store_remove</a>               (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
71
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
 
72
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-insert" title="gtk_list_store_insert ()">gtk_list_store_insert</a>               (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
73
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
74
                                                         <em class="parameter"><code><span class="type">gint</span> position</code></em>);
 
75
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-insert-before" title="gtk_list_store_insert_before ()">gtk_list_store_insert_before</a>        (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
76
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
77
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *sibling</code></em>);
 
78
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-insert-after" title="gtk_list_store_insert_after ()">gtk_list_store_insert_after</a>         (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
79
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
80
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *sibling</code></em>);
 
81
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-insert-with-values" title="gtk_list_store_insert_with_values ()">gtk_list_store_insert_with_values</a>   (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
82
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
83
                                                         <em class="parameter"><code><span class="type">gint</span> position</code></em>,
 
84
                                                         <em class="parameter"><code>...</code></em>);
 
85
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-insert-with-valuesv" title="gtk_list_store_insert_with_valuesv ()">gtk_list_store_insert_with_valuesv</a>  (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
86
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
87
                                                         <em class="parameter"><code><span class="type">gint</span> position</code></em>,
 
88
                                                         <em class="parameter"><code><span class="type">gint</span> *columns</code></em>,
 
89
                                                         <em class="parameter"><code><span class="type">GValue</span> *values</code></em>,
 
90
                                                         <em class="parameter"><code><span class="type">gint</span> n_values</code></em>);
 
91
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-prepend" title="gtk_list_store_prepend ()">gtk_list_store_prepend</a>              (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
92
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
 
93
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-append" title="gtk_list_store_append ()">gtk_list_store_append</a>               (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
94
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
 
95
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-clear" title="gtk_list_store_clear ()">gtk_list_store_clear</a>                (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>);
 
96
<span class="returnvalue">gboolean</span>            <a class="link" href="GtkListStore.html#gtk-list-store-iter-is-valid" title="gtk_list_store_iter_is_valid ()">gtk_list_store_iter_is_valid</a>        (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
97
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
 
98
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-reorder" title="gtk_list_store_reorder ()">gtk_list_store_reorder</a>              (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *store</code></em>,
 
99
                                                         <em class="parameter"><code><span class="type">gint</span> *new_order</code></em>);
 
100
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-swap" title="gtk_list_store_swap ()">gtk_list_store_swap</a>                 (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *store</code></em>,
 
101
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *a</code></em>,
 
102
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *b</code></em>);
 
103
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-move-before" title="gtk_list_store_move_before ()">gtk_list_store_move_before</a>          (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *store</code></em>,
 
104
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
105
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *position</code></em>);
 
106
<span class="returnvalue">void</span>                <a class="link" href="GtkListStore.html#gtk-list-store-move-after" title="gtk_list_store_move_after ()">gtk_list_store_move_after</a>           (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *store</code></em>,
 
107
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
108
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *position</code></em>);
 
109
</pre>
 
110
</div>
 
111
<div class="refsect1">
 
112
<a name="GtkListStore.object-hierarchy"></a><h2>Object Hierarchy</h2>
 
113
<pre class="synopsis">
 
114
  GObject
 
115
   +----GtkListStore
 
116
</pre>
 
117
</div>
 
118
<div class="refsect1">
 
119
<a name="GtkListStore.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
 
120
<p>
 
121
GtkListStore implements
 
122
 <a class="link" href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a>,  <a class="link" href="gtk2-GtkTreeView-drag-and-drop.html#GtkTreeDragSource">GtkTreeDragSource</a>,  <a class="link" href="gtk2-GtkTreeView-drag-and-drop.html#GtkTreeDragDest">GtkTreeDragDest</a>,  <a class="link" href="GtkTreeSortable.html" title="GtkTreeSortable">GtkTreeSortable</a> and  <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
 
123
</div>
 
124
<div class="refsect1">
 
125
<a name="GtkListStore.description"></a><h2>Description</h2>
 
126
<p>
 
127
The <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> object is a list model for use with a <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a>
 
128
widget.  It implements the <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> interface, and consequentialy,
 
129
can use all of the methods available there.  It also implements the
 
130
<a class="link" href="GtkTreeSortable.html" title="GtkTreeSortable"><span class="type">GtkTreeSortable</span></a> interface so it can be sorted by the view.
 
131
Finally, it also implements the tree <GTKDOCLINK HREF="gtktreednd">drag and
 
132
drop</GTKDOCLINK> interfaces.
 
133
</p>
 
134
<p>
 
135
The <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> can accept most GObject types as a column type, though
 
136
it can't accept all custom types.  Internally, it will keep a copy of
 
137
data passed in (such as a string or a boxed pointer).  Columns that
 
138
accept <span class="type">GObject</span>s are handled a little differently.  The
 
139
<a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> will keep a reference to the object instead of copying the
 
140
value.  As a result, if the object is modified, it is up to the
 
141
application writer to call <em class="parameter"><code>gtk_tree_model_row_changed</code></em> to emit the
 
142
"row_changed" signal.  This most commonly affects lists with
 
143
<a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>s stored.
 
144
</p>
 
145
<div class="example">
 
146
<a name="idp67836080"></a><p class="title"><b>Example 27. Creating a simple list store.</b></p>
 
147
<div class="example-contents">
 
148
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
149
    <tbody>
 
150
      <tr>
 
151
        <td class="listing_lines" align="right"><pre>1
 
152
2
 
153
3
 
154
4
 
155
5
 
156
6
 
157
7
 
158
8
 
159
9
 
160
10
 
161
11
 
162
12
 
163
13
 
164
14
 
165
15
 
166
16
 
167
17
 
168
18
 
169
19
 
170
20
 
171
21
 
172
22
 
173
23
 
174
24
 
175
25
 
176
26
 
177
27
 
178
28
 
179
29
 
180
30
 
181
31
 
182
32
 
183
33
 
184
34
 
185
35
 
186
36
 
187
37
 
188
38
 
189
39
 
190
40
 
191
41</pre></td>
 
192
        <td class="listing_code"><pre class="programlisting"><span class="keyword">enum</span><span class="normal"> </span><span class="cbracket">{</span>
 
193
<span class="normal">  COLUMN_STRING</span><span class="symbol">,</span>
 
194
<span class="normal">  COLUMN_INT</span><span class="symbol">,</span>
 
195
<span class="normal">  COLUMN_BOOLEAN</span><span class="symbol">,</span>
 
196
<span class="normal">  N_COLUMNS</span>
 
197
<span class="cbracket">}</span><span class="symbol">;</span>
 
198
<span class="cbracket">{</span>
 
199
<span class="normal">  </span><span class="usertype">GtkListStore</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">list_store</span><span class="symbol">;</span>
 
200
<span class="normal">  </span><span class="usertype">GtkTreePath</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">path</span><span class="symbol">;</span>
 
201
<span class="normal">  </span><span class="usertype">GtkTreeIter</span><span class="normal"> iter</span><span class="symbol">;</span>
 
202
<span class="normal">  </span><span class="usertype">gint</span><span class="normal"> i</span><span class="symbol">;</span>
 
203
<span class="normal">  list_store </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkListStore.html#gtk-list-store-new">gtk_list_store_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">N_COLUMNS</span><span class="symbol">,</span>
 
204
<span class="normal">                                   G_TYPE_STRING</span><span class="symbol">,</span>
 
205
<span class="normal">                                   G_TYPE_INT</span><span class="symbol">,</span>
 
206
<span class="normal">                                   G_TYPE_BOOLEAN</span><span class="symbol">);</span>
 
207
<span class="normal">  </span><span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">i </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span><span class="normal"> i </span><span class="symbol">&lt;</span><span class="normal"> </span><span class="number">10</span><span class="symbol">;</span><span class="normal"> i</span><span class="symbol">++)</span>
 
208
<span class="normal">    </span><span class="cbracket">{</span>
 
209
<span class="normal">      </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">some_data</span><span class="symbol">;</span>
 
210
<span class="normal">      some_data </span><span class="symbol">=</span><span class="normal"> </span><span class="function">get_some_data</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">i</span><span class="symbol">);</span>
 
211
<span class="normal">      </span><span class="comment">/* Add a new row to the model */</span>
 
212
<span class="normal">      </span><span class="function"><a href="GtkListStore.html#gtk-list-store-append">gtk_list_store_append</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">list_store</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">iter</span><span class="symbol">);</span>
 
213
<span class="normal">      </span><span class="function"><a href="GtkListStore.html#gtk-list-store-set">gtk_list_store_set</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">list_store</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">iter</span><span class="symbol">,</span>
 
214
<span class="normal">                          COLUMN_STRING</span><span class="symbol">,</span><span class="normal"> some_data</span><span class="symbol">,</span>
 
215
<span class="normal">                          COLUMN_INT</span><span class="symbol">,</span><span class="normal"> i</span><span class="symbol">,</span>
 
216
<span class="normal">                          COLUMN_BOOLEAN</span><span class="symbol">,</span><span class="normal">  FALSE</span><span class="symbol">,</span>
 
217
<span class="normal">                          </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">);</span>
 
218
<span class="normal">      </span><span class="comment">/* As the store will keep a copy of the string internally, we</span>
 
219
<span class="comment">       * free some_data.</span>
 
220
<span class="comment">       */</span>
 
221
<span class="normal">      </span><span class="function">g_free</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">some_data</span><span class="symbol">);</span>
 
222
<span class="normal">    </span><span class="cbracket">}</span>
 
223
<span class="normal">  </span><span class="comment">/* Modify a particular row */</span>
 
224
<span class="normal">  path </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkTreeModel.html#gtk-tree-path-new-from-string">gtk_tree_path_new_from_string</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"4"</span><span class="symbol">);</span>
 
225
<span class="normal">  </span><span class="function"><a href="GtkTreeModel.html#gtk-tree-model-get-iter">gtk_tree_model_get_iter</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_TREE_MODEL</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">list_store</span><span class="symbol">),</span>
 
226
<span class="normal">                           </span><span class="symbol">&amp;</span><span class="normal">iter</span><span class="symbol">,</span>
 
227
<span class="normal">                           path</span><span class="symbol">);</span>
 
228
<span class="normal">  </span><span class="function"><a href="GtkTreeModel.html#gtk-tree-path-free">gtk_tree_path_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">);</span>
 
229
<span class="normal">  </span><span class="function"><a href="GtkListStore.html#gtk-list-store-set">gtk_list_store_set</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">list_store</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">iter</span><span class="symbol">,</span>
 
230
<span class="normal">                      COLUMN_BOOLEAN</span><span class="symbol">,</span><span class="normal"> TRUE</span><span class="symbol">,</span>
 
231
<span class="normal">                      </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">);</span>
 
232
<span class="cbracket">}</span></pre></td>
 
233
      </tr>
 
234
    </tbody>
 
235
  </table>
 
236
</div>
 
237
 
 
238
</div>
 
239
<br class="example-break"><div class="refsect2">
 
240
<a name="idp67839008"></a><h3>Performance Considerations</h3>
 
241
<p>
 
242
Internally, the <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> was implemented with a linked list with a
 
243
tail pointer prior to GTK+ 2.6.  As a result, it was fast at data
 
244
insertion and deletion, and not fast at random data access.  The
 
245
<a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> sets the <a class="link" href="GtkTreeModel.html#GTK-TREE-MODEL-ITERS-PERSIST:CAPS"><span class="type">GTK_TREE_MODEL_ITERS_PERSIST</span></a> flag, which means
 
246
that <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>s can be cached while the row exists.  Thus, if
 
247
access to a particular row is needed often and your code is expected to
 
248
run on older versions of GTK+, it is worth keeping the iter around.
 
249
</p>
 
250
<p>
 
251
It is important to note that only the methods
 
252
<a class="link" href="GtkListStore.html#gtk-list-store-insert-with-values" title="gtk_list_store_insert_with_values ()"><code class="function">gtk_list_store_insert_with_values()</code></a> and <a class="link" href="GtkListStore.html#gtk-list-store-insert-with-valuesv" title="gtk_list_store_insert_with_valuesv ()"><code class="function">gtk_list_store_insert_with_valuesv()</code></a>
 
253
are atomic, in the sense that the row is being appended to the store and the
 
254
values filled in in a single operation with regard to <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> signaling.
 
255
In contrast, using e.g. <a class="link" href="GtkListStore.html#gtk-list-store-append" title="gtk_list_store_append ()"><code class="function">gtk_list_store_append()</code></a> and then <a class="link" href="GtkListStore.html#gtk-list-store-set" title="gtk_list_store_set ()"><code class="function">gtk_list_store_set()</code></a>
 
256
will first create a row, which triggers the <a class="link" href="GtkTreeModel.html#GtkTreeModel-row-inserted" title='The "row-inserted" signal'><span class="type">"row-inserted"</span></a> signal
 
257
on <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>. The row, however, is still empty, and any signal handler
 
258
connecting to "row-inserted" on this particular store should be prepared
 
259
for the situation that the row might be empty. This is especially important
 
260
if you are wrapping the <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> inside a <a class="link" href="GtkTreeModelFilter.html" title="GtkTreeModelFilter"><span class="type">GtkTreeModelFilter</span></a> and are
 
261
using a <a class="link" href="GtkTreeModelFilter.html#GtkTreeModelFilterVisibleFunc" title="GtkTreeModelFilterVisibleFunc ()"><span class="type">GtkTreeModelFilterVisibleFunc</span></a>. Using any of the non-atomic operations
 
262
to append rows to the <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> will cause the
 
263
<a class="link" href="GtkTreeModelFilter.html#GtkTreeModelFilterVisibleFunc" title="GtkTreeModelFilterVisibleFunc ()"><span class="type">GtkTreeModelFilterVisibleFunc</span></a> to be visited with an empty row first; the
 
264
function must be prepared for that.
 
265
</p>
 
266
</div>
 
267
<hr>
 
268
<div class="refsect2">
 
269
<a name="GtkListStore-BUILDER-UI"></a><h3>GtkListStore as GtkBuildable</h3>
 
270
<p>
 
271
The GtkListStore implementation of the GtkBuildable interface allows
 
272
to specify the model columns with a &lt;columns&gt; element that may
 
273
contain multiple &lt;column&gt; elements, each specifying one model
 
274
column. The "type" attribute specifies the data type for the column.
 
275
</p>
 
276
<p>
 
277
Additionally, it is possible to specify content for the list store
 
278
in the UI definition, with the &lt;data&gt; element. It can contain
 
279
multiple &lt;row&gt; elements, each specifying to content for one
 
280
row of the list model. Inside a &lt;row&gt;, the &lt;col&gt; elements
 
281
specify the content for individual cells.
 
282
</p>
 
283
<p>
 
284
Note that it is probably more common to define your models
 
285
in the code, and one might consider it a layering violation
 
286
to specify the content of a list store in a UI definition,
 
287
<span class="emphasis"><em>data</em></span>, not <span class="emphasis"><em>presentation</em></span>,
 
288
and common wisdom is to separate the two, as far as possible.
 
289
 
 
290
</p>
 
291
<div class="example">
 
292
<a name="idp67861440"></a><p class="title"><b>Example 28. A UI Definition fragment for a list store</b></p>
 
293
<div class="example-contents">
 
294
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
295
    <tbody>
 
296
      <tr>
 
297
        <td class="listing_lines" align="right"><pre>1
 
298
2
 
299
3
 
300
4
 
301
5
 
302
6
 
303
7
 
304
8
 
305
9
 
306
10
 
307
11
 
308
12
 
309
13
 
310
14
 
311
15
 
312
16
 
313
17
 
314
18
 
315
19</pre></td>
 
316
        <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkListStore"</span><span class="symbol">&gt;</span>
 
317
<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">columns</span><span class="symbol">&gt;</span>
 
318
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">column</span><span class="normal"> type</span><span class="symbol">=</span><span class="string">"gchararray"</span><span class="symbol">/&gt;</span>
 
319
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">column</span><span class="normal"> type</span><span class="symbol">=</span><span class="string">"gchararray"</span><span class="symbol">/&gt;</span>
 
320
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">column</span><span class="normal"> type</span><span class="symbol">=</span><span class="string">"gint"</span><span class="symbol">/&gt;</span>
 
321
<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">columns</span><span class="symbol">&gt;</span>
 
322
<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">data</span><span class="symbol">&gt;</span>
 
323
<span class="normal">    </span><span class="symbol">&lt;</span><span class="normal">row</span><span class="symbol">&gt;</span>
 
324
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">col</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"0"</span><span class="symbol">&gt;</span><span class="normal">John</span><span class="symbol">&lt;/</span><span class="normal">col</span><span class="symbol">&gt;</span>
 
325
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">col</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"1"</span><span class="symbol">&gt;</span><span class="normal">Doe</span><span class="symbol">&lt;/</span><span class="normal">col</span><span class="symbol">&gt;</span>
 
326
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">col</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"2"</span><span class="symbol">&gt;</span><span class="number">25</span><span class="symbol">&lt;/</span><span class="normal">col</span><span class="symbol">&gt;</span>
 
327
<span class="normal">    </span><span class="symbol">&lt;/</span><span class="normal">row</span><span class="symbol">&gt;</span>
 
328
<span class="normal">    </span><span class="symbol">&lt;</span><span class="normal">row</span><span class="symbol">&gt;</span>
 
329
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">col</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"0"</span><span class="symbol">&gt;</span><span class="normal">Johan</span><span class="symbol">&lt;/</span><span class="normal">col</span><span class="symbol">&gt;</span>
 
330
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">col</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"1"</span><span class="symbol">&gt;</span><span class="normal">Dahlin</span><span class="symbol">&lt;/</span><span class="normal">col</span><span class="symbol">&gt;</span>
 
331
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">col</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"2"</span><span class="symbol">&gt;</span><span class="number">50</span><span class="symbol">&lt;/</span><span class="normal">col</span><span class="symbol">&gt;</span>
 
332
<span class="normal">    </span><span class="symbol">&lt;/</span><span class="normal">row</span><span class="symbol">&gt;</span>
 
333
<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">data</span><span class="symbol">&gt;</span>
 
334
<span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span></pre></td>
 
335
      </tr>
 
336
    </tbody>
 
337
  </table>
 
338
</div>
 
339
 
 
340
</div>
 
341
<br class="example-break">
 
342
</div>
 
343
</div>
 
344
<div class="refsect1">
 
345
<a name="GtkListStore.details"></a><h2>Details</h2>
 
346
<div class="refsect2">
 
347
<a name="GtkListStore-struct"></a><h3>struct GtkListStore</h3>
 
348
<pre class="programlisting">struct GtkListStore;</pre>
 
349
<p>
 
350
</p>
 
351
</div>
 
352
<hr>
 
353
<div class="refsect2">
 
354
<a name="gtk-list-store-new"></a><h3>gtk_list_store_new ()</h3>
 
355
<pre class="programlisting"><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="returnvalue">GtkListStore</span></a> *      gtk_list_store_new                  (<em class="parameter"><code><span class="type">gint</span> n_columns</code></em>,
 
356
                                                         <em class="parameter"><code>...</code></em>);</pre>
 
357
<p>
 
358
Creates a new list store as with <em class="parameter"><code>n_columns</code></em> columns each of the types passed
 
359
in.  Note that only types derived from standard GObject fundamental types 
 
360
are supported. 
 
361
</p>
 
362
<p>
 
363
As an example, <code class="literal">gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
 
364
GDK_TYPE_PIXBUF);</code> will create a new <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> with three columns, of type
 
365
int, string and <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> respectively.
 
366
</p>
 
367
<div class="variablelist"><table border="0" class="variablelist">
 
368
<colgroup>
 
369
<col align="left" valign="top">
 
370
<col>
 
371
</colgroup>
 
372
<tbody>
 
373
<tr>
 
374
<td><p><span class="term"><em class="parameter"><code>n_columns</code></em> :</span></p></td>
 
375
<td>number of columns in the list store</td>
 
376
</tr>
 
377
<tr>
 
378
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
379
<td>a new <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
380
</td>
 
381
</tr>
 
382
</tbody>
 
383
</table></div>
 
384
</div>
 
385
<hr>
 
386
<div class="refsect2">
 
387
<a name="gtk-list-store-newv"></a><h3>gtk_list_store_newv ()</h3>
 
388
<pre class="programlisting"><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="returnvalue">GtkListStore</span></a> *      gtk_list_store_newv                 (<em class="parameter"><code><span class="type">gint</span> n_columns</code></em>,
 
389
                                                         <em class="parameter"><code><span class="type">GType</span> *types</code></em>);</pre>
 
390
<p>
 
391
Non-vararg creation function.  Used primarily by language bindings.
 
392
</p>
 
393
<div class="variablelist"><table border="0" class="variablelist">
 
394
<colgroup>
 
395
<col align="left" valign="top">
 
396
<col>
 
397
</colgroup>
 
398
<tbody>
 
399
<tr>
 
400
<td><p><span class="term"><em class="parameter"><code>n_columns</code></em> :</span></p></td>
 
401
<td>number of columns in the list store</td>
 
402
</tr>
 
403
<tr>
 
404
<td><p><span class="term"><em class="parameter"><code>types</code></em> :</span></p></td>
 
405
<td>an array of <span class="type">GType</span> types for the columns, from first to last. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span>
 
406
</td>
 
407
</tr>
 
408
<tr>
 
409
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
410
<td>a new <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
411
</td>
 
412
</tr>
 
413
</tbody>
 
414
</table></div>
 
415
</div>
 
416
<hr>
 
417
<div class="refsect2">
 
418
<a name="gtk-list-store-set-column-types"></a><h3>gtk_list_store_set_column_types ()</h3>
 
419
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_set_column_types     (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
420
                                                         <em class="parameter"><code><span class="type">gint</span> n_columns</code></em>,
 
421
                                                         <em class="parameter"><code><span class="type">GType</span> *types</code></em>);</pre>
 
422
<p>
 
423
This function is meant primarily for <span class="type">GObjects</span> that inherit from <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>,
 
424
and should only be used when constructing a new <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.  It will not
 
425
function after a row has been added, or a method on the <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>
 
426
interface is called.
 
427
</p>
 
428
<div class="variablelist"><table border="0" class="variablelist">
 
429
<colgroup>
 
430
<col align="left" valign="top">
 
431
<col>
 
432
</colgroup>
 
433
<tbody>
 
434
<tr>
 
435
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
436
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
437
</td>
 
438
</tr>
 
439
<tr>
 
440
<td><p><span class="term"><em class="parameter"><code>n_columns</code></em> :</span></p></td>
 
441
<td>Number of columns for the list store</td>
 
442
</tr>
 
443
<tr>
 
444
<td><p><span class="term"><em class="parameter"><code>types</code></em> :</span></p></td>
 
445
<td>An array length n of <span class="type">GTypes</span>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_columns]</span>
 
446
</td>
 
447
</tr>
 
448
</tbody>
 
449
</table></div>
 
450
</div>
 
451
<hr>
 
452
<div class="refsect2">
 
453
<a name="gtk-list-store-set"></a><h3>gtk_list_store_set ()</h3>
 
454
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_set                  (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
455
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
456
                                                         <em class="parameter"><code>...</code></em>);</pre>
 
457
<p>
 
458
Sets the value of one or more cells in the row referenced by <em class="parameter"><code>iter</code></em>.
 
459
The variable argument list should contain integer column numbers,
 
460
each column number followed by the value to be set.
 
461
The list is terminated by a -1. For example, to set column 0 with type
 
462
<code class="literal">G_TYPE_STRING</code> to "Foo", you would write <code class="literal">gtk_list_store_set (store, iter,
 
463
0, "Foo", -1)</code>.
 
464
</p>
 
465
<p>
 
466
The value will be referenced by the store if it is a <code class="literal">G_TYPE_OBJECT</code>, and it
 
467
will be copied if it is a <code class="literal">G_TYPE_STRING</code> or <code class="literal">G_TYPE_BOXED</code>.
 
468
</p>
 
469
<div class="variablelist"><table border="0" class="variablelist">
 
470
<colgroup>
 
471
<col align="left" valign="top">
 
472
<col>
 
473
</colgroup>
 
474
<tbody>
 
475
<tr>
 
476
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
477
<td>a <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
478
</td>
 
479
</tr>
 
480
<tr>
 
481
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
482
<td>row iterator</td>
 
483
</tr>
 
484
</tbody>
 
485
</table></div>
 
486
</div>
 
487
<hr>
 
488
<div class="refsect2">
 
489
<a name="gtk-list-store-set-valist"></a><h3>gtk_list_store_set_valist ()</h3>
 
490
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_set_valist           (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
491
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
492
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
 
493
<p>
 
494
See <a class="link" href="GtkListStore.html#gtk-list-store-set" title="gtk_list_store_set ()"><code class="function">gtk_list_store_set()</code></a>; this version takes a va_list for use by language
 
495
bindings.
 
496
</p>
 
497
<div class="variablelist"><table border="0" class="variablelist">
 
498
<colgroup>
 
499
<col align="left" valign="top">
 
500
<col>
 
501
</colgroup>
 
502
<tbody>
 
503
<tr>
 
504
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
505
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
506
</td>
 
507
</tr>
 
508
<tr>
 
509
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
510
<td>A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> for the row being modified</td>
 
511
</tr>
 
512
<tr>
 
513
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
 
514
<td>va_list of column/value pairs</td>
 
515
</tr>
 
516
</tbody>
 
517
</table></div>
 
518
</div>
 
519
<hr>
 
520
<div class="refsect2">
 
521
<a name="gtk-list-store-set-value"></a><h3>gtk_list_store_set_value ()</h3>
 
522
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_set_value            (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
523
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
524
                                                         <em class="parameter"><code><span class="type">gint</span> column</code></em>,
 
525
                                                         <em class="parameter"><code><span class="type">GValue</span> *value</code></em>);</pre>
 
526
<p>
 
527
Sets the data in the cell specified by <em class="parameter"><code>iter</code></em> and <em class="parameter"><code>column</code></em>.
 
528
The type of <em class="parameter"><code>value</code></em> must be convertible to the type of the
 
529
column.
 
530
</p>
 
531
<div class="variablelist"><table border="0" class="variablelist">
 
532
<colgroup>
 
533
<col align="left" valign="top">
 
534
<col>
 
535
</colgroup>
 
536
<tbody>
 
537
<tr>
 
538
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
539
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
540
</td>
 
541
</tr>
 
542
<tr>
 
543
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
544
<td>A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> for the row being modified</td>
 
545
</tr>
 
546
<tr>
 
547
<td><p><span class="term"><em class="parameter"><code>column</code></em> :</span></p></td>
 
548
<td>column number to modify</td>
 
549
</tr>
 
550
<tr>
 
551
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
 
552
<td>new value for the cell</td>
 
553
</tr>
 
554
</tbody>
 
555
</table></div>
 
556
</div>
 
557
<hr>
 
558
<div class="refsect2">
 
559
<a name="gtk-list-store-set-valuesv"></a><h3>gtk_list_store_set_valuesv ()</h3>
 
560
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_set_valuesv          (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
561
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
562
                                                         <em class="parameter"><code><span class="type">gint</span> *columns</code></em>,
 
563
                                                         <em class="parameter"><code><span class="type">GValue</span> *values</code></em>,
 
564
                                                         <em class="parameter"><code><span class="type">gint</span> n_values</code></em>);</pre>
 
565
<p>
 
566
A variant of <a class="link" href="GtkListStore.html#gtk-list-store-set-valist" title="gtk_list_store_set_valist ()"><code class="function">gtk_list_store_set_valist()</code></a> which
 
567
takes the columns and values as two arrays, instead of
 
568
varargs. This function is mainly intended for 
 
569
language-bindings and in case the number of columns to
 
570
change is not known until run-time.
 
571
</p>
 
572
<div class="variablelist"><table border="0" class="variablelist">
 
573
<colgroup>
 
574
<col align="left" valign="top">
 
575
<col>
 
576
</colgroup>
 
577
<tbody>
 
578
<tr>
 
579
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
580
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
581
</td>
 
582
</tr>
 
583
<tr>
 
584
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
585
<td>A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> for the row being modified</td>
 
586
</tr>
 
587
<tr>
 
588
<td><p><span class="term"><em class="parameter"><code>columns</code></em> :</span></p></td>
 
589
<td>an array of column numbers. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_values]</span>
 
590
</td>
 
591
</tr>
 
592
<tr>
 
593
<td><p><span class="term"><em class="parameter"><code>values</code></em> :</span></p></td>
 
594
<td>an array of GValues. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_values]</span>
 
595
</td>
 
596
</tr>
 
597
<tr>
 
598
<td><p><span class="term"><em class="parameter"><code>n_values</code></em> :</span></p></td>
 
599
<td>the length of the <em class="parameter"><code>columns</code></em> and <em class="parameter"><code>values</code></em> arrays</td>
 
600
</tr>
 
601
</tbody>
 
602
</table></div>
 
603
<p class="since">Since 2.12</p>
 
604
</div>
 
605
<hr>
 
606
<div class="refsect2">
 
607
<a name="gtk-list-store-remove"></a><h3>gtk_list_store_remove ()</h3>
 
608
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gtk_list_store_remove               (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
609
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
 
610
<p>
 
611
Removes the given row from the list store.  After being removed, 
 
612
<em class="parameter"><code>iter</code></em> is set to be the next valid row, or invalidated if it pointed 
 
613
to the last row in <em class="parameter"><code>list_store</code></em>.
 
614
</p>
 
615
<div class="variablelist"><table border="0" class="variablelist">
 
616
<colgroup>
 
617
<col align="left" valign="top">
 
618
<col>
 
619
</colgroup>
 
620
<tbody>
 
621
<tr>
 
622
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
623
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
624
</td>
 
625
</tr>
 
626
<tr>
 
627
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
628
<td>A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>
 
629
</td>
 
630
</tr>
 
631
<tr>
 
632
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
633
<td>
 
634
<code class="literal">TRUE</code> if <em class="parameter"><code>iter</code></em> is valid, <code class="literal">FALSE</code> if not.</td>
 
635
</tr>
 
636
</tbody>
 
637
</table></div>
 
638
</div>
 
639
<hr>
 
640
<div class="refsect2">
 
641
<a name="gtk-list-store-insert"></a><h3>gtk_list_store_insert ()</h3>
 
642
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_insert               (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
643
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
644
                                                         <em class="parameter"><code><span class="type">gint</span> position</code></em>);</pre>
 
645
<p>
 
646
Creates a new row at <em class="parameter"><code>position</code></em>.  <em class="parameter"><code>iter</code></em> will be changed to point to this new
 
647
row.  If <em class="parameter"><code>position</code></em> is larger than the number of rows on the list, then the
 
648
new row will be appended to the list. The row will be empty after this
 
649
function is called.  To fill in values, you need to call 
 
650
<a class="link" href="GtkListStore.html#gtk-list-store-set" title="gtk_list_store_set ()"><code class="function">gtk_list_store_set()</code></a> or <a class="link" href="GtkListStore.html#gtk-list-store-set-value" title="gtk_list_store_set_value ()"><code class="function">gtk_list_store_set_value()</code></a>.
 
651
</p>
 
652
<div class="variablelist"><table border="0" class="variablelist">
 
653
<colgroup>
 
654
<col align="left" valign="top">
 
655
<col>
 
656
</colgroup>
 
657
<tbody>
 
658
<tr>
 
659
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
660
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
661
</td>
 
662
</tr>
 
663
<tr>
 
664
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
665
<td>An unset <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
 
666
</td>
 
667
</tr>
 
668
<tr>
 
669
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
 
670
<td>position to insert the new row</td>
 
671
</tr>
 
672
</tbody>
 
673
</table></div>
 
674
</div>
 
675
<hr>
 
676
<div class="refsect2">
 
677
<a name="gtk-list-store-insert-before"></a><h3>gtk_list_store_insert_before ()</h3>
 
678
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_insert_before        (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
679
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
680
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *sibling</code></em>);</pre>
 
681
<p>
 
682
Inserts a new row before <em class="parameter"><code>sibling</code></em>. If <em class="parameter"><code>sibling</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the row will 
 
683
be appended to the end of the list. <em class="parameter"><code>iter</code></em> will be changed to point to this 
 
684
new row. The row will be empty after this function is called. To fill in 
 
685
values, you need to call <a class="link" href="GtkListStore.html#gtk-list-store-set" title="gtk_list_store_set ()"><code class="function">gtk_list_store_set()</code></a> or <a class="link" href="GtkListStore.html#gtk-list-store-set-value" title="gtk_list_store_set_value ()"><code class="function">gtk_list_store_set_value()</code></a>.
 
686
</p>
 
687
<div class="variablelist"><table border="0" class="variablelist">
 
688
<colgroup>
 
689
<col align="left" valign="top">
 
690
<col>
 
691
</colgroup>
 
692
<tbody>
 
693
<tr>
 
694
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
695
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
696
</td>
 
697
</tr>
 
698
<tr>
 
699
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
700
<td>An unset <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
 
701
</td>
 
702
</tr>
 
703
<tr>
 
704
<td><p><span class="term"><em class="parameter"><code>sibling</code></em> :</span></p></td>
 
705
<td>A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
706
</td>
 
707
</tr>
 
708
</tbody>
 
709
</table></div>
 
710
</div>
 
711
<hr>
 
712
<div class="refsect2">
 
713
<a name="gtk-list-store-insert-after"></a><h3>gtk_list_store_insert_after ()</h3>
 
714
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_insert_after         (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
715
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
716
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *sibling</code></em>);</pre>
 
717
<p>
 
718
Inserts a new row after <em class="parameter"><code>sibling</code></em>. If <em class="parameter"><code>sibling</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the row will be
 
719
prepended to the beginning of the list. <em class="parameter"><code>iter</code></em> will be changed to point to
 
720
this new row. The row will be empty after this function is called. To fill
 
721
in values, you need to call <a class="link" href="GtkListStore.html#gtk-list-store-set" title="gtk_list_store_set ()"><code class="function">gtk_list_store_set()</code></a> or <a class="link" href="GtkListStore.html#gtk-list-store-set-value" title="gtk_list_store_set_value ()"><code class="function">gtk_list_store_set_value()</code></a>.
 
722
</p>
 
723
<div class="variablelist"><table border="0" class="variablelist">
 
724
<colgroup>
 
725
<col align="left" valign="top">
 
726
<col>
 
727
</colgroup>
 
728
<tbody>
 
729
<tr>
 
730
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
731
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
732
</td>
 
733
</tr>
 
734
<tr>
 
735
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
736
<td>An unset <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
 
737
</td>
 
738
</tr>
 
739
<tr>
 
740
<td><p><span class="term"><em class="parameter"><code>sibling</code></em> :</span></p></td>
 
741
<td>A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
742
</td>
 
743
</tr>
 
744
</tbody>
 
745
</table></div>
 
746
</div>
 
747
<hr>
 
748
<div class="refsect2">
 
749
<a name="gtk-list-store-insert-with-values"></a><h3>gtk_list_store_insert_with_values ()</h3>
 
750
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_insert_with_values   (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
751
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
752
                                                         <em class="parameter"><code><span class="type">gint</span> position</code></em>,
 
753
                                                         <em class="parameter"><code>...</code></em>);</pre>
 
754
<p>
 
755
Creates a new row at <em class="parameter"><code>position</code></em>.  <em class="parameter"><code>iter</code></em> will be changed to point to this new
 
756
row.  If <em class="parameter"><code>position</code></em> is larger than the number of rows on the list, then the
 
757
new row will be appended to the list. The row will be filled with the 
 
758
values given to this function. 
 
759
</p>
 
760
<p>
 
761
Calling
 
762
<code class="literal">gtk_list_store_insert_with_values(list_store, iter, position...)</code> 
 
763
has the same effect as calling 
 
764
</p>
 
765
<div class="informalexample">
 
766
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
767
    <tbody>
 
768
      <tr>
 
769
        <td class="listing_lines" align="right"><pre>1
 
770
2</pre></td>
 
771
        <td class="listing_code"><pre class="programlisting"><span class="function"><a href="GtkListStore.html#gtk-list-store-insert">gtk_list_store_insert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">list_store</span><span class="symbol">,</span><span class="normal"> iter</span><span class="symbol">,</span><span class="normal"> position</span><span class="symbol">);</span>
 
772
<span class="function"><a href="GtkListStore.html#gtk-list-store-set">gtk_list_store_set</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">list_store</span><span class="symbol">,</span><span class="normal"> iter</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">...);</span></pre></td>
 
773
      </tr>
 
774
    </tbody>
 
775
  </table>
 
776
</div>
 
777
 
 
778
<p>
 
779
with the difference that the former will only emit a row_inserted signal,
 
780
while the latter will emit row_inserted, row_changed and, if the list store
 
781
is sorted, rows_reordered. Since emitting the rows_reordered signal
 
782
repeatedly can affect the performance of the program, 
 
783
<a class="link" href="GtkListStore.html#gtk-list-store-insert-with-values" title="gtk_list_store_insert_with_values ()"><code class="function">gtk_list_store_insert_with_values()</code></a> should generally be preferred when
 
784
inserting rows in a sorted list store.
 
785
</p>
 
786
<div class="variablelist"><table border="0" class="variablelist">
 
787
<colgroup>
 
788
<col align="left" valign="top">
 
789
<col>
 
790
</colgroup>
 
791
<tbody>
 
792
<tr>
 
793
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
794
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
795
</td>
 
796
</tr>
 
797
<tr>
 
798
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
799
<td>An unset <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
800
</td>
 
801
</tr>
 
802
<tr>
 
803
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
 
804
<td>position to insert the new row</td>
 
805
</tr>
 
806
</tbody>
 
807
</table></div>
 
808
<p class="since">Since 2.6</p>
 
809
</div>
 
810
<hr>
 
811
<div class="refsect2">
 
812
<a name="gtk-list-store-insert-with-valuesv"></a><h3>gtk_list_store_insert_with_valuesv ()</h3>
 
813
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_insert_with_valuesv  (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
814
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
815
                                                         <em class="parameter"><code><span class="type">gint</span> position</code></em>,
 
816
                                                         <em class="parameter"><code><span class="type">gint</span> *columns</code></em>,
 
817
                                                         <em class="parameter"><code><span class="type">GValue</span> *values</code></em>,
 
818
                                                         <em class="parameter"><code><span class="type">gint</span> n_values</code></em>);</pre>
 
819
<p>
 
820
A variant of <a class="link" href="GtkListStore.html#gtk-list-store-insert-with-values" title="gtk_list_store_insert_with_values ()"><code class="function">gtk_list_store_insert_with_values()</code></a> which
 
821
takes the columns and values as two arrays, instead of
 
822
varargs. This function is mainly intended for 
 
823
language-bindings.
 
824
</p>
 
825
<div class="variablelist"><table border="0" class="variablelist">
 
826
<colgroup>
 
827
<col align="left" valign="top">
 
828
<col>
 
829
</colgroup>
 
830
<tbody>
 
831
<tr>
 
832
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
833
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
834
</td>
 
835
</tr>
 
836
<tr>
 
837
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
838
<td>An unset <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the new row, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
839
</td>
 
840
</tr>
 
841
<tr>
 
842
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
 
843
<td>position to insert the new row</td>
 
844
</tr>
 
845
<tr>
 
846
<td><p><span class="term"><em class="parameter"><code>columns</code></em> :</span></p></td>
 
847
<td>an array of column numbers. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_values]</span>
 
848
</td>
 
849
</tr>
 
850
<tr>
 
851
<td><p><span class="term"><em class="parameter"><code>values</code></em> :</span></p></td>
 
852
<td>an array of GValues. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_values]</span>
 
853
</td>
 
854
</tr>
 
855
<tr>
 
856
<td><p><span class="term"><em class="parameter"><code>n_values</code></em> :</span></p></td>
 
857
<td>the length of the <em class="parameter"><code>columns</code></em> and <em class="parameter"><code>values</code></em> arrays</td>
 
858
</tr>
 
859
</tbody>
 
860
</table></div>
 
861
<p class="since">Since 2.6</p>
 
862
</div>
 
863
<hr>
 
864
<div class="refsect2">
 
865
<a name="gtk-list-store-prepend"></a><h3>gtk_list_store_prepend ()</h3>
 
866
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_prepend              (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
867
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
 
868
<p>
 
869
Prepends a new row to <em class="parameter"><code>list_store</code></em>. <em class="parameter"><code>iter</code></em> will be changed to point to this new
 
870
row. The row will be empty after this function is called. To fill in
 
871
values, you need to call <a class="link" href="GtkListStore.html#gtk-list-store-set" title="gtk_list_store_set ()"><code class="function">gtk_list_store_set()</code></a> or <a class="link" href="GtkListStore.html#gtk-list-store-set-value" title="gtk_list_store_set_value ()"><code class="function">gtk_list_store_set_value()</code></a>.
 
872
</p>
 
873
<div class="variablelist"><table border="0" class="variablelist">
 
874
<colgroup>
 
875
<col align="left" valign="top">
 
876
<col>
 
877
</colgroup>
 
878
<tbody>
 
879
<tr>
 
880
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
881
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
882
</td>
 
883
</tr>
 
884
<tr>
 
885
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
886
<td>An unset <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the prepend row. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
 
887
</td>
 
888
</tr>
 
889
</tbody>
 
890
</table></div>
 
891
</div>
 
892
<hr>
 
893
<div class="refsect2">
 
894
<a name="gtk-list-store-append"></a><h3>gtk_list_store_append ()</h3>
 
895
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_append               (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
896
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
 
897
<p>
 
898
Appends a new row to <em class="parameter"><code>list_store</code></em>.  <em class="parameter"><code>iter</code></em> will be changed to point to this new
 
899
row.  The row will be empty after this function is called.  To fill in
 
900
values, you need to call <a class="link" href="GtkListStore.html#gtk-list-store-set" title="gtk_list_store_set ()"><code class="function">gtk_list_store_set()</code></a> or <a class="link" href="GtkListStore.html#gtk-list-store-set-value" title="gtk_list_store_set_value ()"><code class="function">gtk_list_store_set_value()</code></a>.
 
901
</p>
 
902
<div class="variablelist"><table border="0" class="variablelist">
 
903
<colgroup>
 
904
<col align="left" valign="top">
 
905
<col>
 
906
</colgroup>
 
907
<tbody>
 
908
<tr>
 
909
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
910
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>
 
911
</td>
 
912
</tr>
 
913
<tr>
 
914
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
915
<td>An unset <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> to set to the appended row. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
 
916
</td>
 
917
</tr>
 
918
</tbody>
 
919
</table></div>
 
920
</div>
 
921
<hr>
 
922
<div class="refsect2">
 
923
<a name="gtk-list-store-clear"></a><h3>gtk_list_store_clear ()</h3>
 
924
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_clear                (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>);</pre>
 
925
<p>
 
926
Removes all rows from the list store.
 
927
</p>
 
928
<div class="variablelist"><table border="0" class="variablelist">
 
929
<colgroup>
 
930
<col align="left" valign="top">
 
931
<col>
 
932
</colgroup>
 
933
<tbody><tr>
 
934
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
935
<td>a <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.</td>
 
936
</tr></tbody>
 
937
</table></div>
 
938
</div>
 
939
<hr>
 
940
<div class="refsect2">
 
941
<a name="gtk-list-store-iter-is-valid"></a><h3>gtk_list_store_iter_is_valid ()</h3>
 
942
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gtk_list_store_iter_is_valid        (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *list_store</code></em>,
 
943
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
 
944
<p>
 
945
</p>
 
946
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
947
<h3 class="title">Warning</h3>This function is slow. Only use it for debugging and/or testing
 
948
purposes.</div>
 
949
<p>
 
950
</p>
 
951
<p>
 
952
Checks if the given iter is a valid iter for this <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.
 
953
</p>
 
954
<div class="variablelist"><table border="0" class="variablelist">
 
955
<colgroup>
 
956
<col align="left" valign="top">
 
957
<col>
 
958
</colgroup>
 
959
<tbody>
 
960
<tr>
 
961
<td><p><span class="term"><em class="parameter"><code>list_store</code></em> :</span></p></td>
 
962
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.</td>
 
963
</tr>
 
964
<tr>
 
965
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
966
<td>A <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.</td>
 
967
</tr>
 
968
<tr>
 
969
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
970
<td>
 
971
<code class="literal">TRUE</code> if the iter is valid, <code class="literal">FALSE</code> if the iter is invalid.</td>
 
972
</tr>
 
973
</tbody>
 
974
</table></div>
 
975
<p class="since">Since 2.2</p>
 
976
</div>
 
977
<hr>
 
978
<div class="refsect2">
 
979
<a name="gtk-list-store-reorder"></a><h3>gtk_list_store_reorder ()</h3>
 
980
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_reorder              (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *store</code></em>,
 
981
                                                         <em class="parameter"><code><span class="type">gint</span> *new_order</code></em>);</pre>
 
982
<p>
 
983
Reorders <em class="parameter"><code>store</code></em> to follow the order indicated by <em class="parameter"><code>new_order</code></em>. Note that
 
984
this function only works with unsorted stores.
 
985
</p>
 
986
<div class="variablelist"><table border="0" class="variablelist">
 
987
<colgroup>
 
988
<col align="left" valign="top">
 
989
<col>
 
990
</colgroup>
 
991
<tbody>
 
992
<tr>
 
993
<td><p><span class="term"><em class="parameter"><code>store</code></em> :</span></p></td>
 
994
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.</td>
 
995
</tr>
 
996
<tr>
 
997
<td><p><span class="term"><em class="parameter"><code>new_order</code></em> :</span></p></td>
 
998
<td>an array of integers mapping the new position of each child
 
999
to its old position before the re-ordering,
 
1000
i.e. <em class="parameter"><code>new_order</code></em><code class="literal">[newpos] = oldpos</code>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span>
 
1001
</td>
 
1002
</tr>
 
1003
</tbody>
 
1004
</table></div>
 
1005
<p class="since">Since 2.2</p>
 
1006
</div>
 
1007
<hr>
 
1008
<div class="refsect2">
 
1009
<a name="gtk-list-store-swap"></a><h3>gtk_list_store_swap ()</h3>
 
1010
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_swap                 (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *store</code></em>,
 
1011
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *a</code></em>,
 
1012
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *b</code></em>);</pre>
 
1013
<p>
 
1014
Swaps <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> in <em class="parameter"><code>store</code></em>. Note that this function only works with
 
1015
unsorted stores.
 
1016
</p>
 
1017
<div class="variablelist"><table border="0" class="variablelist">
 
1018
<colgroup>
 
1019
<col align="left" valign="top">
 
1020
<col>
 
1021
</colgroup>
 
1022
<tbody>
 
1023
<tr>
 
1024
<td><p><span class="term"><em class="parameter"><code>store</code></em> :</span></p></td>
 
1025
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.</td>
 
1026
</tr>
 
1027
<tr>
 
1028
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
 
1029
<td>A <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.</td>
 
1030
</tr>
 
1031
<tr>
 
1032
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
 
1033
<td>Another <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.</td>
 
1034
</tr>
 
1035
</tbody>
 
1036
</table></div>
 
1037
<p class="since">Since 2.2</p>
 
1038
</div>
 
1039
<hr>
 
1040
<div class="refsect2">
 
1041
<a name="gtk-list-store-move-before"></a><h3>gtk_list_store_move_before ()</h3>
 
1042
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_move_before          (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *store</code></em>,
 
1043
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
1044
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *position</code></em>);</pre>
 
1045
<p>
 
1046
Moves <em class="parameter"><code>iter</code></em> in <em class="parameter"><code>store</code></em> to the position before <em class="parameter"><code>position</code></em>. Note that this
 
1047
function only works with unsorted stores. If <em class="parameter"><code>position</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, <em class="parameter"><code>iter</code></em>
 
1048
will be moved to the end of the list.
 
1049
</p>
 
1050
<div class="variablelist"><table border="0" class="variablelist">
 
1051
<colgroup>
 
1052
<col align="left" valign="top">
 
1053
<col>
 
1054
</colgroup>
 
1055
<tbody>
 
1056
<tr>
 
1057
<td><p><span class="term"><em class="parameter"><code>store</code></em> :</span></p></td>
 
1058
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.</td>
 
1059
</tr>
 
1060
<tr>
 
1061
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
1062
<td>A <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.</td>
 
1063
</tr>
 
1064
<tr>
 
1065
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
 
1066
<td>A <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
1067
</td>
 
1068
</tr>
 
1069
</tbody>
 
1070
</table></div>
 
1071
<p class="since">Since 2.2</p>
 
1072
</div>
 
1073
<hr>
 
1074
<div class="refsect2">
 
1075
<a name="gtk-list-store-move-after"></a><h3>gtk_list_store_move_after ()</h3>
 
1076
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_list_store_move_after           (<em class="parameter"><code><a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a> *store</code></em>,
 
1077
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
 
1078
                                                         <em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *position</code></em>);</pre>
 
1079
<p>
 
1080
Moves <em class="parameter"><code>iter</code></em> in <em class="parameter"><code>store</code></em> to the position after <em class="parameter"><code>position</code></em>. Note that this
 
1081
function only works with unsorted stores. If <em class="parameter"><code>position</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, <em class="parameter"><code>iter</code></em>
 
1082
will be moved to the start of the list.
 
1083
</p>
 
1084
<div class="variablelist"><table border="0" class="variablelist">
 
1085
<colgroup>
 
1086
<col align="left" valign="top">
 
1087
<col>
 
1088
</colgroup>
 
1089
<tbody>
 
1090
<tr>
 
1091
<td><p><span class="term"><em class="parameter"><code>store</code></em> :</span></p></td>
 
1092
<td>A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a>.</td>
 
1093
</tr>
 
1094
<tr>
 
1095
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
 
1096
<td>A <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a>.</td>
 
1097
</tr>
 
1098
<tr>
 
1099
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
 
1100
<td>A <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
1101
</td>
 
1102
</tr>
 
1103
</tbody>
 
1104
</table></div>
 
1105
<p class="since">Since 2.2</p>
 
1106
</div>
 
1107
</div>
 
1108
<div class="refsect1">
 
1109
<a name="GtkListStore.see-also"></a><h2>See Also</h2>
 
1110
<p>
 
1111
<a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>, <a class="link" href="GtkTreeStore.html" title="GtkTreeStore"><span class="type">GtkTreeStore</span></a>
 
1112
</p>
 
1113
</div>
 
1114
</div>
 
1115
<div class="footer">
 
1116
<hr>
 
1117
          Generated by GTK-Doc V1.18</div>
 
1118
</body>
 
1119
</html>
 
 
b'\\ No newline at end of file'