1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>GcrCollectionModel</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
<link rel="home" href="index.html" title="Gcr Library Reference Manual">
8
<link rel="up" href="collections.html" title="Part II. Collections">
9
<link rel="prev" href="GcrSimpleCollection.html" title="GcrSimpleCollection">
10
<link rel="next" href="widgets.html" title="Part III. Widgets">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
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">
17
<td><a accesskey="p" href="GcrSimpleCollection.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="collections.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">Gcr Library Reference Manual</th>
21
<td><a accesskey="n" href="widgets.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#GcrCollectionModel.synopsis" class="shortcut">Top</a>
26
<a href="#GcrCollectionModel.description" class="shortcut">Description</a>
28
<a href="#GcrCollectionModel.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#GcrCollectionModel.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
32
<a href="#GcrCollectionModel.properties" class="shortcut">Properties</a>
35
<div class="refentry">
36
<a name="GcrCollectionModel"></a><div class="titlepage"></div>
37
<div class="refnamediv"><table width="100%"><tr>
39
<h2><span class="refentrytitle"><a name="GcrCollectionModel.top_of_page"></a>GcrCollectionModel</span></h2>
40
<p>GcrCollectionModel — A GtkTreeModel that represents a collection</p>
42
<td valign="top" align="right"></td>
44
<div class="refsynopsisdiv">
45
<a name="GcrCollectionModel.synopsis"></a><h2>Synopsis</h2>
46
<pre class="synopsis">struct <a class="link" href="GcrCollectionModel.html#GcrCollectionModel-struct" title="struct GcrCollectionModel">GcrCollectionModel</a>;
47
struct <a class="link" href="GcrCollectionModel.html#GcrCollectionModelClass" title="struct GcrCollectionModelClass">GcrCollectionModelClass</a>;
48
enum <a class="link" href="GcrCollectionModel.html#GcrCollectionModelMode" title="enum GcrCollectionModelMode">GcrCollectionModelMode</a>;
49
<a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="returnvalue">GcrCollectionModel</span></a> * <a class="link" href="GcrCollectionModel.html#gcr-collection-model-new" title="gcr_collection_model_new ()">gcr_collection_model_new</a> (<em class="parameter"><code><a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a> *collection</code></em>,
50
<em class="parameter"><code><a class="link" href="GcrCollectionModel.html#GcrCollectionModelMode" title="enum GcrCollectionModelMode"><span class="type">GcrCollectionModelMode</span></a> mode</code></em>,
51
<em class="parameter"><code>...</code></em>);
52
<a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="returnvalue">GcrCollectionModel</span></a> * <a class="link" href="GcrCollectionModel.html#gcr-collection-model-new-full" title="gcr_collection_model_new_full ()">gcr_collection_model_new_full</a> (<em class="parameter"><code><a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a> *collection</code></em>,
53
<em class="parameter"><code><a class="link" href="GcrCollectionModel.html#GcrCollectionModelMode" title="enum GcrCollectionModelMode"><span class="type">GcrCollectionModelMode</span></a> mode</code></em>,
54
<em class="parameter"><code>const <a class="link" href="gcr-GcrColumn.html#GcrColumn" title="GcrColumn"><span class="type">GcrColumn</span></a> *columns</code></em>);
55
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GcrCollectionModel.html#gcr-collection-model-set-columns" title="gcr_collection_model_set_columns ()">gcr_collection_model_set_columns</a> (<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
56
<em class="parameter"><code>const <a class="link" href="gcr-GcrColumn.html#GcrColumn" title="GcrColumn"><span class="type">GcrColumn</span></a> *columns</code></em>);
57
<a class="link" href="GcrCollection.html" title="GcrCollection"><span class="returnvalue">GcrCollection</span></a> * <a class="link" href="GcrCollectionModel.html#gcr-collection-model-get-collection" title="gcr_collection_model_get_collection ()">gcr_collection_model_get_collection</a> (<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>);
58
<span class="returnvalue">void</span> <a class="link" href="GcrCollectionModel.html#gcr-collection-model-set-collection" title="gcr_collection_model_set_collection ()">gcr_collection_model_set_collection</a> (<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
59
<em class="parameter"><code><a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a> *collection</code></em>);
60
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GcrCollectionModel.html#gcr-collection-model-iter-for-object" title="gcr_collection_model_iter_for_object ()">gcr_collection_model_iter_for_object</a>
61
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
62
<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
63
<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
64
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> * <a class="link" href="GcrCollectionModel.html#gcr-collection-model-object-for-iter" title="gcr_collection_model_object_for_iter ()">gcr_collection_model_object_for_iter</a>
65
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
66
<em class="parameter"><code>const <a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
67
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GcrCollectionModel.html#gcr-collection-model-is-selected" title="gcr_collection_model_is_selected ()">gcr_collection_model_is_selected</a> (<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
68
<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
69
<span class="returnvalue">void</span> <a class="link" href="GcrCollectionModel.html#gcr-collection-model-change-selected" title="gcr_collection_model_change_selected ()">gcr_collection_model_change_selected</a>
70
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
71
<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
72
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> selected</code></em>);
73
<span class="returnvalue">void</span> <a class="link" href="GcrCollectionModel.html#gcr-collection-model-toggle-selected" title="gcr_collection_model_toggle_selected ()">gcr_collection_model_toggle_selected</a>
74
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
75
<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
76
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="GcrCollectionModel.html#gcr-collection-model-get-selected-objects" title="gcr_collection_model_get_selected_objects ()">gcr_collection_model_get_selected_objects</a>
77
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>);
78
<span class="returnvalue">void</span> <a class="link" href="GcrCollectionModel.html#gcr-collection-model-set-selected-objects" title="gcr_collection_model_set_selected_objects ()">gcr_collection_model_set_selected_objects</a>
79
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
80
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *selected</code></em>);
81
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="GcrCollectionModel.html#gcr-collection-model-column-for-selected" title="gcr_collection_model_column_for_selected ()">gcr_collection_model_column_for_selected</a>
82
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>);
85
<div class="refsect1">
86
<a name="GcrCollectionModel.object-hierarchy"></a><h2>Object Hierarchy</h2>
87
<pre class="synopsis">
88
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
89
+----GcrCollectionModel
92
<div class="refsect1">
93
<a name="GcrCollectionModel.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
95
GcrCollectionModel implements
96
<a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html">GtkTreeModel</a> and <a href="http://developer.gnome.org/devel/gtk/GtkTreeSortable.html">GtkTreeSortable</a>.</p>
98
<div class="refsect1">
99
<a name="GcrCollectionModel.properties"></a><h2>Properties</h2>
100
<pre class="synopsis">
101
"<a class="link" href="GcrCollectionModel.html#GcrCollectionModel--collection" title='The "collection" property'>collection</a>" <a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a>* : Read / Write
102
"<a class="link" href="GcrCollectionModel.html#GcrCollectionModel--columns" title='The "columns" property'>columns</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write / Construct Only
103
"<a class="link" href="GcrCollectionModel.html#GcrCollectionModel--mode" title='The "mode" property'>mode</a>" <a class="link" href="GcrCollectionModel.html#GcrCollectionModelMode" title="enum GcrCollectionModelMode"><span class="type">GcrCollectionModelMode</span></a> : Read / Write / Construct Only
106
<div class="refsect1">
107
<a name="GcrCollectionModel.description"></a><h2>Description</h2>
109
This is an implementation of <a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html"><span class="type">GtkTreeModel</span></a> which represents the objects in
110
the a <a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a>. As objects are added or removed from the collection,
111
rows are added and removed from this model.
114
The row values come from the properties of the objects in the collection. Use
115
<a class="link" href="GcrCollectionModel.html#gcr-collection-model-new" title="gcr_collection_model_new ()"><code class="function">gcr_collection_model_new()</code></a> to create a new collection model. To have more
116
control over the values use a set of <a class="link" href="gcr-GcrColumn.html#GcrColumn" title="GcrColumn"><span class="type">GcrColumn</span></a> structures to define the
117
columns. This can be done with <a class="link" href="GcrCollectionModel.html#gcr-collection-model-new-full" title="gcr_collection_model_new_full ()"><code class="function">gcr_collection_model_new_full()</code></a> or
118
<a class="link" href="GcrCollectionModel.html#gcr-collection-model-set-columns" title="gcr_collection_model_set_columns ()"><code class="function">gcr_collection_model_set_columns()</code></a>.
121
Each row can have a selected state, which is represented by a boolean column.
122
The selected state can be toggled with <a class="link" href="GcrCollectionModel.html#gcr-collection-model-toggle-selected" title="gcr_collection_model_toggle_selected ()"><code class="function">gcr_collection_model_toggle_selected()</code></a>
123
or set with <a class="link" href="GcrCollectionModel.html#gcr-collection-model-set-selected-objects" title="gcr_collection_model_set_selected_objects ()"><code class="function">gcr_collection_model_set_selected_objects()</code></a> and retrieved with
124
<a class="link" href="GcrCollectionModel.html#gcr-collection-model-get-selected-objects" title="gcr_collection_model_get_selected_objects ()"><code class="function">gcr_collection_model_get_selected_objects()</code></a>.
127
To determine which object a row represents and vice versa, use the
128
<a class="link" href="GcrCollectionModel.html#gcr-collection-model-iter-for-object" title="gcr_collection_model_iter_for_object ()"><code class="function">gcr_collection_model_iter_for_object()</code></a> or <a class="link" href="GcrCollectionModel.html#gcr-collection-model-object-for-iter" title="gcr_collection_model_object_for_iter ()"><code class="function">gcr_collection_model_object_for_iter()</code></a>
132
<div class="refsect1">
133
<a name="GcrCollectionModel.details"></a><h2>Details</h2>
134
<div class="refsect2">
135
<a name="GcrCollectionModel-struct"></a><h3>struct GcrCollectionModel</h3>
136
<pre class="programlisting">struct GcrCollectionModel;</pre>
138
A <a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html"><span class="type">GtkTreeModel</span></a> which contains a row for each object in a <a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a>.
142
<div class="refsect2">
143
<a name="GcrCollectionModelClass"></a><h3>struct GcrCollectionModelClass</h3>
144
<pre class="programlisting">struct GcrCollectionModelClass {
145
GObjectClass parent_class;
149
The class for <a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a>.
151
<div class="variablelist"><table border="0">
152
<col align="left" valign="top">
154
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="GcrCollectionModelClass.parent-class"></a>parent_class</code></em>;</span></p></td>
155
<td>The parent class</td>
160
<div class="refsect2">
161
<a name="GcrCollectionModelMode"></a><h3>enum GcrCollectionModelMode</h3>
162
<pre class="programlisting">typedef enum {
163
GCR_COLLECTION_MODEL_LIST = 0,
164
GCR_COLLECTION_MODEL_TREE
165
} GcrCollectionModelMode;
168
If set GcrCollectionModel is created with a mode of <a class="link" href="GcrCollectionModel.html#GCR-COLLECTION-MODEL-TREE:CAPS"><code class="literal">GCR_COLLECTION_MODEL_TREE</code></a>,
169
then any included objects that are themselves a <a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a>, will have all child
170
objects include as child rows in a tree form.
172
<div class="variablelist"><table border="0">
173
<col align="left" valign="top">
176
<td><p><a name="GCR-COLLECTION-MODEL-LIST:CAPS"></a><span class="term"><code class="literal">GCR_COLLECTION_MODEL_LIST</code></span></p></td>
177
<td>only objects in the top collection, no child objects
181
<td><p><a name="GCR-COLLECTION-MODEL-TREE:CAPS"></a><span class="term"><code class="literal">GCR_COLLECTION_MODEL_TREE</code></span></p></td>
182
<td>show objects in the collection, and child objects in a tree form
189
<div class="refsect2">
190
<a name="gcr-collection-model-new"></a><h3>gcr_collection_model_new ()</h3>
191
<pre class="programlisting"><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="returnvalue">GcrCollectionModel</span></a> * gcr_collection_model_new (<em class="parameter"><code><a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a> *collection</code></em>,
192
<em class="parameter"><code><a class="link" href="GcrCollectionModel.html#GcrCollectionModelMode" title="enum GcrCollectionModelMode"><span class="type">GcrCollectionModelMode</span></a> mode</code></em>,
193
<em class="parameter"><code>...</code></em>);</pre>
195
Create a new <a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a>. The variable argument list should contain
196
pairs of property names, and <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> values. The variable argument list should
197
be terminated with <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
199
<div class="variablelist"><table border="0">
200
<col align="left" valign="top">
203
<td><p><span class="term"><em class="parameter"><code>collection</code></em> :</span></p></td>
204
<td>the collection to represent</td>
207
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
208
<td>whether list or tree mode</td>
211
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
212
<td>the column names and types</td>
215
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
216
<td>a newly allocated model, which should be released
217
with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
224
<div class="refsect2">
225
<a name="gcr-collection-model-new-full"></a><h3>gcr_collection_model_new_full ()</h3>
226
<pre class="programlisting"><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="returnvalue">GcrCollectionModel</span></a> * gcr_collection_model_new_full (<em class="parameter"><code><a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a> *collection</code></em>,
227
<em class="parameter"><code><a class="link" href="GcrCollectionModel.html#GcrCollectionModelMode" title="enum GcrCollectionModelMode"><span class="type">GcrCollectionModelMode</span></a> mode</code></em>,
228
<em class="parameter"><code>const <a class="link" href="gcr-GcrColumn.html#GcrColumn" title="GcrColumn"><span class="type">GcrColumn</span></a> *columns</code></em>);</pre>
230
Create a new <a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a>.
232
<div class="variablelist"><table border="0">
233
<col align="left" valign="top">
236
<td><p><span class="term"><em class="parameter"><code>collection</code></em> :</span></p></td>
237
<td>the collection to represent</td>
240
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
241
<td>whether list or tree mode</td>
244
<td><p><span class="term"><em class="parameter"><code>columns</code></em> :</span></p></td>
245
<td>the columns the model should contain</td>
248
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
249
<td>a newly allocated model, which should be released
250
with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
257
<div class="refsect2">
258
<a name="gcr-collection-model-set-columns"></a><h3>gcr_collection_model_set_columns ()</h3>
259
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gcr_collection_model_set_columns (<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
260
<em class="parameter"><code>const <a class="link" href="gcr-GcrColumn.html#GcrColumn" title="GcrColumn"><span class="type">GcrColumn</span></a> *columns</code></em>);</pre>
262
Set the columns that the model should contain. <em class="parameter"><code>columns</code></em> is an array of
263
<a class="link" href="gcr-GcrColumn.html#GcrColumn" title="GcrColumn"><span class="type">GcrColumn</span></a> structures, with the last one containing <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for all values.
266
This function can only be called once, and only if the model was not created
267
without a set of columns. This function cannot be called after the model
268
has been added to a view.
271
The columns are accessed as static data. They should continue to remain
272
in memory for longer than the GcrCollectionModel object.
274
<div class="variablelist"><table border="0">
275
<col align="left" valign="top">
278
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
282
<td><p><span class="term"><em class="parameter"><code>columns</code></em> :</span></p></td>
283
<td>The columns the model should contain</td>
286
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
287
<td>The number of columns</td>
293
<div class="refsect2">
294
<a name="gcr-collection-model-get-collection"></a><h3>gcr_collection_model_get_collection ()</h3>
295
<pre class="programlisting"><a class="link" href="GcrCollection.html" title="GcrCollection"><span class="returnvalue">GcrCollection</span></a> * gcr_collection_model_get_collection (<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>);</pre>
297
Get the collection which this model represents
299
<div class="variablelist"><table border="0">
300
<col align="left" valign="top">
303
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
304
<td>a collection model</td>
307
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
308
<td>the collection, owned by the model. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
315
<div class="refsect2">
316
<a name="gcr-collection-model-set-collection"></a><h3>gcr_collection_model_set_collection ()</h3>
317
<pre class="programlisting"><span class="returnvalue">void</span> gcr_collection_model_set_collection (<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
318
<em class="parameter"><code><a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a> *collection</code></em>);</pre>
323
<div class="refsect2">
324
<a name="gcr-collection-model-iter-for-object"></a><h3>gcr_collection_model_iter_for_object ()</h3>
325
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gcr_collection_model_iter_for_object
326
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
327
<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
328
<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
330
Set <em class="parameter"><code>iter</code></em> to the row for the given object. If the object is not in this
331
model, then <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be returned.
333
<div class="variablelist"><table border="0">
334
<col align="left" valign="top">
337
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
341
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
345
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
346
<td>The row for the object</td>
349
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
351
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the object was present.</td>
357
<div class="refsect2">
358
<a name="gcr-collection-model-object-for-iter"></a><h3>gcr_collection_model_object_for_iter ()</h3>
359
<pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> * gcr_collection_model_object_for_iter
360
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
361
<em class="parameter"><code>const <a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
363
Get the object that is represented by the given row in the model.
365
<div class="variablelist"><table border="0">
366
<col align="left" valign="top">
369
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
373
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
377
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
378
<td>The object, owned by the model. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
385
<div class="refsect2">
386
<a name="gcr-collection-model-is-selected"></a><h3>gcr_collection_model_is_selected ()</h3>
387
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gcr_collection_model_is_selected (<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
388
<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
390
Check whether a given row has been toggled as selected.
392
<div class="variablelist"><table border="0">
393
<col align="left" valign="top">
396
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
400
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
404
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
405
<td>Whether the row has been selected.</td>
411
<div class="refsect2">
412
<a name="gcr-collection-model-change-selected"></a><h3>gcr_collection_model_change_selected ()</h3>
413
<pre class="programlisting"><span class="returnvalue">void</span> gcr_collection_model_change_selected
414
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
415
<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
416
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> selected</code></em>);</pre>
418
Set whether a given row is toggled selected or not.
420
<div class="variablelist"><table border="0">
421
<col align="left" valign="top">
424
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
428
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
432
<td><p><span class="term"><em class="parameter"><code>selected</code></em> :</span></p></td>
433
<td>Whether the row should be selected or not.</td>
439
<div class="refsect2">
440
<a name="gcr-collection-model-toggle-selected"></a><h3>gcr_collection_model_toggle_selected ()</h3>
441
<pre class="programlisting"><span class="returnvalue">void</span> gcr_collection_model_toggle_selected
442
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
443
<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
445
Toggle the selected state of a given row.
447
<div class="variablelist"><table border="0">
448
<col align="left" valign="top">
451
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
455
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
462
<div class="refsect2">
463
<a name="gcr-collection-model-get-selected-objects"></a><h3>gcr_collection_model_get_selected_objects ()</h3>
464
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * gcr_collection_model_get_selected_objects
465
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>);</pre>
467
Get a list of checked/selected objects.
469
<div class="variablelist"><table border="0">
470
<col align="left" valign="top">
473
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
474
<td>the collection model</td>
477
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
478
<td>a list of selected
479
objects, which should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a>. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GLib.Object]</span>
486
<div class="refsect2">
487
<a name="gcr-collection-model-set-selected-objects"></a><h3>gcr_collection_model_set_selected_objects ()</h3>
488
<pre class="programlisting"><span class="returnvalue">void</span> gcr_collection_model_set_selected_objects
489
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>,
490
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *selected</code></em>);</pre>
492
Set the checked/selected objects.
494
<div class="variablelist"><table border="0">
495
<col align="left" valign="top">
498
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
499
<td>the collection model</td>
502
<td><p><span class="term"><em class="parameter"><code>selected</code></em> :</span></p></td>
503
<td>a list of objects to select. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GLib.Object]</span>
510
<div class="refsect2">
511
<a name="gcr-collection-model-column-for-selected"></a><h3>gcr_collection_model_column_for_selected ()</h3>
512
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gcr_collection_model_column_for_selected
513
(<em class="parameter"><code><a class="link" href="GcrCollectionModel.html" title="GcrCollectionModel"><span class="type">GcrCollectionModel</span></a> *self</code></em>);</pre>
515
Get the column identifier for the column that contains the values
516
of the selected state.
518
<div class="variablelist"><table border="0">
519
<col align="left" valign="top">
522
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
526
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
527
<td>The column identifier.</td>
533
<div class="refsect1">
534
<a name="GcrCollectionModel.property-details"></a><h2>Property Details</h2>
535
<div class="refsect2">
536
<a name="GcrCollectionModel--collection"></a><h3>The <code class="literal">"collection"</code> property</h3>
537
<pre class="programlisting"> "collection" <a class="link" href="GcrCollection.html" title="GcrCollection"><span class="type">GcrCollection</span></a>* : Read / Write</pre>
538
<p>Collection to get objects from.</p>
541
<div class="refsect2">
542
<a name="GcrCollectionModel--columns"></a><h3>The <code class="literal">"columns"</code> property</h3>
543
<pre class="programlisting"> "columns" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write / Construct Only</pre>
544
<p>Columns for the model.</p>
547
<div class="refsect2">
548
<a name="GcrCollectionModel--mode"></a><h3>The <code class="literal">"mode"</code> property</h3>
549
<pre class="programlisting"> "mode" <a class="link" href="GcrCollectionModel.html#GcrCollectionModelMode" title="enum GcrCollectionModelMode"><span class="type">GcrCollectionModelMode</span></a> : Read / Write / Construct Only</pre>
550
<p>Tree or list mode.</p>
551
<p>Default value: GCR_COLLECTION_MODEL_TREE</p>
557
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'