<?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="GtkDropDown">
<refmeta>
<refentrytitle role="top_of_page" id="GtkDropDown.top_of_page">GtkDropDown</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkDropDown</refname>
<refpurpose>Choose an item from a list</refpurpose>
</refnamediv>

<refsect1 id="GtkDropDown.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-drop-down-new">gtk_drop_down_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-drop-down-new-from-strings">gtk_drop_down_new_from_strings</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-drop-down-set-model">gtk_drop_down_set_model</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GListModel"><returnvalue>GListModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-drop-down-get-model">gtk_drop_down_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-drop-down-set-selected">gtk_drop_down_set_selected</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-drop-down-get-selected">gtk_drop_down_get_selected</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-drop-down-get-selected-item">gtk_drop_down_get_selected_item</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-drop-down-set-factory">gtk_drop_down_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-drop-down-get-factory">gtk_drop_down_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-drop-down-set-list-factory">gtk_drop_down_set_list_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-drop-down-get-list-factory">gtk_drop_down_get_list_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-drop-down-set-expression">gtk_drop_down_set_expression</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkExpression"><returnvalue>GtkExpression</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-drop-down-get-expression">gtk_drop_down_get_expression</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-drop-down-set-enable-search">gtk_drop_down_set_enable_search</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-drop-down-get-enable-search">gtk_drop_down_get_enable_search</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDropDown.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="GtkDropDown--enable-search">enable-search</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkExpression"><type>GtkExpression</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkDropDown--expression">expression</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="GtkDropDown--factory">factory</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="GtkDropDown--list-factory">list-factory</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GListModel"><type>GListModel</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkDropDown--model">model</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="GtkDropDown--selected">selected</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GObject"><type>GObject</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkDropDown--selected-item">selected-item</link></entry><entry role="property_flags">Read</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDropDown.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="GtkDropDown-struct">GtkDropDown</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDropDown.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> GtkDropDown
</screen>
</refsect1>
<refsect1 id="GtkDropDown.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkDropDown implements
 <link linkend="GtkAccessible">GtkAccessible</link>,  <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>.</para>

</refsect1>

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

