<refentry id="GtkList">
<refmeta>
<refentrytitle>GtkList</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkList</refname><refpurpose>Widget for packing a list of selectable items.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gtk/gtk.h&gt;


struct      <link linkend="GtkList-struct">GtkList</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-list-new">gtk_list_new</link>                    (void);
void        <link linkend="gtk-list-insert-items">gtk_list_insert_items</link>           (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items,
                                             <link linkend="gint">gint</link> position);
void        <link linkend="gtk-list-append-items">gtk_list_append_items</link>           (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items);
void        <link linkend="gtk-list-prepend-items">gtk_list_prepend_items</link>          (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items);
void        <link linkend="gtk-list-remove-items">gtk_list_remove_items</link>           (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items);
void        <link linkend="gtk-list-remove-items-no-unref">gtk_list_remove_items_no_unref</link>  (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items);
void        <link linkend="gtk-list-clear-items">gtk_list_clear_items</link>            (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="gint">gint</link> start,
                                             <link linkend="gint">gint</link> end);
void        <link linkend="gtk-list-select-item">gtk_list_select_item</link>            (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="gint">gint</link> item);
void        <link linkend="gtk-list-unselect-item">gtk_list_unselect_item</link>          (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="gint">gint</link> item);
void        <link linkend="gtk-list-select-child">gtk_list_select_child</link>           (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkWidget">GtkWidget</link> *child);
void        <link linkend="gtk-list-unselect-child">gtk_list_unselect_child</link>         (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkWidget">GtkWidget</link> *child);
<link linkend="gint">gint</link>        <link linkend="gtk-list-child-position">gtk_list_child_position</link>         (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkWidget">GtkWidget</link> *child);
void        <link linkend="gtk-list-set-selection-mode">gtk_list_set_selection_mode</link>     (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkSelectionMode">GtkSelectionMode</link> mode);
void        <link linkend="gtk-list-extend-selection">gtk_list_extend_selection</link>       (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
                                             <link linkend="gfloat">gfloat</link> position,
                                             <link linkend="gboolean">gboolean</link> auto_start_selection);
void        <link linkend="gtk-list-start-selection">gtk_list_start_selection</link>        (<link linkend="GtkList">GtkList</link> *list);
void        <link linkend="gtk-list-end-selection">gtk_list_end_selection</link>          (<link linkend="GtkList">GtkList</link> *list);
void        <link linkend="gtk-list-select-all">gtk_list_select_all</link>             (<link linkend="GtkList">GtkList</link> *list);
void        <link linkend="gtk-list-unselect-all">gtk_list_unselect_all</link>           (<link linkend="GtkList">GtkList</link> *list);
void        <link linkend="gtk-list-scroll-horizontal">gtk_list_scroll_horizontal</link>      (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
                                             <link linkend="gfloat">gfloat</link> position);
void        <link linkend="gtk-list-scroll-vertical">gtk_list_scroll_vertical</link>        (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
                                             <link linkend="gfloat">gfloat</link> position);
void        <link linkend="gtk-list-toggle-add-mode">gtk_list_toggle_add_mode</link>        (<link linkend="GtkList">GtkList</link> *list);
void        <link linkend="gtk-list-toggle-focus-row">gtk_list_toggle_focus_row</link>       (<link linkend="GtkList">GtkList</link> *list);
void        <link linkend="gtk-list-toggle-row">gtk_list_toggle_row</link>             (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkWidget">GtkWidget</link> *item);
void        <link linkend="gtk-list-undo-selection">gtk_list_undo_selection</link>         (<link linkend="GtkList">GtkList</link> *list);
void        <link linkend="gtk-list-end-drag-selection">gtk_list_end_drag_selection</link>     (<link linkend="GtkList">GtkList</link> *list);


</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GtkObject">GtkObject</link>
         +----<link linkend="GtkWidget">GtkWidget</link>
               +----<link linkend="GtkContainer">GtkContainer</link>
                     +----GtkList
</synopsis>

</refsect1>

<refsect1>
<title>Properties</title>
<synopsis>

  &quot;<link linkend="GtkList--selection-mode">selection-mode</link>&quot;       <link linkend="GtkSelectionMode">GtkSelectionMode</link>     : Read / Write
</synopsis>
</refsect1>

<refsect1>
<title>Signal Prototypes</title>
<synopsis>

&quot;<link linkend="GtkList-select-child">select-child</link>&quot;
            void        user_function      (<link linkend="GtkList">GtkList</link> *list,
                                            <link linkend="GtkWidget">GtkWidget</link> *widget,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkList-selection-changed">selection-changed</link>&quot;
            void        user_function      (<link linkend="GtkList">GtkList</link> *list,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkList-unselect-child">unselect-child</link>&quot;
            void        user_function      (<link linkend="GtkList">GtkList</link> *list,
                                            <link linkend="GtkWidget">GtkWidget</link> *widget,
                                            <link linkend="gpointer">gpointer</link> user_data);
</synopsis>
</refsect1>


<refsect1>
<title>Description</title>
<para>
The <link linkend="GtkList">GtkList</link> widget is a container whose children are displayed
vertically in order, and can be selected.

The list has many selection modes, which are programmer selective and
depend on how many elements are able to be selected at the same time.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkList-struct">struct GtkList</title>
<programlisting>struct GtkList;</programlisting>
<warning>
<para>
<literal>GtkList</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gtk-list-new">gtk_list_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_list_new                    (void);</programlisting>
<warning>
<para>
<literal>gtk_list_new</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Creates a new <link linkend="GtkList">GtkList</link>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the newly-created <link linkend="GtkList">GtkList</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-insert-items">gtk_list_insert_items ()</title>
<programlisting>void        gtk_list_insert_items           (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items,
                                             <link linkend="gint">gint</link> position);</programlisting>
<warning>
<para>
<literal>gtk_list_insert_items</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Inserts <parameter>items</parameter> into the <parameter>list</parameter> at the position <parameter>position</parameter>. The <link linkend="GList">GList</link> items
must not be freed after.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>items</parameter>&nbsp;:</entry>
<entry>the items.
</entry></row>
<row><entry align="right"><parameter>position</parameter>&nbsp;:</entry>
<entry>the position to insert <parameter>items</parameter>, starting at 0.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-append-items">gtk_list_append_items ()</title>
<programlisting>void        gtk_list_append_items           (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items);</programlisting>
<warning>
<para>
<literal>gtk_list_append_items</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Adds <parameter>items</parameter> to the end of the <parameter>list</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>items</parameter>&nbsp;:</entry>
<entry>the items.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-prepend-items">gtk_list_prepend_items ()</title>
<programlisting>void        gtk_list_prepend_items          (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items);</programlisting>
<warning>
<para>
<literal>gtk_list_prepend_items</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Inserts <parameter>items</parameter> at the beginning of the <parameter>list</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>items</parameter>&nbsp;:</entry>
<entry>the items.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-remove-items">gtk_list_remove_items ()</title>
<programlisting>void        gtk_list_remove_items           (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items);</programlisting>
<warning>
<para>
<literal>gtk_list_remove_items</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Removes the <parameter>items</parameter> from the <parameter>list</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>items</parameter>&nbsp;:</entry>
<entry>the items to remove.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-remove-items-no-unref">gtk_list_remove_items_no_unref ()</title>
<programlisting>void        gtk_list_remove_items_no_unref  (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GList">GList</link> *items);</programlisting>
<warning>
<para>
<literal>gtk_list_remove_items_no_unref</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Removes the <parameter>items</parameter> from the <parameter>list</parameter>, without unreferencing them. It
may be useful if you want to move the items from one list to another.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>items</parameter>&nbsp;:</entry>
<entry>the items.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-clear-items">gtk_list_clear_items ()</title>
<programlisting>void        gtk_list_clear_items            (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="gint">gint</link> start,
                                             <link linkend="gint">gint</link> end);</programlisting>
<warning>
<para>
<literal>gtk_list_clear_items</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Removes the items between index <parameter>start</parameter> (included) and <parameter>end</parameter> (excluded)
from the <parameter>list</parameter>. If <parameter>end</parameter> is negative, or greater than the number of
children of <parameter>list</parameter>, it's assumed to be exactly the number of
elements. If <parameter>start</parameter> is greater than or equal to <parameter>end</parameter>, nothing is
done.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>start</parameter>&nbsp;:</entry>
<entry>the index of the first item to remove.
</entry></row>
<row><entry align="right"><parameter>end</parameter>&nbsp;:</entry>
<entry>the index of the lest item to remove plus one.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-select-item">gtk_list_select_item ()</title>
<programlisting>void        gtk_list_select_item            (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="gint">gint</link> item);</programlisting>
<warning>
<para>
<literal>gtk_list_select_item</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Selects the child number <parameter>item</parameter> of the <parameter>list</parameter>. Nothing happens if <parameter>item</parameter>
is out of bounds. The signal GtkList::select-child will be emitted.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>item</parameter>&nbsp;:</entry>
<entry>the index of the child to select.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-unselect-item">gtk_list_unselect_item ()</title>
<programlisting>void        gtk_list_unselect_item          (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="gint">gint</link> item);</programlisting>
<warning>
<para>
<literal>gtk_list_unselect_item</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Unselects the child number <parameter>item</parameter> of the <parameter>list</parameter>. Nothing happens if
<parameter>item</parameter> is out of bounds. The signal GtkList::unselect-child will be
emitted.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>item</parameter>&nbsp;:</entry>
<entry>the index of the child to unselect.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-select-child">gtk_list_select_child ()</title>
<programlisting>void        gtk_list_select_child           (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkWidget">GtkWidget</link> *child);</programlisting>
<warning>
<para>
<literal>gtk_list_select_child</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Selects the given <parameter>child</parameter>. The signal GtkList::select-child will be
emitted.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget
</entry></row>
<row><entry align="right"><parameter>child</parameter>&nbsp;:</entry>
<entry>the child to select.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-unselect-child">gtk_list_unselect_child ()</title>
<programlisting>void        gtk_list_unselect_child         (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkWidget">GtkWidget</link> *child);</programlisting>
<warning>
<para>
<literal>gtk_list_unselect_child</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Unselects the given <parameter>child</parameter>. The signal GtkList::unselect-child will be
emitted.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>child</parameter>&nbsp;:</entry>
<entry>the child to unselect.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-child-position">gtk_list_child_position ()</title>
<programlisting><link linkend="gint">gint</link>        gtk_list_child_position         (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkWidget">GtkWidget</link> *child);</programlisting>
<warning>
<para>
<literal>gtk_list_child_position</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Searches the children of <parameter>list</parameter> for the index of <parameter>child</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>child</parameter>&nbsp;:</entry>
<entry>the child to look for.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the index of the child, -1 if not found.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-set-selection-mode">gtk_list_set_selection_mode ()</title>
<programlisting>void        gtk_list_set_selection_mode     (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkSelectionMode">GtkSelectionMode</link> mode);</programlisting>
<warning>
<para>
<literal>gtk_list_set_selection_mode</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Set the list selection mode. The selection mode can be any value in
<link linkend="GtkSelectionMode">GtkSelectionMode</link>:
<variablelist>
<varlistentry>
<term><link linkend="GTK-SELECTION-SINGLE-CAPS">GTK_SELECTION_SINGLE</link></term>
<listitem><para>
Zero or one element may be selected.
</para></listitem>
</varlistentry>

<varlistentry>
<term><link linkend="GTK-SELECTION-BROWSE-CAPS">GTK_SELECTION_BROWSE</link></term>
<listitem><para>
Exactly one element is always selected (this can be false after you have
changed the selection mode).
</para></listitem>
</varlistentry>

<varlistentry>
<term><link linkend="GTK-SELECTION-MULTIPLE-CAPS">GTK_SELECTION_MULTIPLE</link></term>
<listitem><para>
Any number of elements may be selected. Clicks toggle the state of an
item.
</para></listitem>
</varlistentry>

<varlistentry>
<term><link linkend="GTK-SELECTION-EXTENDED-CAPS">GTK_SELECTION_EXTENDED</link></term>
<listitem><para>
Any number of elements may be selected. Click-drag selects a range of
elements; the Ctrl key may be used to enlarge the selection, and
Shift key to select between the focus and the child pointed to.
</para></listitem>
</varlistentry>
</variablelist>
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>mode</parameter>&nbsp;:</entry>
<entry>the new selection mode.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-extend-selection">gtk_list_extend_selection ()</title>
<programlisting>void        gtk_list_extend_selection       (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
                                             <link linkend="gfloat">gfloat</link> position,
                                             <link linkend="gboolean">gboolean</link> auto_start_selection);</programlisting>
<warning>
<para>
<literal>gtk_list_extend_selection</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Extends the selection by moving the anchor according to <parameter>scroll_type</parameter>. Only
in <link linkend="GTK-SELECTION-EXTENDED-CAPS">GTK_SELECTION_EXTENDED</link>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>scroll_type</parameter>&nbsp;:</entry>
<entry>the direction and length.
</entry></row>
<row><entry align="right"><parameter>position</parameter>&nbsp;:</entry>
<entry>the position if <parameter>scroll_type</parameter> is <link linkend="GTK-SCROLL-JUMP-CAPS">GTK_SCROLL_JUMP</link>.
</entry></row>
<row><entry align="right"><parameter>auto_start_selection</parameter>&nbsp;:</entry>
<entry>if <literal>TRUE</literal>, <link linkend="gtk-list-start-selection">gtk_list_start_selection</link>() is automatically
carried out before extending the selection.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-start-selection">gtk_list_start_selection ()</title>
<programlisting>void        gtk_list_start_selection        (<link linkend="GtkList">GtkList</link> *list);</programlisting>
<warning>
<para>
<literal>gtk_list_start_selection</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Starts a selection (or part of selection) at the focused child. Only in
<link linkend="GTK-SELECTION-EXTENDED-CAPS">GTK_SELECTION_EXTENDED</link> mode.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-end-selection">gtk_list_end_selection ()</title>
<programlisting>void        gtk_list_end_selection          (<link linkend="GtkList">GtkList</link> *list);</programlisting>
<warning>
<para>
<literal>gtk_list_end_selection</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Ends the selection. Used with <link linkend="gtk-list-extend-selection">gtk_list_extend_selection</link>() and
<link linkend="gtk-list-start-selection">gtk_list_start_selection</link>(). Only in <link linkend="GTK-SELECTION-EXTENDED-CAPS">GTK_SELECTION_EXTENDED</link> mode.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-select-all">gtk_list_select_all ()</title>
<programlisting>void        gtk_list_select_all             (<link linkend="GtkList">GtkList</link> *list);</programlisting>
<warning>
<para>
<literal>gtk_list_select_all</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Selects all children of <parameter>list</parameter>. A signal will be emitted for each
newly selected child.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-unselect-all">gtk_list_unselect_all ()</title>
<programlisting>void        gtk_list_unselect_all           (<link linkend="GtkList">GtkList</link> *list);</programlisting>
<warning>
<para>
<literal>gtk_list_unselect_all</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Unselects all children of <parameter>list</parameter>. A signal will be emitted for each
newly unselected child.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-scroll-horizontal">gtk_list_scroll_horizontal ()</title>
<programlisting>void        gtk_list_scroll_horizontal      (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
                                             <link linkend="gfloat">gfloat</link> position);</programlisting>
<warning>
<para>
<literal>gtk_list_scroll_horizontal</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Scrolls <parameter>list</parameter> horizontaly. This supposes that the list is packed into a
scrolled window or something similar, and adjustments are well
set. Step and page increment are those from the horizontal adjustment
of <parameter>list</parameter>. Backward means to the left, and forward to the
right. Out of bounds values are truncated.
<parameter>scroll_type</parameter> may be any valid <link linkend="GtkScrollType">GtkScrollType</link>. If <parameter>scroll_type</parameter> is
<link linkend="GTK-SCROLL-NONE-CAPS">GTK_SCROLL_NONE</link>, nothing is done. If it's <link linkend="GTK-SCROLL-JUMP-CAPS">GTK_SCROLL_JUMP</link>, the list
scrolls to the ratio <parameter>position</parameter>: 0 is full left, 1 is full right.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>scroll_type</parameter>&nbsp;:</entry>
<entry>the scrolling type.
</entry></row>
<row><entry align="right"><parameter>position</parameter>&nbsp;:</entry>
<entry>the position if <parameter>scroll_type</parameter> is <link linkend="GTK-SCROLL-JUMP-CAPS">GTK_SCROLL_JUMP</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-scroll-vertical">gtk_list_scroll_vertical ()</title>
<programlisting>void        gtk_list_scroll_vertical        (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
                                             <link linkend="gfloat">gfloat</link> position);</programlisting>
<warning>
<para>
<literal>gtk_list_scroll_vertical</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Scrolls <parameter>list</parameter> vertically. This supposes that the list is packed into a
scrolled window or something similar, and adjustments are well
set. Step and page increment are those from the vertical adjustment
of <parameter>list</parameter>. Backward means up, and forward down. Out of bounds values are
truncated.
<parameter>scroll_type</parameter> may be any valid <link linkend="GtkScrollType">GtkScrollType</link>. If <parameter>scroll_type</parameter> is
<link linkend="GTK-SCROLL-NONE-CAPS">GTK_SCROLL_NONE</link>, nothing is done. If it's <link linkend="GTK-SCROLL-JUMP-CAPS">GTK_SCROLL_JUMP</link>, the list
scrolls to the ratio <parameter>position</parameter>: 0 is top, 1 is bottom.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>scroll_type</parameter>&nbsp;:</entry>
<entry>the scrolling type.
</entry></row>
<row><entry align="right"><parameter>position</parameter>&nbsp;:</entry>
<entry>the position if <parameter>scroll_type</parameter> is <link linkend="GTK-SCROLL-JUMP-CAPS">GTK_SCROLL_JUMP</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-toggle-add-mode">gtk_list_toggle_add_mode ()</title>
<programlisting>void        gtk_list_toggle_add_mode        (<link linkend="GtkList">GtkList</link> *list);</programlisting>
<warning>
<para>
<literal>gtk_list_toggle_add_mode</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Toggles between adding to the selection and beginning a new selection. Only
in <link linkend="GTK-SELECTION-EXTENDED-CAPS">GTK_SELECTION_EXTENDED</link>. Useful with <link linkend="gtk-list-extend-selection">gtk_list_extend_selection</link>().
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-toggle-focus-row">gtk_list_toggle_focus_row ()</title>
<programlisting>void        gtk_list_toggle_focus_row       (<link linkend="GtkList">GtkList</link> *list);</programlisting>
<warning>
<para>
<literal>gtk_list_toggle_focus_row</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Toggles the focus row. If the focus row is selected, it's
unselected. If the focus row is unselected, it's selected. If the
selection mode of <parameter>list</parameter> is <link linkend="GTK-SELECTION-BROWSE-CAPS">GTK_SELECTION_BROWSE</link>, this has no effect,
as the selection is always at the focus row.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-toggle-row">gtk_list_toggle_row ()</title>
<programlisting>void        gtk_list_toggle_row             (<link linkend="GtkList">GtkList</link> *list,
                                             <link linkend="GtkWidget">GtkWidget</link> *item);</programlisting>
<warning>
<para>
<literal>gtk_list_toggle_row</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Toggles the child <parameter>item</parameter> of list. If the selection mode of <parameter>list</parameter> is
<link linkend="GTK-SELECTION-BROWSE-CAPS">GTK_SELECTION_BROWSE</link>, the item is selected, and the others are
unselected.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.
</entry></row>
<row><entry align="right"><parameter>item</parameter>&nbsp;:</entry>
<entry>the child to toggle.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-undo-selection">gtk_list_undo_selection ()</title>
<programlisting>void        gtk_list_undo_selection         (<link linkend="GtkList">GtkList</link> *list);</programlisting>
<warning>
<para>
<literal>gtk_list_undo_selection</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Restores the selection in the last state, only if selection mode is
<link linkend="GTK-SELECTION-EXTENDED-CAPS">GTK_SELECTION_EXTENDED</link>. If this function is called twice, the selection is
cleared. This function sometimes gives stranges "last states".
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-list-end-drag-selection">gtk_list_end_drag_selection ()</title>
<programlisting>void        gtk_list_end_drag_selection     (<link linkend="GtkList">GtkList</link> *list);</programlisting>
<warning>
<para>
<literal>gtk_list_end_drag_selection</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Stops the drag selection mode and ungrabs the pointer. This has no
effect if a drag selection is not active.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the list widget.


</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<variablelist>
<varlistentry><term><anchor id="GtkList--selection-mode">&quot;<literal>selection-mode</literal>&quot; (<link linkend="GtkSelectionMode">GtkSelectionMode</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>

</variablelist>
</refsect1>

<refsect1>
<title>Signals</title>
<refsect2><title><anchor id="GtkList-select-child">The &quot;select-child&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkList">GtkList</link> *list,
                                            <link linkend="GtkWidget">GtkWidget</link> *widget,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
The child <parameter>widget</parameter> has just been selected.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry>the newly selected child.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkList-selection-changed">The &quot;selection-changed&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkList">GtkList</link> *list,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
The selection of the widget has just changed.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkList-unselect-child">The &quot;unselect-child&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkList">GtkList</link> *list,
                                            <link linkend="GtkWidget">GtkWidget</link> *widget,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
The child <parameter>widget</parameter> has just been unselected.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>list</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry>the newly unselected child.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2>
</refsect1>


<refsect1>
<title>See Also</title>
<para>
<variablelist>
<varlistentry>
<term><link linkend="GtkContainer">GtkContainer</link></term>
<listitem><para>For functions that apply to every <link linkend="GtkContainer">GtkContainer</link>
(like <link linkend="GtkList">GtkList</link>).</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GtkListitem">GtkListitem</link></term>
<listitem><para>Children of a <link linkend="GtkList">GtkList</link> widget must be of this
type.</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

</refentry>
