1
<refentry id="GtkList">
3
<refentrytitle role="top_of_page">GtkList</refentrytitle>
4
<manvolnum>3</manvolnum>
5
<refmiscinfo>GTK Library</refmiscinfo>
9
<refname>GtkList</refname>
10
<refpurpose>Widget for packing a list of selectable items</refpurpose>
11
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
14
<refsynopsisdiv role="synopsis">
15
<title role="synopsis.title">Synopsis</title>
19
#include <gtk/gtk.h>
22
<link linkend="GtkList-struct">GtkList</link>;
23
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gtk-list-new">gtk_list_new</link> (void);
24
<link linkend="void">void</link> <link linkend="gtk-list-insert-items">gtk_list_insert_items</link> (<link linkend="GtkList">GtkList</link> *list,
25
<link linkend="GList">GList</link> *items,
26
<link linkend="gint">gint</link> position);
27
<link linkend="void">void</link> <link linkend="gtk-list-append-items">gtk_list_append_items</link> (<link linkend="GtkList">GtkList</link> *list,
28
<link linkend="GList">GList</link> *items);
29
<link linkend="void">void</link> <link linkend="gtk-list-prepend-items">gtk_list_prepend_items</link> (<link linkend="GtkList">GtkList</link> *list,
30
<link linkend="GList">GList</link> *items);
31
<link linkend="void">void</link> <link linkend="gtk-list-remove-items">gtk_list_remove_items</link> (<link linkend="GtkList">GtkList</link> *list,
32
<link linkend="GList">GList</link> *items);
33
<link linkend="void">void</link> <link linkend="gtk-list-remove-items-no-unref">gtk_list_remove_items_no_unref</link> (<link linkend="GtkList">GtkList</link> *list,
34
<link linkend="GList">GList</link> *items);
35
<link linkend="void">void</link> <link linkend="gtk-list-clear-items">gtk_list_clear_items</link> (<link linkend="GtkList">GtkList</link> *list,
36
<link linkend="gint">gint</link> start,
37
<link linkend="gint">gint</link> end);
38
<link linkend="void">void</link> <link linkend="gtk-list-select-item">gtk_list_select_item</link> (<link linkend="GtkList">GtkList</link> *list,
39
<link linkend="gint">gint</link> item);
40
<link linkend="void">void</link> <link linkend="gtk-list-unselect-item">gtk_list_unselect_item</link> (<link linkend="GtkList">GtkList</link> *list,
41
<link linkend="gint">gint</link> item);
42
<link linkend="void">void</link> <link linkend="gtk-list-select-child">gtk_list_select_child</link> (<link linkend="GtkList">GtkList</link> *list,
43
<link linkend="GtkWidget">GtkWidget</link> *child);
44
<link linkend="void">void</link> <link linkend="gtk-list-unselect-child">gtk_list_unselect_child</link> (<link linkend="GtkList">GtkList</link> *list,
45
<link linkend="GtkWidget">GtkWidget</link> *child);
46
<link linkend="gint">gint</link> <link linkend="gtk-list-child-position">gtk_list_child_position</link> (<link linkend="GtkList">GtkList</link> *list,
47
<link linkend="GtkWidget">GtkWidget</link> *child);
48
<link linkend="void">void</link> <link linkend="gtk-list-set-selection-mode">gtk_list_set_selection_mode</link> (<link linkend="GtkList">GtkList</link> *list,
49
<link linkend="GtkSelectionMode">GtkSelectionMode</link> mode);
50
<link linkend="void">void</link> <link linkend="gtk-list-extend-selection">gtk_list_extend_selection</link> (<link linkend="GtkList">GtkList</link> *list,
51
<link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
52
<link linkend="gfloat">gfloat</link> position,
53
<link linkend="gboolean">gboolean</link> auto_start_selection);
54
<link linkend="void">void</link> <link linkend="gtk-list-start-selection">gtk_list_start_selection</link> (<link linkend="GtkList">GtkList</link> *list);
55
<link linkend="void">void</link> <link linkend="gtk-list-end-selection">gtk_list_end_selection</link> (<link linkend="GtkList">GtkList</link> *list);
56
<link linkend="void">void</link> <link linkend="gtk-list-select-all">gtk_list_select_all</link> (<link linkend="GtkList">GtkList</link> *list);
57
<link linkend="void">void</link> <link linkend="gtk-list-unselect-all">gtk_list_unselect_all</link> (<link linkend="GtkList">GtkList</link> *list);
58
<link linkend="void">void</link> <link linkend="gtk-list-scroll-horizontal">gtk_list_scroll_horizontal</link> (<link linkend="GtkList">GtkList</link> *list,
59
<link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
60
<link linkend="gfloat">gfloat</link> position);
61
<link linkend="void">void</link> <link linkend="gtk-list-scroll-vertical">gtk_list_scroll_vertical</link> (<link linkend="GtkList">GtkList</link> *list,
62
<link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
63
<link linkend="gfloat">gfloat</link> position);
64
<link linkend="void">void</link> <link linkend="gtk-list-toggle-add-mode">gtk_list_toggle_add_mode</link> (<link linkend="GtkList">GtkList</link> *list);
65
<link linkend="void">void</link> <link linkend="gtk-list-toggle-focus-row">gtk_list_toggle_focus_row</link> (<link linkend="GtkList">GtkList</link> *list);
66
<link linkend="void">void</link> <link linkend="gtk-list-toggle-row">gtk_list_toggle_row</link> (<link linkend="GtkList">GtkList</link> *list,
67
<link linkend="GtkWidget">GtkWidget</link> *item);
68
<link linkend="void">void</link> <link linkend="gtk-list-undo-selection">gtk_list_undo_selection</link> (<link linkend="GtkList">GtkList</link> *list);
69
<link linkend="void">void</link> <link linkend="gtk-list-end-drag-selection">gtk_list_end_drag_selection</link> (<link linkend="GtkList">GtkList</link> *list);
75
<refsect1 role="object_hierarchy">
76
<title role="object_hierarchy.title">Object Hierarchy</title>
79
<link linkend="GObject">GObject</link>
80
+----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
81
+----<link linkend="GtkObject">GtkObject</link>
82
+----<link linkend="GtkWidget">GtkWidget</link>
83
+----<link linkend="GtkContainer">GtkContainer</link>
91
<refsect1 role="impl_interfaces">
92
<title role="impl_interfaces.title">Implemented Interfaces</title>
95
<link linkend="AtkImplementorIface">AtkImplementorIface</link>.</para>
100
<refsect1 role="properties">
101
<title role="properties.title">Properties</title>
104
"<link linkend="GtkList--selection-mode">selection-mode</link>" <link linkend="GtkSelectionMode">GtkSelectionMode</link> : Read / Write
108
<refsect1 role="signal_proto">
109
<title role="signal_proto.title">Signals</title>
112
"<link linkend="GtkList-select-child">select-child</link>" : Run First
113
"<link linkend="GtkList-selection-changed">selection-changed</link>" : Run First
114
"<link linkend="GtkList-unselect-child">unselect-child</link>" : Run First
119
<refsect1 role="desc">
120
<title role="desc.title">Description</title>
122
The <link linkend="GtkList"><type>GtkList</type></link> widget is a container whose children are displayed
123
vertically in order, and can be selected.
125
The list has many selection modes, which are programmer selective and
126
depend on how many elements are able to be selected at the same time.
129
GtkList has been deprecated since GTK+ 2.0 and should not be used
130
in newly written code. Use <link linkend="GtkTreeView"><type>GtkTreeView</type></link> instead.
134
<refsect1 role="details">
135
<title role="details.title">Details</title>
137
<title><anchor id="GtkList-struct" role="struct"/>GtkList</title>
138
<indexterm role="deprecated"><primary>GtkList</primary></indexterm><programlisting>typedef struct _GtkList GtkList;</programlisting>
139
<warning><para><literal>GtkList</literal> is deprecated and should not be used in newly-written code.</para></warning>
144
<title><anchor id="gtk-list-new" role="function" condition="deprecated:"/>gtk_list_new ()</title>
145
<indexterm role="deprecated"><primary>gtk_list_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gtk_list_new (void);</programlisting>
146
<warning><para><literal>gtk_list_new</literal> is deprecated and should not be used in newly-written code.</para></warning>
148
Creates a new <link linkend="GtkList"><type>GtkList</type></link>.
149
</para><variablelist role="params">
150
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>the newly-created <link linkend="GtkList"><type>GtkList</type></link>
153
</simpara></listitem></varlistentry>
154
</variablelist></refsect2>
156
<title><anchor id="gtk-list-insert-items" role="function" condition="deprecated:"/>gtk_list_insert_items ()</title>
157
<indexterm role="deprecated"><primary>gtk_list_insert_items</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_insert_items (<link linkend="GtkList">GtkList</link> *list,
158
<link linkend="GList">GList</link> *items,
159
<link linkend="gint">gint</link> position);</programlisting>
160
<warning><para><literal>gtk_list_insert_items</literal> is deprecated and should not be used in newly-written code.</para></warning>
162
Inserts <parameter>items</parameter> into the <parameter>list</parameter> at the position <parameter>position</parameter>. The <link linkend="GList"><type>GList</type></link> items
163
must not be freed after.
164
</para><variablelist role="params">
165
<varlistentry><term><parameter>list</parameter> :</term>
166
<listitem><simpara>the list widget.
167
</simpara></listitem></varlistentry>
168
<varlistentry><term><parameter>items</parameter> :</term>
169
<listitem><simpara>the items.
170
</simpara></listitem></varlistentry>
171
<varlistentry><term><parameter>position</parameter> :</term>
172
<listitem><simpara>the position to insert <parameter>items</parameter>, starting at 0.
175
</simpara></listitem></varlistentry>
176
</variablelist></refsect2>
178
<title><anchor id="gtk-list-append-items" role="function" condition="deprecated:"/>gtk_list_append_items ()</title>
179
<indexterm role="deprecated"><primary>gtk_list_append_items</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_append_items (<link linkend="GtkList">GtkList</link> *list,
180
<link linkend="GList">GList</link> *items);</programlisting>
181
<warning><para><literal>gtk_list_append_items</literal> is deprecated and should not be used in newly-written code.</para></warning>
183
Adds <parameter>items</parameter> to the end of the <parameter>list</parameter>.
184
</para><variablelist role="params">
185
<varlistentry><term><parameter>list</parameter> :</term>
186
<listitem><simpara>the list widget.
187
</simpara></listitem></varlistentry>
188
<varlistentry><term><parameter>items</parameter> :</term>
189
<listitem><simpara>the items.
192
</simpara></listitem></varlistentry>
193
</variablelist></refsect2>
195
<title><anchor id="gtk-list-prepend-items" role="function" condition="deprecated:"/>gtk_list_prepend_items ()</title>
196
<indexterm role="deprecated"><primary>gtk_list_prepend_items</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_prepend_items (<link linkend="GtkList">GtkList</link> *list,
197
<link linkend="GList">GList</link> *items);</programlisting>
198
<warning><para><literal>gtk_list_prepend_items</literal> is deprecated and should not be used in newly-written code.</para></warning>
200
Inserts <parameter>items</parameter> at the beginning of the <parameter>list</parameter>.
201
</para><variablelist role="params">
202
<varlistentry><term><parameter>list</parameter> :</term>
203
<listitem><simpara>the list widget.
204
</simpara></listitem></varlistentry>
205
<varlistentry><term><parameter>items</parameter> :</term>
206
<listitem><simpara>the items.
209
</simpara></listitem></varlistentry>
210
</variablelist></refsect2>
212
<title><anchor id="gtk-list-remove-items" role="function" condition="deprecated:"/>gtk_list_remove_items ()</title>
213
<indexterm role="deprecated"><primary>gtk_list_remove_items</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_remove_items (<link linkend="GtkList">GtkList</link> *list,
214
<link linkend="GList">GList</link> *items);</programlisting>
215
<warning><para><literal>gtk_list_remove_items</literal> is deprecated and should not be used in newly-written code.</para></warning>
217
Removes the <parameter>items</parameter> from the <parameter>list</parameter>.
218
</para><variablelist role="params">
219
<varlistentry><term><parameter>list</parameter> :</term>
220
<listitem><simpara>the list widget.
221
</simpara></listitem></varlistentry>
222
<varlistentry><term><parameter>items</parameter> :</term>
223
<listitem><simpara>the items to remove.
226
</simpara></listitem></varlistentry>
227
</variablelist></refsect2>
229
<title><anchor id="gtk-list-remove-items-no-unref" role="function" condition="deprecated:"/>gtk_list_remove_items_no_unref ()</title>
230
<indexterm role="deprecated"><primary>gtk_list_remove_items_no_unref</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_remove_items_no_unref (<link linkend="GtkList">GtkList</link> *list,
231
<link linkend="GList">GList</link> *items);</programlisting>
232
<warning><para><literal>gtk_list_remove_items_no_unref</literal> is deprecated and should not be used in newly-written code.</para></warning>
234
Removes the <parameter>items</parameter> from the <parameter>list</parameter>, without unreferencing them. It
235
may be useful if you want to move the items from one list to another.
236
</para><variablelist role="params">
237
<varlistentry><term><parameter>list</parameter> :</term>
238
<listitem><simpara>the list widget.
239
</simpara></listitem></varlistentry>
240
<varlistentry><term><parameter>items</parameter> :</term>
241
<listitem><simpara>the items.
244
</simpara></listitem></varlistentry>
245
</variablelist></refsect2>
247
<title><anchor id="gtk-list-clear-items" role="function" condition="deprecated:"/>gtk_list_clear_items ()</title>
248
<indexterm role="deprecated"><primary>gtk_list_clear_items</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_clear_items (<link linkend="GtkList">GtkList</link> *list,
249
<link linkend="gint">gint</link> start,
250
<link linkend="gint">gint</link> end);</programlisting>
251
<warning><para><literal>gtk_list_clear_items</literal> is deprecated and should not be used in newly-written code.</para></warning>
253
Removes the items between index <parameter>start</parameter> (included) and <parameter>end</parameter> (excluded)
254
from the <parameter>list</parameter>. If <parameter>end</parameter> is negative, or greater than the number of
255
children of <parameter>list</parameter>, it's assumed to be exactly the number of
256
elements. If <parameter>start</parameter> is greater than or equal to <parameter>end</parameter>, nothing is
258
</para><variablelist role="params">
259
<varlistentry><term><parameter>list</parameter> :</term>
260
<listitem><simpara>the list widget.
261
</simpara></listitem></varlistentry>
262
<varlistentry><term><parameter>start</parameter> :</term>
263
<listitem><simpara>the index of the first item to remove.
264
</simpara></listitem></varlistentry>
265
<varlistentry><term><parameter>end</parameter> :</term>
266
<listitem><simpara>the index of the lest item to remove plus one.
269
</simpara></listitem></varlistentry>
270
</variablelist></refsect2>
272
<title><anchor id="gtk-list-select-item" role="function" condition="deprecated:"/>gtk_list_select_item ()</title>
273
<indexterm role="deprecated"><primary>gtk_list_select_item</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_select_item (<link linkend="GtkList">GtkList</link> *list,
274
<link linkend="gint">gint</link> item);</programlisting>
275
<warning><para><literal>gtk_list_select_item</literal> is deprecated and should not be used in newly-written code.</para></warning>
277
Selects the child number <parameter>item</parameter> of the <parameter>list</parameter>. Nothing happens if <parameter>item</parameter>
278
is out of bounds. The signal GtkList::select-child will be emitted.
279
</para><variablelist role="params">
280
<varlistentry><term><parameter>list</parameter> :</term>
281
<listitem><simpara>the list widget.
282
</simpara></listitem></varlistentry>
283
<varlistentry><term><parameter>item</parameter> :</term>
284
<listitem><simpara>the index of the child to select.
287
</simpara></listitem></varlistentry>
288
</variablelist></refsect2>
290
<title><anchor id="gtk-list-unselect-item" role="function" condition="deprecated:"/>gtk_list_unselect_item ()</title>
291
<indexterm role="deprecated"><primary>gtk_list_unselect_item</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_unselect_item (<link linkend="GtkList">GtkList</link> *list,
292
<link linkend="gint">gint</link> item);</programlisting>
293
<warning><para><literal>gtk_list_unselect_item</literal> is deprecated and should not be used in newly-written code.</para></warning>
295
Unselects the child number <parameter>item</parameter> of the <parameter>list</parameter>. Nothing happens if
296
<parameter>item</parameter> is out of bounds. The signal GtkList::unselect-child will be
298
</para><variablelist role="params">
299
<varlistentry><term><parameter>list</parameter> :</term>
300
<listitem><simpara>the list widget.
301
</simpara></listitem></varlistentry>
302
<varlistentry><term><parameter>item</parameter> :</term>
303
<listitem><simpara>the index of the child to unselect.
306
</simpara></listitem></varlistentry>
307
</variablelist></refsect2>
309
<title><anchor id="gtk-list-select-child" role="function" condition="deprecated:"/>gtk_list_select_child ()</title>
310
<indexterm role="deprecated"><primary>gtk_list_select_child</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_select_child (<link linkend="GtkList">GtkList</link> *list,
311
<link linkend="GtkWidget">GtkWidget</link> *child);</programlisting>
312
<warning><para><literal>gtk_list_select_child</literal> is deprecated and should not be used in newly-written code.</para></warning>
314
Selects the given <parameter>child</parameter>. The signal GtkList::select-child will be
316
</para><variablelist role="params">
317
<varlistentry><term><parameter>list</parameter> :</term>
318
<listitem><simpara>the list widget
319
</simpara></listitem></varlistentry>
320
<varlistentry><term><parameter>child</parameter> :</term>
321
<listitem><simpara>the child to select.
324
</simpara></listitem></varlistentry>
325
</variablelist></refsect2>
327
<title><anchor id="gtk-list-unselect-child" role="function" condition="deprecated:"/>gtk_list_unselect_child ()</title>
328
<indexterm role="deprecated"><primary>gtk_list_unselect_child</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_unselect_child (<link linkend="GtkList">GtkList</link> *list,
329
<link linkend="GtkWidget">GtkWidget</link> *child);</programlisting>
330
<warning><para><literal>gtk_list_unselect_child</literal> is deprecated and should not be used in newly-written code.</para></warning>
332
Unselects the given <parameter>child</parameter>. The signal GtkList::unselect-child will be
334
</para><variablelist role="params">
335
<varlistentry><term><parameter>list</parameter> :</term>
336
<listitem><simpara>the list widget.
337
</simpara></listitem></varlistentry>
338
<varlistentry><term><parameter>child</parameter> :</term>
339
<listitem><simpara>the child to unselect.
342
</simpara></listitem></varlistentry>
343
</variablelist></refsect2>
345
<title><anchor id="gtk-list-child-position" role="function" condition="deprecated:"/>gtk_list_child_position ()</title>
346
<indexterm role="deprecated"><primary>gtk_list_child_position</primary></indexterm><programlisting><link linkend="gint">gint</link> gtk_list_child_position (<link linkend="GtkList">GtkList</link> *list,
347
<link linkend="GtkWidget">GtkWidget</link> *child);</programlisting>
348
<warning><para><literal>gtk_list_child_position</literal> is deprecated and should not be used in newly-written code.</para></warning>
350
Searches the children of <parameter>list</parameter> for the index of <parameter>child</parameter>.
351
</para><variablelist role="params">
352
<varlistentry><term><parameter>list</parameter> :</term>
353
<listitem><simpara>the list widget.
354
</simpara></listitem></varlistentry>
355
<varlistentry><term><parameter>child</parameter> :</term>
356
<listitem><simpara>the child to look for.
357
</simpara></listitem></varlistentry>
358
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>the index of the child, -1 if not found.
361
</simpara></listitem></varlistentry>
362
</variablelist></refsect2>
364
<title><anchor id="gtk-list-set-selection-mode" role="function" condition="deprecated:"/>gtk_list_set_selection_mode ()</title>
365
<indexterm role="deprecated"><primary>gtk_list_set_selection_mode</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_set_selection_mode (<link linkend="GtkList">GtkList</link> *list,
366
<link linkend="GtkSelectionMode">GtkSelectionMode</link> mode);</programlisting>
367
<warning><para><literal>gtk_list_set_selection_mode</literal> is deprecated and should not be used in newly-written code.</para></warning>
369
Set the list selection mode. The selection mode can be any value in
370
<link linkend="GtkSelectionMode--"><type>GtkSelectionMode:</type></link>
373
<term><link linkend="GTK-SELECTION-SINGLE:CAPS"><type>GTK_SELECTION_SINGLE</type></link></term>
375
Zero or one element may be selected.
380
<term><link linkend="GTK-SELECTION-BROWSE:CAPS"><type>GTK_SELECTION_BROWSE</type></link></term>
382
Exactly one element is always selected (this can be false after you have
383
changed the selection mode).
388
<term><link linkend="GTK-SELECTION-MULTIPLE:CAPS"><type>GTK_SELECTION_MULTIPLE</type></link></term>
390
Any number of elements may be selected. Clicks toggle the state of an
396
<term><link linkend="GTK-SELECTION-EXTENDED:CAPS"><type>GTK_SELECTION_EXTENDED</type></link></term>
398
Any number of elements may be selected. Click-drag selects a range of
399
elements; the Ctrl key may be used to enlarge the selection, and
400
Shift key to select between the focus and the child pointed to.
404
</para><variablelist role="params">
405
<varlistentry><term><parameter>list</parameter> :</term>
406
<listitem><simpara>the list widget.
407
</simpara></listitem></varlistentry>
408
<varlistentry><term><parameter>mode</parameter> :</term>
409
<listitem><simpara>the new selection mode.
412
</simpara></listitem></varlistentry>
413
</variablelist></refsect2>
415
<title><anchor id="gtk-list-extend-selection" role="function" condition="deprecated:"/>gtk_list_extend_selection ()</title>
416
<indexterm role="deprecated"><primary>gtk_list_extend_selection</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_extend_selection (<link linkend="GtkList">GtkList</link> *list,
417
<link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
418
<link linkend="gfloat">gfloat</link> position,
419
<link linkend="gboolean">gboolean</link> auto_start_selection);</programlisting>
420
<warning><para><literal>gtk_list_extend_selection</literal> is deprecated and should not be used in newly-written code.</para></warning>
422
Extends the selection by moving the anchor according to <parameter>scroll_type</parameter>. Only
423
in <link linkend="GTK-SELECTION-EXTENDED:CAPS"><type>GTK_SELECTION_EXTENDED</type></link>.
424
</para><variablelist role="params">
425
<varlistentry><term><parameter>list</parameter> :</term>
426
<listitem><simpara>the list widget.
427
</simpara></listitem></varlistentry>
428
<varlistentry><term><parameter>scroll_type</parameter> :</term>
429
<listitem><simpara>the direction and length.
430
</simpara></listitem></varlistentry>
431
<varlistentry><term><parameter>position</parameter> :</term>
432
<listitem><simpara>the position if <parameter>scroll_type</parameter> is <link linkend="GTK-SCROLL-JUMP:CAPS"><type>GTK_SCROLL_JUMP</type></link>.
433
</simpara></listitem></varlistentry>
434
<varlistentry><term><parameter>auto_start_selection</parameter> :</term>
435
<listitem><simpara>if <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, <link linkend="gtk-list-start-selection"><function>gtk_list_start_selection()</function></link> is automatically
436
carried out before extending the selection.
439
</simpara></listitem></varlistentry>
440
</variablelist></refsect2>
442
<title><anchor id="gtk-list-start-selection" role="function" condition="deprecated:"/>gtk_list_start_selection ()</title>
443
<indexterm role="deprecated"><primary>gtk_list_start_selection</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_start_selection (<link linkend="GtkList">GtkList</link> *list);</programlisting>
444
<warning><para><literal>gtk_list_start_selection</literal> is deprecated and should not be used in newly-written code.</para></warning>
446
Starts a selection (or part of selection) at the focused child. Only in
447
<link linkend="GTK-SELECTION-EXTENDED:CAPS"><type>GTK_SELECTION_EXTENDED</type></link> mode.
448
</para><variablelist role="params">
449
<varlistentry><term><parameter>list</parameter> :</term>
450
<listitem><simpara>the list widget.
453
</simpara></listitem></varlistentry>
454
</variablelist></refsect2>
456
<title><anchor id="gtk-list-end-selection" role="function" condition="deprecated:"/>gtk_list_end_selection ()</title>
457
<indexterm role="deprecated"><primary>gtk_list_end_selection</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_end_selection (<link linkend="GtkList">GtkList</link> *list);</programlisting>
458
<warning><para><literal>gtk_list_end_selection</literal> is deprecated and should not be used in newly-written code.</para></warning>
460
Ends the selection. Used with <link linkend="gtk-list-extend-selection"><function>gtk_list_extend_selection()</function></link> and
461
<link linkend="gtk-list-start-selection"><function>gtk_list_start_selection()</function></link>. Only in <link linkend="GTK-SELECTION-EXTENDED:CAPS"><type>GTK_SELECTION_EXTENDED</type></link> mode.
462
</para><variablelist role="params">
463
<varlistentry><term><parameter>list</parameter> :</term>
464
<listitem><simpara>the list widget.
467
</simpara></listitem></varlistentry>
468
</variablelist></refsect2>
470
<title><anchor id="gtk-list-select-all" role="function" condition="deprecated:"/>gtk_list_select_all ()</title>
471
<indexterm role="deprecated"><primary>gtk_list_select_all</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_select_all (<link linkend="GtkList">GtkList</link> *list);</programlisting>
472
<warning><para><literal>gtk_list_select_all</literal> is deprecated and should not be used in newly-written code.</para></warning>
474
Selects all children of <parameter>list</parameter>. A signal will be emitted for each
475
newly selected child.
476
</para><variablelist role="params">
477
<varlistentry><term><parameter>list</parameter> :</term>
478
<listitem><simpara>the list widget.
481
</simpara></listitem></varlistentry>
482
</variablelist></refsect2>
484
<title><anchor id="gtk-list-unselect-all" role="function" condition="deprecated:"/>gtk_list_unselect_all ()</title>
485
<indexterm role="deprecated"><primary>gtk_list_unselect_all</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_unselect_all (<link linkend="GtkList">GtkList</link> *list);</programlisting>
486
<warning><para><literal>gtk_list_unselect_all</literal> is deprecated and should not be used in newly-written code.</para></warning>
488
Unselects all children of <parameter>list</parameter>. A signal will be emitted for each
489
newly unselected child.
490
</para><variablelist role="params">
491
<varlistentry><term><parameter>list</parameter> :</term>
492
<listitem><simpara>the list widget.
495
</simpara></listitem></varlistentry>
496
</variablelist></refsect2>
498
<title><anchor id="gtk-list-scroll-horizontal" role="function" condition="deprecated:"/>gtk_list_scroll_horizontal ()</title>
499
<indexterm role="deprecated"><primary>gtk_list_scroll_horizontal</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_scroll_horizontal (<link linkend="GtkList">GtkList</link> *list,
500
<link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
501
<link linkend="gfloat">gfloat</link> position);</programlisting>
502
<warning><para><literal>gtk_list_scroll_horizontal</literal> is deprecated and should not be used in newly-written code.</para></warning>
504
Scrolls <parameter>list</parameter> horizontaly. This supposes that the list is packed into a
505
scrolled window or something similar, and adjustments are well
506
set. Step and page increment are those from the horizontal adjustment
507
of <parameter>list</parameter>. Backward means to the left, and forward to the
508
right. Out of bounds values are truncated.
509
<parameter>scroll_type</parameter> may be any valid <link linkend="GtkScrollType"><type>GtkScrollType</type></link>. If <parameter>scroll_type</parameter> is
510
<link linkend="GTK-SCROLL-NONE:CAPS"><type>GTK_SCROLL_NONE</type></link>, nothing is done. If it's <link linkend="GTK-SCROLL-JUMP:CAPS"><type>GTK_SCROLL_JUMP</type></link>, the list
511
scrolls to the ratio <parameter>position</parameter>: 0 is full left, 1 is full right.
512
</para><variablelist role="params">
513
<varlistentry><term><parameter>list</parameter> :</term>
514
<listitem><simpara>the list widget.
515
</simpara></listitem></varlistentry>
516
<varlistentry><term><parameter>scroll_type</parameter> :</term>
517
<listitem><simpara>the scrolling type.
518
</simpara></listitem></varlistentry>
519
<varlistentry><term><parameter>position</parameter> :</term>
520
<listitem><simpara>the position if <parameter>scroll_type</parameter> is <link linkend="GTK-SCROLL-JUMP:CAPS"><type>GTK_SCROLL_JUMP</type></link>
523
</simpara></listitem></varlistentry>
524
</variablelist></refsect2>
526
<title><anchor id="gtk-list-scroll-vertical" role="function" condition="deprecated:"/>gtk_list_scroll_vertical ()</title>
527
<indexterm role="deprecated"><primary>gtk_list_scroll_vertical</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_scroll_vertical (<link linkend="GtkList">GtkList</link> *list,
528
<link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
529
<link linkend="gfloat">gfloat</link> position);</programlisting>
530
<warning><para><literal>gtk_list_scroll_vertical</literal> is deprecated and should not be used in newly-written code.</para></warning>
532
Scrolls <parameter>list</parameter> vertically. This supposes that the list is packed into a
533
scrolled window or something similar, and adjustments are well
534
set. Step and page increment are those from the vertical adjustment
535
of <parameter>list</parameter>. Backward means up, and forward down. Out of bounds values are
537
<parameter>scroll_type</parameter> may be any valid <link linkend="GtkScrollType"><type>GtkScrollType</type></link>. If <parameter>scroll_type</parameter> is
538
<link linkend="GTK-SCROLL-NONE:CAPS"><type>GTK_SCROLL_NONE</type></link>, nothing is done. If it's <link linkend="GTK-SCROLL-JUMP:CAPS"><type>GTK_SCROLL_JUMP</type></link>, the list
539
scrolls to the ratio <parameter>position</parameter>: 0 is top, 1 is bottom.
540
</para><variablelist role="params">
541
<varlistentry><term><parameter>list</parameter> :</term>
542
<listitem><simpara>the list widget.
543
</simpara></listitem></varlistentry>
544
<varlistentry><term><parameter>scroll_type</parameter> :</term>
545
<listitem><simpara>the scrolling type.
546
</simpara></listitem></varlistentry>
547
<varlistentry><term><parameter>position</parameter> :</term>
548
<listitem><simpara>the position if <parameter>scroll_type</parameter> is <link linkend="GTK-SCROLL-JUMP:CAPS"><type>GTK_SCROLL_JUMP</type></link>
551
</simpara></listitem></varlistentry>
552
</variablelist></refsect2>
554
<title><anchor id="gtk-list-toggle-add-mode" role="function" condition="deprecated:"/>gtk_list_toggle_add_mode ()</title>
555
<indexterm role="deprecated"><primary>gtk_list_toggle_add_mode</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_toggle_add_mode (<link linkend="GtkList">GtkList</link> *list);</programlisting>
556
<warning><para><literal>gtk_list_toggle_add_mode</literal> is deprecated and should not be used in newly-written code.</para></warning>
558
Toggles between adding to the selection and beginning a new selection. Only
559
in <link linkend="GTK-SELECTION-EXTENDED:CAPS"><type>GTK_SELECTION_EXTENDED</type></link>. Useful with <link linkend="gtk-list-extend-selection"><function>gtk_list_extend_selection()</function></link>.
560
</para><variablelist role="params">
561
<varlistentry><term><parameter>list</parameter> :</term>
562
<listitem><simpara>the list widget.
565
</simpara></listitem></varlistentry>
566
</variablelist></refsect2>
568
<title><anchor id="gtk-list-toggle-focus-row" role="function" condition="deprecated:"/>gtk_list_toggle_focus_row ()</title>
569
<indexterm role="deprecated"><primary>gtk_list_toggle_focus_row</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_toggle_focus_row (<link linkend="GtkList">GtkList</link> *list);</programlisting>
570
<warning><para><literal>gtk_list_toggle_focus_row</literal> is deprecated and should not be used in newly-written code.</para></warning>
572
Toggles the focus row. If the focus row is selected, it's
573
unselected. If the focus row is unselected, it's selected. If the
574
selection mode of <parameter>list</parameter> is <link linkend="GTK-SELECTION-BROWSE:CAPS"><type>GTK_SELECTION_BROWSE</type></link>, this has no effect,
575
as the selection is always at the focus row.
576
</para><variablelist role="params">
577
<varlistentry><term><parameter>list</parameter> :</term>
578
<listitem><simpara>the list widget.
581
</simpara></listitem></varlistentry>
582
</variablelist></refsect2>
584
<title><anchor id="gtk-list-toggle-row" role="function" condition="deprecated:"/>gtk_list_toggle_row ()</title>
585
<indexterm role="deprecated"><primary>gtk_list_toggle_row</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_toggle_row (<link linkend="GtkList">GtkList</link> *list,
586
<link linkend="GtkWidget">GtkWidget</link> *item);</programlisting>
587
<warning><para><literal>gtk_list_toggle_row</literal> is deprecated and should not be used in newly-written code.</para></warning>
589
Toggles the child <parameter>item</parameter> of list. If the selection mode of <parameter>list</parameter> is
590
<link linkend="GTK-SELECTION-BROWSE:CAPS"><type>GTK_SELECTION_BROWSE</type></link>, the item is selected, and the others are
592
</para><variablelist role="params">
593
<varlistentry><term><parameter>list</parameter> :</term>
594
<listitem><simpara>the list widget.
595
</simpara></listitem></varlistentry>
596
<varlistentry><term><parameter>item</parameter> :</term>
597
<listitem><simpara>the child to toggle.
600
</simpara></listitem></varlistentry>
601
</variablelist></refsect2>
603
<title><anchor id="gtk-list-undo-selection" role="function" condition="deprecated:"/>gtk_list_undo_selection ()</title>
604
<indexterm role="deprecated"><primary>gtk_list_undo_selection</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_undo_selection (<link linkend="GtkList">GtkList</link> *list);</programlisting>
605
<warning><para><literal>gtk_list_undo_selection</literal> is deprecated and should not be used in newly-written code.</para></warning>
607
Restores the selection in the last state, only if selection mode is
608
<link linkend="GTK-SELECTION-EXTENDED:CAPS"><type>GTK_SELECTION_EXTENDED</type></link>. If this function is called twice, the selection is
609
cleared. This function sometimes gives stranges "last states".
610
</para><variablelist role="params">
611
<varlistentry><term><parameter>list</parameter> :</term>
612
<listitem><simpara>the list widget.
615
</simpara></listitem></varlistentry>
616
</variablelist></refsect2>
618
<title><anchor id="gtk-list-end-drag-selection" role="function" condition="deprecated:"/>gtk_list_end_drag_selection ()</title>
619
<indexterm role="deprecated"><primary>gtk_list_end_drag_selection</primary></indexterm><programlisting><link linkend="void">void</link> gtk_list_end_drag_selection (<link linkend="GtkList">GtkList</link> *list);</programlisting>
620
<warning><para><literal>gtk_list_end_drag_selection</literal> is deprecated and should not be used in newly-written code.</para></warning>
622
Stops the drag selection mode and ungrabs the pointer. This has no
623
effect if a drag selection is not active.
624
</para><variablelist role="params">
625
<varlistentry><term><parameter>list</parameter> :</term>
626
<listitem><simpara>the list widget.
629
</simpara></listitem></varlistentry>
630
</variablelist></refsect2>
633
<refsect1 role="property_details">
634
<title role="property_details.title">Property Details</title>
635
<refsect2><title><anchor id="GtkList--selection-mode"/>The "<literal>selection-mode</literal>" property</title>
636
<indexterm><primary>GtkList:selection-mode</primary></indexterm><programlisting> "selection-mode" <link linkend="GtkSelectionMode">GtkSelectionMode</link> : Read / Write</programlisting>
637
<para></para><para>Default value: GTK_SELECTION_NONE</para>
642
<refsect1 role="signals">
643
<title role="signals.title">Signal Details</title>
644
<refsect2><title><anchor id="GtkList-select-child"/>The "select-child" signal</title>
645
<indexterm><primary>GtkList::select-child</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="GtkList">GtkList</link> *list,
646
<link linkend="GtkWidget">GtkWidget</link> *widget,
647
<link linkend="gpointer">gpointer</link> user_data) : Run First</programlisting>
649
The child <parameter>widget</parameter> has just been selected.
650
</para><variablelist role="params">
651
<varlistentry><term><parameter>list</parameter> :</term>
652
<listitem><simpara>the object which received the signal.
653
</simpara></listitem></varlistentry>
654
<varlistentry><term><parameter>widget</parameter> :</term>
655
<listitem><simpara>the newly selected child.
657
</simpara></listitem></varlistentry>
658
<varlistentry><term><parameter>user_data</parameter> :</term>
659
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
660
</variablelist></refsect2><refsect2><title><anchor id="GtkList-selection-changed"/>The "selection-changed" signal</title>
661
<indexterm><primary>GtkList::selection-changed</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="GtkList">GtkList</link> *list,
662
<link linkend="gpointer">gpointer</link> user_data) : Run First</programlisting>
664
The selection of the widget has just changed.
665
</para><variablelist role="params">
666
<varlistentry><term><parameter>list</parameter> :</term>
667
<listitem><simpara>the object which received the signal.
669
</simpara></listitem></varlistentry>
670
<varlistentry><term><parameter>user_data</parameter> :</term>
671
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
672
</variablelist></refsect2><refsect2><title><anchor id="GtkList-unselect-child"/>The "unselect-child" signal</title>
673
<indexterm><primary>GtkList::unselect-child</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="GtkList">GtkList</link> *list,
674
<link linkend="GtkWidget">GtkWidget</link> *widget,
675
<link linkend="gpointer">gpointer</link> user_data) : Run First</programlisting>
677
The child <parameter>widget</parameter> has just been unselected.
678
</para><variablelist role="params">
679
<varlistentry><term><parameter>list</parameter> :</term>
680
<listitem><simpara>the object which received the signal.
681
</simpara></listitem></varlistentry>
682
<varlistentry><term><parameter>widget</parameter> :</term>
683
<listitem><simpara>the newly unselected child.
685
</simpara></listitem></varlistentry>
686
<varlistentry><term><parameter>user_data</parameter> :</term>
687
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
688
</variablelist></refsect2>
693
<title>See Also</title>
697
<term><link linkend="GtkContainer"><type>GtkContainer</type></link></term>
698
<listitem><para>For functions that apply to every <link linkend="GtkContainer"><type>GtkContainer</type></link>
699
(like <link linkend="GtkList"><type>GtkList</type></link>).</para></listitem>
702
<term><link linkend="GtkListitem"><type>GtkListitem</type></link></term>
703
<listitem><para>Children of a <link linkend="GtkList"><type>GtkList</type></link> widget must be of this
704
type.</para></listitem>