<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkListView">
<refmeta>
<refentrytitle role="top_of_page" id="GtkListView.top_of_page">GtkListView</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkListView</refname>
<refpurpose>A widget for displaying lists</refpurpose>
</refnamediv>

<refsect1 id="GtkListView.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-list-view-new">gtk_list_view_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-list-view-set-factory">gtk_list_view_set_factory</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkListItemFactory"><returnvalue>GtkListItemFactory</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-list-view-get-factory">gtk_list_view_get_factory</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-list-view-set-model">gtk_list_view_set_model</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkSelectionModel"><returnvalue>GtkSelectionModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-list-view-get-model">gtk_list_view_get_model</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-list-view-set-show-separators">gtk_list_view_set_show_separators</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-list-view-get-show-separators">gtk_list_view_get_show_separators</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-list-view-set-single-click-activate">gtk_list_view_set_single_click_activate</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-list-view-get-single-click-activate">gtk_list_view_get_single_click_activate</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-list-view-set-enable-rubberband">gtk_list_view_set_enable_rubberband</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-list-view-get-enable-rubberband">gtk_list_view_get_enable_rubberband</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkListView.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkListView--enable-rubberband">enable-rubberband</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkListView--factory">factory</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkSelectionModel"><type>GtkSelectionModel</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkListView--model">model</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkListView--show-separators">show-separators</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkListView--single-click-activate">single-click-activate</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkListView.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkListView-activate">activate</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkListView.actions" role="actions">
<title role="actions.title">Actions</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="actions_none" colwidth="150px"/>
<colspec colname="actions_name" colwidth="300px"/>
<colspec colname="actions_param" colwidth="200px"/>
<tbody>
<row><entry></entry><entry role="action_name"><link linkend="GtkListView|list.activate-item">list.activate-item</link></entry><entry role="parameter_type">u</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkListView.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkListView-struct">GtkListView</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkListView.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkListBase">GtkListBase</link>
                <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkListView
</screen>
</refsect1>
<refsect1 id="GtkListView.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkListView implements
 <link linkend="GtkAccessible">GtkAccessible</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>,  <link linkend="GtkOrientable">GtkOrientable</link> and  <link linkend="GtkScrollable">GtkScrollable</link>.</para>

</refsect1>