<refsect1 id="GtkDropDown.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkDropDown is a widget that allows the user to choose an item
from a list of options. The GtkDropDown displays the selected
choice.</para>
<para>The options are given to GtkDropDown in the form of <link linkend="GListModel"><type>GListModel</type></link>,
and how the individual options are represented is determined by
a <link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link>. The default factory displays simple strings.</para>
<para>GtkDropDown knows how to obtain strings from the items in a
<link linkend="GtkStringList"><type>GtkStringList</type></link>; for other models, you have to provide an expression
to find the strings via <link linkend="gtk-drop-down-set-expression"><function>gtk_drop_down_set_expression()</function></link>.</para>
<para>GtkDropDown can optionally allow search in the popup, which is
useful if the list of options is long. To enable the search entry,
use <link linkend="gtk-drop-down-set-enable-search"><function>gtk_drop_down_set_enable_search()</function></link>.</para>
<refsect2><title>CSS nodes</title><para>GtkDropDown has a single CSS node with name dropdown,
with the button and popover nodes as children.</para>
</refsect2>
<refsect2><title>Accessibility</title><para>GtkDropDown uses the <link linkend="GTK-ACCESSIBLE-ROLE-COMBO-BOX:CAPS"><type>GTK_ACCESSIBLE_ROLE_COMBO_BOX</type></link> role.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkDropDown.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-drop-down-new" role="function">
<title>gtk_drop_down_new&#160;()</title>
<indexterm zone="gtk-drop-down-new"><primary>gtk_drop_down_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_drop_down_new (<parameter><link linkend="GListModel"><type>GListModel</type></link> *model</parameter>,
                   <parameter><link linkend="GtkExpression"><type>GtkExpression</type></link> *expression</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkDropDown"><type>GtkDropDown</type></link>.</para>
<para>You may want to call <link linkend="gtk-drop-down-set-factory"><function>gtk_drop_down_set_factory()</function></link>
to set up a way to map its items to widgets.</para>
<refsect3 id="gtk-drop-down-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> for none. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>expression</para></entry>
<entry role="parameter_description"><para>the expression to use or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for none. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-down-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkDropDown"><type>GtkDropDown</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-drop-down-new-from-strings" role="function">
<title>gtk_drop_down_new_from_strings&#160;()</title>
<indexterm zone="gtk-drop-down-new-from-strings"><primary>gtk_drop_down_new_from_strings</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_drop_down_new_from_strings (<parameter>const <link linkend="char"><type>char</type></link> * const *strings</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkDropDown"><type>GtkDropDown</type></link> that is populated with
the strings in <parameter>strings</parameter>
.</para>
<refsect3 id="gtk-drop-down-new-from-strings.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>strings</para></entry>
<entry role="parameter_description"><para>The strings to put in the dropdown. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> zero-terminated=1]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-down-new-from-strings.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkDropDown"><type>GtkDropDown</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-drop-down-set-model" role="function">
<title>gtk_drop_down_set_model&#160;()</title>
<indexterm zone="gtk-drop-down-set-model"><primary>gtk_drop_down_set_model</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_drop_down_set_model (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>,
                         <parameter><link linkend="GListModel"><type>GListModel</type></link> *model</parameter>);</programlisting>
<para>Sets the <link linkend="GListModel"><type>GListModel</type></link> to use.</para>
<refsect3 id="gtk-drop-down-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="GtkDropDown"><type>GtkDropDown</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-drop-down-get-model" role="function">
<title>gtk_drop_down_get_model&#160;()</title>
<indexterm zone="gtk-drop-down-get-model"><primary>gtk_drop_down_get_model</primary></indexterm>
<programlisting language="C"><link linkend="GListModel"><returnvalue>GListModel</returnvalue></link>&#160;*
gtk_drop_down_get_model (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>);</programlisting>
<para>Gets the model that provides the displayed items.</para>
<refsect3 id="gtk-drop-down-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="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-down-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-drop-down-set-selected" role="function">
<title>gtk_drop_down_set_selected&#160;()</title>
<indexterm zone="gtk-drop-down-set-selected"><primary>gtk_drop_down_set_selected</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_drop_down_set_selected (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>,
                            <parameter><link linkend="guint"><type>guint</type></link> position</parameter>);</programlisting>
<para>Selects the item at the given position.</para>
<refsect3 id="gtk-drop-down-set-selected.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="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>the position of the item to select, or <link linkend="GTK-INVALID-LIST-POSITION:CAPS"><type>GTK_INVALID_LIST_POSITION</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-drop-down-get-selected" role="function">
<title>gtk_drop_down_get_selected&#160;()</title>
<indexterm zone="gtk-drop-down-get-selected"><primary>gtk_drop_down_get_selected</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_drop_down_get_selected (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>);</programlisting>
<para>Gets the position of the selected item.</para>
<refsect3 id="gtk-drop-down-get-selected.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="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-down-get-selected.returns" role="returns">
<title>Returns</title>
<para> the position of the selected item, or <link linkend="GTK-INVALID-LIST-POSITION:CAPS"><type>GTK_INVALID_LIST_POSITION</type></link>
if not item is selected</para>
</refsect3></refsect2>
<refsect2 id="gtk-drop-down-get-selected-item" role="function">
<title>gtk_drop_down_get_selected_item&#160;()</title>
<indexterm zone="gtk-drop-down-get-selected-item"><primary>gtk_drop_down_get_selected_item</primary></indexterm>
<programlisting language="C"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
gtk_drop_down_get_selected_item (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>);</programlisting>
<para>Gets the selected item. If no item is selected, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned.</para>
<refsect3 id="gtk-drop-down-get-selected-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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-down-get-selected-item.returns" role="returns">
<title>Returns</title>
<para>The selected item. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>type</acronym> GObject][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-drop-down-set-factory" role="function">
<title>gtk_drop_down_set_factory&#160;()</title>
<indexterm zone="gtk-drop-down-set-factory"><primary>gtk_drop_down_set_factory</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_drop_down_set_factory (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</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-drop-down-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="GtkDropDown"><type>GtkDropDown</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-drop-down-get-factory" role="function">
<title>gtk_drop_down_get_factory&#160;()</title>
<indexterm zone="gtk-drop-down-get-factory"><primary>gtk_drop_down_get_factory</primary></indexterm>
<programlisting language="C"><link linkend="GtkListItemFactory"><returnvalue>GtkListItemFactory</returnvalue></link>&#160;*
gtk_drop_down_get_factory (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>);</programlisting>
<para>Gets the factory that's currently used to populate list items.</para>
<para>The factory returned by this function is always used for the
item in the button. It is also used for items in the popup
if <link linkend="GtkDropDown--list-factory"><type>“list-factory”</type></link> is not set.</para>
<refsect3 id="gtk-drop-down-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="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-down-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-drop-down-set-list-factory" role="function">
<title>gtk_drop_down_set_list_factory&#160;()</title>
<indexterm zone="gtk-drop-down-set-list-factory"><primary>gtk_drop_down_set_list_factory</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_drop_down_set_list_factory (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</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 in the popup.</para>
<refsect3 id="gtk-drop-down-set-list-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="GtkDropDown"><type>GtkDropDown</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-drop-down-get-list-factory" role="function">
<title>gtk_drop_down_get_list_factory&#160;()</title>
<indexterm zone="gtk-drop-down-get-list-factory"><primary>gtk_drop_down_get_list_factory</primary></indexterm>
<programlisting language="C"><link linkend="GtkListItemFactory"><returnvalue>GtkListItemFactory</returnvalue></link>&#160;*
gtk_drop_down_get_list_factory (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>);</programlisting>
<para>Gets the factory that's currently used to populate list items in the popup.</para>
<refsect3 id="gtk-drop-down-get-list-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="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-down-get-list-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-drop-down-set-expression" role="function">
<title>gtk_drop_down_set_expression&#160;()</title>
<indexterm zone="gtk-drop-down-set-expression"><primary>gtk_drop_down_set_expression</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_drop_down_set_expression (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>,
                              <parameter><link linkend="GtkExpression"><type>GtkExpression</type></link> *expression</parameter>);</programlisting>
<para>Sets the expression that gets evaluated to obtain strings from items
when searching in the popup. The expression must have a value type of
<link linkend="G-TYPE-STRING:CAPS"><type>G_TYPE_STRING</type></link>.</para>
<refsect3 id="gtk-drop-down-set-expression.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="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>expression</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkExpression"><type>GtkExpression</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-drop-down-get-expression" role="function">
<title>gtk_drop_down_get_expression&#160;()</title>
<indexterm zone="gtk-drop-down-get-expression"><primary>gtk_drop_down_get_expression</primary></indexterm>
<programlisting language="C"><link linkend="GtkExpression"><returnvalue>GtkExpression</returnvalue></link>&#160;*
gtk_drop_down_get_expression (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>);</programlisting>
<para>Gets the expression set with <link linkend="gtk-drop-down-set-expression"><function>gtk_drop_down_set_expression()</function></link>.</para>
<refsect3 id="gtk-drop-down-get-expression.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="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-down-get-expression.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GtkExpression"><type>GtkExpression</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-drop-down-set-enable-search" role="function">
<title>gtk_drop_down_set_enable_search&#160;()</title>
<indexterm zone="gtk-drop-down-set-enable-search"><primary>gtk_drop_down_set_enable_search</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_drop_down_set_enable_search (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>,
                                 <parameter><link linkend="gboolean"><type>gboolean</type></link> enable_search</parameter>);</programlisting>
<para>Sets whether a search entry will be shown in the popup that
allows to search for items in the list.</para>
<para>Note that <link linkend="GtkDropDown--expression"><type>“expression”</type></link> must be set for search to work.</para>
<refsect3 id="gtk-drop-down-set-enable-search.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="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>enable_search</para></entry>
<entry role="parameter_description"><para>whether to enable search</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-drop-down-get-enable-search" role="function">
<title>gtk_drop_down_get_enable_search&#160;()</title>
<indexterm zone="gtk-drop-down-get-enable-search"><primary>gtk_drop_down_get_enable_search</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_drop_down_get_enable_search (<parameter><link linkend="GtkDropDown"><type>GtkDropDown</type></link> *self</parameter>);</programlisting>
<para>Returns whether search is enabled.</para>
<refsect3 id="gtk-drop-down-get-enable-search.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="GtkDropDown"><type>GtkDropDown</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-down-get-enable-search.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the popup includes a search entry</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkDropDown.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkDropDown-struct" role="struct">
<title>GtkDropDown</title>
<indexterm zone="GtkDropDown-struct"><primary>GtkDropDown</primary></indexterm>
<programlisting language="C">typedef struct _GtkDropDown GtkDropDown;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkDropDown.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkDropDown--enable-search" role="property"><title>The <literal>“enable-search”</literal> property</title>
<indexterm zone="GtkDropDown--enable-search"><primary>GtkDropDown:enable-search</primary></indexterm>
<programlisting>  “enable-search”            <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether to show a search entry in the popup.</para>
<para>Note that search requires <link linkend="GtkDropDown--expression"><type>“expression”</type></link> to be set.</para>
<para>Owner: GtkDropDown</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkDropDown--expression" role="property"><title>The <literal>“expression”</literal> property</title>
<indexterm zone="GtkDropDown--expression"><primary>GtkDropDown:expression</primary></indexterm>
<programlisting>  “expression”               <link linkend="GtkExpression"><type>GtkExpression</type></link>&#160;*</programlisting>
<para>An expression to evaluate to obtain strings to match against the search
term (see <link linkend="GtkDropDown--enable-search"><type>“enable-search”</type></link>). If <link linkend="GtkDropDown--factory"><type>“factory”</type></link> is not set,
the expression is also used to bind strings to labels produced by a
default factory.</para>

<para><emphasis role="annotation">[<acronym>type</acronym> GtkExpression]</emphasis></para><para>Owner: GtkDropDown</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkDropDown--factory" role="property"><title>The <literal>“factory”</literal> property</title>
<indexterm zone="GtkDropDown--factory"><primary>GtkDropDown:factory</primary></indexterm>
<programlisting>  “factory”                  <link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link>&#160;*</programlisting>
<para>Factory for populating list items.</para>
<para>Owner: GtkDropDown</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkDropDown--list-factory" role="property"><title>The <literal>“list-factory”</literal> property</title>
<indexterm zone="GtkDropDown--list-factory"><primary>GtkDropDown:list-factory</primary></indexterm>
<programlisting>  “list-factory”             <link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link>&#160;*</programlisting>
<para>The factory for populating list items in the popup.</para>
<para>If this is not set, <link linkend="GtkDropDown--factory"><type>“factory”</type></link> is used.</para>
<para>Owner: GtkDropDown</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkDropDown--model" role="property"><title>The <literal>“model”</literal> property</title>
<indexterm zone="GtkDropDown--model"><primary>GtkDropDown:model</primary></indexterm>
<programlisting>  “model”                    <link linkend="GListModel"><type>GListModel</type></link>&#160;*</programlisting>
<para>Model for the displayed items.</para>
<para>Owner: GtkDropDown</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkDropDown--selected" role="property"><title>The <literal>“selected”</literal> property</title>
<indexterm zone="GtkDropDown--selected"><primary>GtkDropDown:selected</primary></indexterm>
<programlisting>  “selected”                 <link linkend="guint"><type>guint</type></link></programlisting>
<para>The position of the selected item in <link linkend="GtkDropDown--model"><type>“model”</type></link>,
or <link linkend="GTK-INVALID-LIST-POSITION:CAPS"><type>GTK_INVALID_LIST_POSITION</type></link> if no item is selected.</para>
<para>Owner: GtkDropDown</para>
<para>Flags: Read / Write</para>
<para>Default value: 4294967295</para>
</refsect2>
<refsect2 id="GtkDropDown--selected-item" role="property"><title>The <literal>“selected-item”</literal> property</title>
<indexterm zone="GtkDropDown--selected-item"><primary>GtkDropDown:selected-item</primary></indexterm>
<programlisting>  “selected-item”            <link linkend="GObject"><type>GObject</type></link>&#160;*</programlisting>
<para>The selected item.</para>
<para>Owner: GtkDropDown</para>
<para>Flags: Read</para>
</refsect2>

</refsect1>
<refsect1 id="GtkDropDown.see-also">
<title>See Also</title>
<para><link linkend="GtkComboBox"><type>GtkComboBox</type></link></para>

</refsect1>

</refentry>