<refsect1 id="GtkListView.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkListView.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkListView is a widget to present a view into a large dynamic list of items.</para>
<para>GtkListView uses its factory to generate one row widget for each visible item
and shows them in a linear display, either vertically or horizontally. The
<link linkend="GtkListView--show-separators"><type>“show-separators”</type></link> property offers a simple way to display separators
between the rows.</para>
<para>GtkListView allows the user to select items according to the selection
characteristics of the model. For models that allow multiple selected items,
it is possible to turn on _rubberband selection_, using
<link linkend="GtkListView--enable-rubberband"><type>“enable-rubberband”</type></link>.</para>
<para>If you need multiple columns with headers, see <link linkend="GtkColumnView"><type>GtkColumnView</type></link>.</para>
<para>To learn more about the list widget framework, see the <ulink url="#ListWidget">overview</ulink>.</para>
<para>An example of using GtkListView:</para>
<informalexample><programlisting role="example"><![CDATA[
static void
setup_listitem_cb (GtkListItemFactory *factory,
                   GtkListItem        *list_item)
{
  GtkWidget *image;

  image = gtk_image_new ();
  gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
  gtk_list_item_set_child (list_item, image);
}

static void
bind_listitem_cb (GtkListItemFactory *factory,
                  GtkListItem        *list_item)
{
  GtkWidget *image;
  GAppInfo *app_info;

  image = gtk_list_item_get_child (list_item);
  app_info = gtk_list_item_get_item (list_item);
  gtk_image_set_from_gicon (GTK_IMAGE (image), g_app_info_get_icon (app_info));
}

static void
activate_cb (GtkListView  *list,
             guint         position,
             gpointer      unused)
{
  GAppInfo *app_info;

  app_info = g_list_model_get_item (G_LIST_MODEL (gtk_list_view_get_model (list)), position);
  g_app_info_launch (app_info, NULL, NULL, NULL);
  g_object_unref (app_info);
}

...

  model = create_application_list ();

  factory = gtk_signal_list_item_factory_new ();
  g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
  g_signal_connect (factory, "bind", G_CALLBACK (bind_listitem_cb), NULL);

  list = gtk_list_view_new (GTK_SELECTION_MODEL (gtk_single_selection_new (model)), factory);

  g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);

  gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), list);
]]></programlisting></informalexample>
<para></para>
<refsect2><title>CSS nodes</title><informalexample><programlisting role="example"><![CDATA[
listview[.separators][.rich-list][.navigation-sidebar][.data-table]
├── row
│
├── row
│
┊
╰── [rubberband]

]]></programlisting></informalexample>
<para></para>
<para>GtkListView uses a single CSS node named listview. It may carry the
.separators style class, when <link linkend="GtkListView--show-separators"><type>“show-separators”</type></link> property
is set. Each child widget uses a single CSS node named row. For
rubberband selection, a node with name rubberband is used.</para>
<para>The main listview node may also carry style classes to select
the style of <ulink url="ListContainers.html#list-styles">list presentation</ulink>:
.rich-list, .navigation-sidebar or .data-table.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkListView.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-list-view-new" role="function">
<title>gtk_list_view_new&#160;()</title>
<indexterm zone="gtk-list-view-new"><primary>gtk_list_view_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_list_view_new (<parameter><link linkend="GtkSelectionModel"><type>GtkSelectionModel</type></link> *model</parameter>,
                   <parameter><link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link> *factory</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkListView"><type>GtkListView</type></link> that uses the given <parameter>factory</parameter>
 for
mapping items to widgets.</para>
<para>The function takes ownership of the
arguments, so you can write code like
<literal>
  list_view = gtk_list_view_new (<link linkend="create-model"><function>create_model()</function></link>,
    gtk_builder_list_item_factory_new_from_resource ("/resource.ui"));
</literal></para>
<refsect3 id="gtk-list-view-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>the model to use, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>factory</para></entry>
<entry role="parameter_description"><para>The factory to populate items with, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-list-view-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkListView"><type>GtkListView</type></link> using the given <parameter>model</parameter>
and <parameter>factory</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-set-factory" role="function">
<title>gtk_list_view_set_factory&#160;()</title>
<indexterm zone="gtk-list-view-set-factory"><primary>gtk_list_view_set_factory</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_list_view_set_factory (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>,
                           <parameter><link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link> *factory</parameter>);</programlisting>
<para>Sets the <link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link> to use for populating list items.</para>
<refsect3 id="gtk-list-view-set-factory.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>factory</para></entry>
<entry role="parameter_description"><para>the factory to use or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for none. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-get-factory" role="function">
<title>gtk_list_view_get_factory&#160;()</title>
<indexterm zone="gtk-list-view-get-factory"><primary>gtk_list_view_get_factory</primary></indexterm>
<programlisting language="C"><link linkend="GtkListItemFactory"><returnvalue>GtkListItemFactory</returnvalue></link>&#160;*
gtk_list_view_get_factory (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>);</programlisting>
<para>Gets the factory that's currently used to populate list items.</para>
<refsect3 id="gtk-list-view-get-factory.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-list-view-get-factory.returns" role="returns">
<title>Returns</title>
<para>The factory in use. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-set-model" role="function">
<title>gtk_list_view_set_model&#160;()</title>
<indexterm zone="gtk-list-view-set-model"><primary>gtk_list_view_set_model</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_list_view_set_model (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>,
                         <parameter><link linkend="GtkSelectionModel"><type>GtkSelectionModel</type></link> *model</parameter>);</programlisting>
<para>Sets the <link linkend="GtkSelectionModel"><type>GtkSelectionModel</type></link> to use.</para>
<refsect3 id="gtk-list-view-set-model.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>the model to use or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for none. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>][<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-get-model" role="function">
<title>gtk_list_view_get_model&#160;()</title>
<indexterm zone="gtk-list-view-get-model"><primary>gtk_list_view_get_model</primary></indexterm>
<programlisting language="C"><link linkend="GtkSelectionModel"><returnvalue>GtkSelectionModel</returnvalue></link>&#160;*
gtk_list_view_get_model (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>);</programlisting>
<para>Gets the model that's currently used to read the items displayed.</para>
<refsect3 id="gtk-list-view-get-model.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-list-view-get-model.returns" role="returns">
<title>Returns</title>
<para>The model in use. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-set-show-separators" role="function">
<title>gtk_list_view_set_show_separators&#160;()</title>
<indexterm zone="gtk-list-view-set-show-separators"><primary>gtk_list_view_set_show_separators</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_list_view_set_show_separators (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>,
                                   <parameter><link linkend="gboolean"><type>gboolean</type></link> show_separators</parameter>);</programlisting>
<para>Sets whether the list box should show separators
between rows.</para>
<refsect3 id="gtk-list-view-set-show-separators.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>show_separators</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to show separators</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-get-show-separators" role="function">
<title>gtk_list_view_get_show_separators&#160;()</title>
<indexterm zone="gtk-list-view-get-show-separators"><primary>gtk_list_view_get_show_separators</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_list_view_get_show_separators (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>);</programlisting>
<para>Returns whether the list box should show separators
between rows.</para>
<refsect3 id="gtk-list-view-get-show-separators.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-list-view-get-show-separators.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the list box shows separators</para>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-set-single-click-activate" role="function">
<title>gtk_list_view_set_single_click_activate&#160;()</title>
<indexterm zone="gtk-list-view-set-single-click-activate"><primary>gtk_list_view_set_single_click_activate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_list_view_set_single_click_activate
                               (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> single_click_activate</parameter>);</programlisting>
<para>Sets whether rows should be activated on single click and
selected on hover.</para>
<refsect3 id="gtk-list-view-set-single-click-activate.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>single_click_activate</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to activate items on single click</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-get-single-click-activate" role="function">
<title>gtk_list_view_get_single_click_activate&#160;()</title>
<indexterm zone="gtk-list-view-get-single-click-activate"><primary>gtk_list_view_get_single_click_activate</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_list_view_get_single_click_activate
                               (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>);</programlisting>
<para>Returns whether rows will be activated on single click and
selected on hover.</para>
<refsect3 id="gtk-list-view-get-single-click-activate.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-list-view-get-single-click-activate.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if rows are activated on single click</para>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-set-enable-rubberband" role="function">
<title>gtk_list_view_set_enable_rubberband&#160;()</title>
<indexterm zone="gtk-list-view-set-enable-rubberband"><primary>gtk_list_view_set_enable_rubberband</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_list_view_set_enable_rubberband (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>,
                                     <parameter><link linkend="gboolean"><type>gboolean</type></link> enable_rubberband</parameter>);</programlisting>
<para>Sets whether selections can be changed by dragging with the mouse.</para>
<refsect3 id="gtk-list-view-set-enable-rubberband.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>enable_rubberband</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to enable rubberband selection</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-list-view-get-enable-rubberband" role="function">
<title>gtk_list_view_get_enable_rubberband&#160;()</title>
<indexterm zone="gtk-list-view-get-enable-rubberband"><primary>gtk_list_view_get_enable_rubberband</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_list_view_get_enable_rubberband (<parameter><link linkend="GtkListView"><type>GtkListView</type></link> *self</parameter>);</programlisting>
<para>Returns whether rows can be selected by dragging with the mouse.</para>
<refsect3 id="gtk-list-view-get-enable-rubberband.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-list-view-get-enable-rubberband.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if rubberband selection is enabled</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkListView.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkListView-struct" role="struct">
<title>GtkListView</title>
<indexterm zone="GtkListView-struct"><primary>GtkListView</primary></indexterm>
<programlisting language="C">typedef struct _GtkListView GtkListView;</programlisting>
<para>GtkListView is the simple list implementation for GTK's list widgets.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkListView.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkListView--enable-rubberband" role="property"><title>The <literal>“enable-rubberband”</literal> property</title>
<indexterm zone="GtkListView--enable-rubberband"><primary>GtkListView:enable-rubberband</primary></indexterm>
<programlisting>  “enable-rubberband”        <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Allow rubberband selection</para>
<para>Owner: GtkListView</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkListView--factory" role="property"><title>The <literal>“factory”</literal> property</title>
<indexterm zone="GtkListView--factory"><primary>GtkListView:factory</primary></indexterm>
<programlisting>  “factory”                  <link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link>&#160;*</programlisting>
<para>Factory for populating list items</para>
<para>Owner: GtkListView</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkListView--model" role="property"><title>The <literal>“model”</literal> property</title>
<indexterm zone="GtkListView--model"><primary>GtkListView:model</primary></indexterm>
<programlisting>  “model”                    <link linkend="GtkSelectionModel"><type>GtkSelectionModel</type></link>&#160;*</programlisting>
<para>Model for the items displayed</para>
<para>Owner: GtkListView</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkListView--show-separators" role="property"><title>The <literal>“show-separators”</literal> property</title>
<indexterm zone="GtkListView--show-separators"><primary>GtkListView:show-separators</primary></indexterm>
<programlisting>  “show-separators”          <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Show separators between rows</para>
<para>Owner: GtkListView</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkListView--single-click-activate" role="property"><title>The <literal>“single-click-activate”</literal> property</title>
<indexterm zone="GtkListView--single-click-activate"><primary>GtkListView:single-click-activate</primary></indexterm>
<programlisting>  “single-click-activate”    <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Activate rows on single click and select them on hover</para>
<para>Owner: GtkListView</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkListView.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkListView-activate" role="signal"><title>The <literal>“activate”</literal> signal</title>
<indexterm zone="GtkListView-activate"><primary>GtkListView::activate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkListView"><type>GtkListView</type></link> *self,
               <link linkend="guint"><type>guint</type></link>        position,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>The ::activate signal is emitted when a row has been activated by the user,
usually via activating the GtkListView|list.activate-item action.</para>
<para>This allows for a convenient way to handle activation in a listview.
See <link linkend="gtk-list-item-set-activatable"><function>gtk_list_item_set_activatable()</function></link> for details on how to use this signal.</para>
<refsect3 id="GtkListView-activate.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>The <link linkend="GtkListView"><type>GtkListView</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>position of item to activate</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkListView.action-details" role="action_details">
<title role="action_details.title">Action Details</title>
<refsect2 id="GtkListView|list.activate-item" role="action"><title>The <literal>“list.activate-item”</literal> action</title>
<indexterm zone="GtkListView|list.activate-item"><primary>GtkListView|list.activate-item</primary></indexterm>
<para>Activates the item given in <parameter>position</parameter>
 by emitting the GtkListView::activate
signal.</para>
<para>Parameter type: u</para>
<refsect3 id="GtkListView|list.activate-item.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>position of item to activate</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkListView.see-also">
<title>See Also</title>
<para><link linkend="GtkSelectionModel"><type>GtkSelectionModel</type></link>, <link linkend="GtkColumnView"><type>GtkColumnView</type></link>, <link linkend="GtkGridView"><type>GtkGridView</type></link></para>

</refsect1>

</refentry>
