<?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 index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
<refentry id="GtkComboBox">
<refmeta>
<refentrytitle role="top_of_page" id="GtkComboBox.top_of_page">GtkComboBox</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkComboBox</refname>
<refpurpose>A widget used to choose from a list of items</refpurpose>
</refnamediv>

<refsynopsisdiv id="GtkComboBox.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

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

                    <link linkend="GtkComboBox-struct">GtkComboBox</link>;
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="gtk-combo-box-new">gtk_combo_box_new</link>                   (void);
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="gtk-combo-box-new-with-model">gtk_combo_box_new_with_model</link>        (<link linkend="GtkTreeModel">GtkTreeModel</link> *model);
<link linkend="gint">gint</link>                <link linkend="gtk-combo-box-get-wrap-width">gtk_combo_box_get_wrap_width</link>        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-wrap-width">gtk_combo_box_set_wrap_width</link>        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> width);
<link linkend="gint">gint</link>                <link linkend="gtk-combo-box-get-row-span-column">gtk_combo_box_get_row_span_column</link>   (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-row-span-column">gtk_combo_box_set_row_span_column</link>   (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> row_span);
<link linkend="gint">gint</link>                <link linkend="gtk-combo-box-get-column-span-column">gtk_combo_box_get_column_span_column</link>
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-column-span-column">gtk_combo_box_set_column_span_column</link>
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> column_span);
<link linkend="gint">gint</link>                <link linkend="gtk-combo-box-get-active">gtk_combo_box_get_active</link>            (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-active">gtk_combo_box_set_active</link>            (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> index_);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-combo-box-get-active-iter">gtk_combo_box_get_active_iter</link>       (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-active-iter">gtk_combo_box_set_active_iter</link>       (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
<link linkend="GtkTreeModel">GtkTreeModel</link> *      <link linkend="gtk-combo-box-get-model">gtk_combo_box_get_model</link>             (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-model">gtk_combo_box_set_model</link>             (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkTreeModel">GtkTreeModel</link> *model);
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="gtk-combo-box-new-text">gtk_combo_box_new_text</link>              (void);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-append-text">gtk_combo_box_append_text</link>           (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         const <link linkend="gchar">gchar</link> *text);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-insert-text">gtk_combo_box_insert_text</link>           (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> position,
                                                         const <link linkend="gchar">gchar</link> *text);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-prepend-text">gtk_combo_box_prepend_text</link>          (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         const <link linkend="gchar">gchar</link> *text);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-remove-text">gtk_combo_box_remove_text</link>           (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> position);
<link linkend="gchar">gchar</link> *             <link linkend="gtk-combo-box-get-active-text">gtk_combo_box_get_active_text</link>       (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-popup">gtk_combo_box_popup</link>                 (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-popdown">gtk_combo_box_popdown</link>               (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="AtkObject">AtkObject</link>*          <link linkend="gtk-combo-box-get-popup-accessible">gtk_combo_box_get_popup_accessible</link>  (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="GtkTreeViewRowSeparatorFunc">GtkTreeViewRowSeparatorFunc</link>  <link linkend="gtk-combo-box-get-row-separator-func">gtk_combo_box_get_row_separator_func</link>
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-row-separator-func">gtk_combo_box_set_row_separator_func</link>
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkTreeViewRowSeparatorFunc">GtkTreeViewRowSeparatorFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> destroy);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-add-tearoffs">gtk_combo_box_set_add_tearoffs</link>      (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gboolean">gboolean</link> add_tearoffs);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-combo-box-get-add-tearoffs">gtk_combo_box_get_add_tearoffs</link>      (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-title">gtk_combo_box_set_title</link>             (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         const <link linkend="gchar">gchar</link> *title);
const <link linkend="gchar">gchar</link> *       <link linkend="gtk-combo-box-get-title">gtk_combo_box_get_title</link>             (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-focus-on-click">gtk_combo_box_set_focus_on_click</link>    (<link linkend="GtkComboBox">GtkComboBox</link> *combo,
                                                         <link linkend="gboolean">gboolean</link> focus_on_click);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-combo-box-get-focus-on-click">gtk_combo_box_get_focus_on_click</link>    (<link linkend="GtkComboBox">GtkComboBox</link> *combo);
<link linkend="void">void</link>                <link linkend="gtk-combo-box-set-button-sensitivity">gtk_combo_box_set_button_sensitivity</link>
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkSensitivityType">GtkSensitivityType</link> sensitivity);
<link linkend="GtkSensitivityType">GtkSensitivityType</link>  <link linkend="gtk-combo-box-get-button-sensitivity">gtk_combo_box_get_button_sensitivity</link>
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GtkComboBox.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
         +----<link linkend="GtkObject">GtkObject</link>
               +----<link linkend="GtkWidget">GtkWidget</link>
                     +----<link linkend="GtkContainer">GtkContainer</link>
                           +----<link linkend="GtkBin">GtkBin</link>
                                 +----GtkComboBox
                                       +----<link linkend="GtkComboBoxEntry">GtkComboBoxEntry</link>
</synopsis>
</refsect1>



<refsect1 id="GtkComboBox.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkComboBox implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkCellEditable">GtkCellEditable</link> and  <link linkend="GtkCellLayout">GtkCellLayout</link>.</para>
</refsect1>


<refsect1 id="GtkComboBox.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
  &quot;<link linkend="GtkComboBox--active">active</link>&quot;                   <link linkend="gint">gint</link>                  : Read / Write
  &quot;<link linkend="GtkComboBox--add-tearoffs">add-tearoffs</link>&quot;             <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkComboBox--button-sensitivity">button-sensitivity</link>&quot;       <link linkend="GtkSensitivityType">GtkSensitivityType</link>    : Read / Write
  &quot;<link linkend="GtkComboBox--column-span-column">column-span-column</link>&quot;       <link linkend="gint">gint</link>                  : Read / Write
  &quot;<link linkend="GtkComboBox--focus-on-click">focus-on-click</link>&quot;           <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkComboBox--has-frame">has-frame</link>&quot;                <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkComboBox--model">model</link>&quot;                    <link linkend="GtkTreeModel">GtkTreeModel</link>*         : Read / Write
  &quot;<link linkend="GtkComboBox--popup-shown">popup-shown</link>&quot;              <link linkend="gboolean">gboolean</link>              : Read
  &quot;<link linkend="GtkComboBox--row-span-column">row-span-column</link>&quot;          <link linkend="gint">gint</link>                  : Read / Write
  &quot;<link linkend="GtkComboBox--tearoff-title">tearoff-title</link>&quot;            <link linkend="gchar">gchar</link>*                : Read / Write
  &quot;<link linkend="GtkComboBox--wrap-width">wrap-width</link>&quot;               <link linkend="gint">gint</link>                  : Read / Write
</synopsis>
</refsect1>
<refsect1 id="GtkComboBox.style-properties" role="style_properties">
<title role="style_properties.title">Style Properties</title>
<synopsis>
  &quot;<link linkend="GtkComboBox--s-appears-as-list">appears-as-list</link>&quot;          <link linkend="gboolean">gboolean</link>              : Read
  &quot;<link linkend="GtkComboBox--s-arrow-size">arrow-size</link>&quot;               <link linkend="gint">gint</link>                  : Read
  &quot;<link linkend="GtkComboBox--s-shadow-type">shadow-type</link>&quot;              <link linkend="GtkShadowType">GtkShadowType</link>         : Read
</synopsis>
</refsect1>

<refsect1 id="GtkComboBox.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="GtkComboBox-changed">changed</link>&quot;                                        : Run Last
  &quot;<link linkend="GtkComboBox-move-active">move-active</link>&quot;                                    : Run Last / Action
  &quot;<link linkend="GtkComboBox-popdown">popdown</link>&quot;                                        : Run Last / Action
  &quot;<link linkend="GtkComboBox-popup">popup</link>&quot;                                          : Run Last / Action
</synopsis>
</refsect1>


<refsect1 id="GtkComboBox.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GtkComboBox"><type>GtkComboBox</type></link> is a widget that allows the user to choose from a
list of valid choices.  The <link linkend="GtkComboBox"><type>GtkComboBox</type></link> displays the selected
choice.  When activated, the <link linkend="GtkComboBox"><type>GtkComboBox</type></link> displays a popup
which allows the user to make a new choice. The style in which
the selected value is displayed, and the style of the popup is
determined by the current theme. It may be similar to a <link linkend="GtkOptionMenu"><type>GtkOptionMenu</type></link>,
or similar to a Windows-style combo box.
</para>
<para>
Unlike its predecessors <link linkend="GtkCombo"><type>GtkCombo</type></link> and <link linkend="GtkOptionMenu"><type>GtkOptionMenu</type></link>, the <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
uses the model-view pattern; the list of valid choices is specified in the
form of a tree model, and the display of the choices can be adapted to
the data in the model by using cell renderers, as you would in a tree view.
This is possible since <link linkend="GtkComboBox"><type>GtkComboBox</type></link> implements the <link linkend="GtkCellLayout"><type>GtkCellLayout</type></link> interface.
The tree model holding the valid choices is not restricted to a flat list,
it can be a real tree, and the popup will reflect the tree structure.
</para>
<para>
In addition to the model-view API, <link linkend="GtkComboBox"><type>GtkComboBox</type></link> offers a simple API which
is suitable for text-only combo boxes, and hides the complexity of managing
the data in a model. It consists of the functions <link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>,
<link linkend="gtk-combo-box-append-text"><function>gtk_combo_box_append_text()</function></link>, <link linkend="gtk-combo-box-insert-text"><function>gtk_combo_box_insert_text()</function></link>,
<link linkend="gtk-combo-box-prepend-text"><function>gtk_combo_box_prepend_text()</function></link>, <link linkend="gtk-combo-box-remove-text"><function>gtk_combo_box_remove_text()</function></link> and
<link linkend="gtk-combo-box-get-active-text"><function>gtk_combo_box_get_active_text()</function></link>.
</para>
</refsect1>

<refsect1 id="GtkComboBox.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkComboBox-struct" role="struct">
<title>GtkComboBox</title>
<indexterm zone="GtkComboBox-struct"><primary sortas="ComboBox">GtkComboBox</primary></indexterm><programlisting>typedef struct _GtkComboBox GtkComboBox;</programlisting>
<para>
</para></refsect2>
<refsect2 id="gtk-combo-box-new" role="function" condition="since:2.4">
<title>gtk_combo_box_new ()</title>
<indexterm zone="gtk-combo-box-new" role="2.4"><primary sortas="combo_box_new">gtk_combo_box_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> *         gtk_combo_box_new                   (void);</programlisting>
<para>
Creates a new empty <link linkend="GtkComboBox"><type>GtkComboBox</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A new <link linkend="GtkComboBox"><type>GtkComboBox</type></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-new-with-model" role="function" condition="since:2.4">
<title>gtk_combo_box_new_with_model ()</title>
<indexterm zone="gtk-combo-box-new-with-model" role="2.4"><primary sortas="combo_box_new_with_model">gtk_combo_box_new_with_model</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> *         gtk_combo_box_new_with_model        (<link linkend="GtkTreeModel">GtkTreeModel</link> *model);</programlisting>
<para>
Creates a new <link linkend="GtkComboBox"><type>GtkComboBox</type></link> with the model initialized to <parameter>model</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>model</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A new <link linkend="GtkComboBox"><type>GtkComboBox</type></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-get-wrap-width" role="function" condition="since:2.6">
<title>gtk_combo_box_get_wrap_width ()</title>
<indexterm zone="gtk-combo-box-get-wrap-width" role="2.6"><primary sortas="combo_box_get_wrap_width">gtk_combo_box_get_wrap_width</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_combo_box_get_wrap_width        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Returns the wrap width which is used to determine the number of columns 
for the popup menu. If the wrap width is larger than 1, the combo box 
is in table mode.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the wrap width.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-set-wrap-width" role="function" condition="since:2.4">
<title>gtk_combo_box_set_wrap_width ()</title>
<indexterm zone="gtk-combo-box-set-wrap-width" role="2.4"><primary sortas="combo_box_set_wrap_width">gtk_combo_box_set_wrap_width</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_wrap_width        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> width);</programlisting>
<para>
Sets the wrap width of <parameter>combo_box</parameter> to be <parameter>width</parameter>. The wrap width is basically
the preferred number of columns when you want the popup to be layed out
in a table.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> Preferred number of columns
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-get-row-span-column" role="function" condition="since:2.6">
<title>gtk_combo_box_get_row_span_column ()</title>
<indexterm zone="gtk-combo-box-get-row-span-column" role="2.6"><primary sortas="combo_box_get_row_span_column">gtk_combo_box_get_row_span_column</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_combo_box_get_row_span_column   (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Returns the column with row span information for <parameter>combo_box</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the row span column.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-set-row-span-column" role="function" condition="since:2.4">
<title>gtk_combo_box_set_row_span_column ()</title>
<indexterm zone="gtk-combo-box-set-row-span-column" role="2.4"><primary sortas="combo_box_set_row_span_column">gtk_combo_box_set_row_span_column</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_row_span_column   (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> row_span);</programlisting>
<para>
Sets the column with row span information for <parameter>combo_box</parameter> to be <parameter>row_span</parameter>.
The row span column contains integers which indicate how many rows
an item should span.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>row_span</parameter>&#160;:</term>
<listitem><simpara> A column in the model passed during construction.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-get-column-span-column" role="function" condition="since:2.6">
<title>gtk_combo_box_get_column_span_column ()</title>
<indexterm zone="gtk-combo-box-get-column-span-column" role="2.6"><primary sortas="combo_box_get_column_span_column">gtk_combo_box_get_column_span_column</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_combo_box_get_column_span_column
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Returns the column with column span information for <parameter>combo_box</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the column span column.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-set-column-span-column" role="function" condition="since:2.4">
<title>gtk_combo_box_set_column_span_column ()</title>
<indexterm zone="gtk-combo-box-set-column-span-column" role="2.4"><primary sortas="combo_box_set_column_span_column">gtk_combo_box_set_column_span_column</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_column_span_column
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> column_span);</programlisting>
<para>
Sets the column with column span information for <parameter>combo_box</parameter> to be
<parameter>column_span</parameter>. The column span column contains integers which indicate
how many columns an item should span.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>column_span</parameter>&#160;:</term>
<listitem><simpara> A column in the model passed during construction
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-get-active" role="function" condition="since:2.4">
<title>gtk_combo_box_get_active ()</title>
<indexterm zone="gtk-combo-box-get-active" role="2.4"><primary sortas="combo_box_get_active">gtk_combo_box_get_active</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_combo_box_get_active            (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Returns the index of the currently active item, or -1 if there's no
active item. If the model is a non-flat treemodel, and the active item 
is not an immediate child of the root of the tree, this function returns 
<literal>gtk_tree_path_get_indices (path)[0]</literal>, where 
<literal>path</literal> is the <link linkend="GtkTreePath"><type>GtkTreePath</type></link> of the active item.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> An integer which is the index of the currently active item, 
    or -1 if there's no active item.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-set-active" role="function" condition="since:2.4">
<title>gtk_combo_box_set_active ()</title>
<indexterm zone="gtk-combo-box-set-active" role="2.4"><primary sortas="combo_box_set_active">gtk_combo_box_set_active</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_active            (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> index_);</programlisting>
<para>
Sets the active item of <parameter>combo_box</parameter> to be the item at <parameter>index</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index_</parameter>&#160;:</term>
<listitem><simpara> An index in the model passed during construction, or -1 to have
no active item
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-get-active-iter" role="function" condition="since:2.4">
<title>gtk_combo_box_get_active_iter ()</title>
<indexterm zone="gtk-combo-box-get-active-iter" role="2.4"><primary sortas="combo_box_get_active_iter">gtk_combo_box_get_active_iter</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_combo_box_get_active_iter       (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Sets <parameter>iter</parameter> to point to the current active item, if it exists.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>iter</parameter>&#160;:</term>
<listitem><simpara> The uninitialized <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, if <parameter>iter</parameter> was set

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-set-active-iter" role="function" condition="since:2.4">
<title>gtk_combo_box_set_active_iter ()</title>
<indexterm zone="gtk-combo-box-set-active-iter" role="2.4"><primary sortas="combo_box_set_active_iter">gtk_combo_box_set_active_iter</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_active_iter       (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Sets the current active item to be the one referenced by <parameter>iter</parameter>. 
<parameter>iter</parameter> must correspond to a path of depth one.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>iter</parameter>&#160;:</term>
<listitem><simpara> The <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-get-model" role="function" condition="since:2.4">
<title>gtk_combo_box_get_model ()</title>
<indexterm zone="gtk-combo-box-get-model" role="2.4"><primary sortas="combo_box_get_model">gtk_combo_box_get_model</primary></indexterm><programlisting><link linkend="GtkTreeModel">GtkTreeModel</link> *      gtk_combo_box_get_model             (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Returns the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> which is acting as data source for <parameter>combo_box</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> which was passed during construction.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-set-model" role="function" condition="since:2.4">
<title>gtk_combo_box_set_model ()</title>
<indexterm zone="gtk-combo-box-set-model" role="2.4"><primary sortas="combo_box_set_model">gtk_combo_box_set_model</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_model             (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkTreeModel">GtkTreeModel</link> *model);</programlisting>
<para>
Sets the model used by <parameter>combo_box</parameter> to be <parameter>model</parameter>. Will unset a previously set 
model (if applicable). If model is <link linkend="NULL--CAPS"><literal>NULL</literal></link>, then it will unset the model.
</para>
<para>
Note that this function does not clear the cell renderers, you have to 
call <link linkend="gtk-cell-layout-clear"><function>gtk_cell_layout_clear()</function></link> yourself if you need to set up different 
cell renderers for the new model.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>model</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-new-text" role="function" condition="since:2.4">
<title>gtk_combo_box_new_text ()</title>
<indexterm zone="gtk-combo-box-new-text" role="2.4"><primary sortas="combo_box_new_text">gtk_combo_box_new_text</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> *         gtk_combo_box_new_text              (void);</programlisting>
<para>
Convenience function which constructs a new text combo box, which is a
<link linkend="GtkComboBox"><type>GtkComboBox</type></link> just displaying strings. If you use this function to create
a text combo box, you should only manipulate its data source with the
following convenience functions: <link linkend="gtk-combo-box-append-text"><function>gtk_combo_box_append_text()</function></link>,
<link linkend="gtk-combo-box-insert-text"><function>gtk_combo_box_insert_text()</function></link>, <link linkend="gtk-combo-box-prepend-text"><function>gtk_combo_box_prepend_text()</function></link> and
<link linkend="gtk-combo-box-remove-text"><function>gtk_combo_box_remove_text()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A new text combo box.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-append-text" role="function" condition="since:2.4">
<title>gtk_combo_box_append_text ()</title>
<indexterm zone="gtk-combo-box-append-text" role="2.4"><primary sortas="combo_box_append_text">gtk_combo_box_append_text</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_append_text           (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         const <link linkend="gchar">gchar</link> *text);</programlisting>
<para>
Appends <parameter>string</parameter> to the list of strings stored in <parameter>combo_box</parameter>. Note that
you can only use this function with combo boxes constructed with
<link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link> constructed using <link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&#160;:</term>
<listitem><simpara> A string
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-insert-text" role="function" condition="since:2.4">
<title>gtk_combo_box_insert_text ()</title>
<indexterm zone="gtk-combo-box-insert-text" role="2.4"><primary sortas="combo_box_insert_text">gtk_combo_box_insert_text</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_insert_text           (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> position,
                                                         const <link linkend="gchar">gchar</link> *text);</programlisting>
<para>
Inserts <parameter>string</parameter> at <parameter>position</parameter> in the list of strings stored in <parameter>combo_box</parameter>.
Note that you can only use this function with combo boxes constructed
with <link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link> constructed using <link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>position</parameter>&#160;:</term>
<listitem><simpara> An index to insert <parameter>text</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&#160;:</term>
<listitem><simpara> A string
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-prepend-text" role="function" condition="since:2.4">
<title>gtk_combo_box_prepend_text ()</title>
<indexterm zone="gtk-combo-box-prepend-text" role="2.4"><primary sortas="combo_box_prepend_text">gtk_combo_box_prepend_text</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_prepend_text          (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         const <link linkend="gchar">gchar</link> *text);</programlisting>
<para>
Prepends <parameter>string</parameter> to the list of strings stored in <parameter>combo_box</parameter>. Note that
you can only use this function with combo boxes constructed with
<link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link> constructed with <link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&#160;:</term>
<listitem><simpara> A string
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-remove-text" role="function" condition="since:2.4">
<title>gtk_combo_box_remove_text ()</title>
<indexterm zone="gtk-combo-box-remove-text" role="2.4"><primary sortas="combo_box_remove_text">gtk_combo_box_remove_text</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_remove_text           (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gint">gint</link> position);</programlisting>
<para>
Removes the string at <parameter>position</parameter> from <parameter>combo_box</parameter>. Note that you can only use
this function with combo boxes constructed with <link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link> constructed with <link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>position</parameter>&#160;:</term>
<listitem><simpara> Index of the item to remove
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-get-active-text" role="function" condition="since:2.6">
<title>gtk_combo_box_get_active_text ()</title>
<indexterm zone="gtk-combo-box-get-active-text" role="2.6"><primary sortas="combo_box_get_active_text">gtk_combo_box_get_active_text</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             gtk_combo_box_get_active_text       (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Returns the currently active string in <parameter>combo_box</parameter> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if none
is selected.  Note that you can only use this function with combo
boxes constructed with <link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link> and with
<link linkend="GtkComboBoxEntry"><type>GtkComboBoxEntry</type></link><!-- -->s.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> A <link linkend="GtkComboBox"><type>GtkComboBox</type></link> constructed with <link linkend="gtk-combo-box-new-text"><function>gtk_combo_box_new_text()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly allocated string containing the currently active text.
    Must be freed with <link linkend="g-free"><function>g_free()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-popup" role="function" condition="since:2.4">
<title>gtk_combo_box_popup ()</title>
<indexterm zone="gtk-combo-box-popup" role="2.4"><primary sortas="combo_box_popup">gtk_combo_box_popup</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_popup                 (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Pops up the menu or dropdown list of <parameter>combo_box</parameter>. 
</para>
<para>
This function is mostly intended for use by accessibility technologies;
applications should have little use for it.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-popdown" role="function" condition="since:2.4">
<title>gtk_combo_box_popdown ()</title>
<indexterm zone="gtk-combo-box-popdown" role="2.4"><primary sortas="combo_box_popdown">gtk_combo_box_popdown</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_popdown               (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Hides the menu or dropdown list of <parameter>combo_box</parameter>.
</para>
<para>
This function is mostly intended for use by accessibility technologies;
applications should have little use for it.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-combo-box-get-popup-accessible" role="function" condition="since:2.6">
<title>gtk_combo_box_get_popup_accessible ()</title>
<indexterm zone="gtk-combo-box-get-popup-accessible" role="2.6"><primary sortas="combo_box_get_popup_accessible">gtk_combo_box_get_popup_accessible</primary></indexterm><programlisting><link linkend="AtkObject">AtkObject</link>*          gtk_combo_box_get_popup_accessible  (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Gets the accessible object corresponding to the combo box's popup.
</para>
<para>
This function is mostly intended for use by accessibility technologies;
applications should have little use for it.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the accessible object corresponding to the combo box's popup.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-get-row-separator-func" role="function" condition="since:2.6">
<title>gtk_combo_box_get_row_separator_func ()</title>
<indexterm zone="gtk-combo-box-get-row-separator-func" role="2.6"><primary sortas="combo_box_get_row_separator_func">gtk_combo_box_get_row_separator_func</primary></indexterm><programlisting><link linkend="GtkTreeViewRowSeparatorFunc">GtkTreeViewRowSeparatorFunc</link>  gtk_combo_box_get_row_separator_func
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Returns the current row separator function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the current row separator function.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-set-row-separator-func" role="function" condition="since:2.6">
<title>gtk_combo_box_set_row_separator_func ()</title>
<indexterm zone="gtk-combo-box-set-row-separator-func" role="2.6"><primary sortas="combo_box_set_row_separator_func">gtk_combo_box_set_row_separator_func</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_row_separator_func
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkTreeViewRowSeparatorFunc">GtkTreeViewRowSeparatorFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> data,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> destroy);</programlisting>
<para>
Sets the row separator function, which is used to determine
whether a row should be drawn as a separator. If the row separator
function is <link linkend="NULL--CAPS"><literal>NULL</literal></link>, no separators are drawn. This is the default value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkTreeViewRowSeparatorFunc"><type>GtkTreeViewRowSeparatorFunc</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara> user data to pass to <parameter>func</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>destroy</parameter>&#160;:</term>
<listitem><simpara> destroy notifier for <parameter>data</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-set-add-tearoffs" role="function" condition="since:2.6">
<title>gtk_combo_box_set_add_tearoffs ()</title>
<indexterm zone="gtk-combo-box-set-add-tearoffs" role="2.6"><primary sortas="combo_box_set_add_tearoffs">gtk_combo_box_set_add_tearoffs</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_add_tearoffs      (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="gboolean">gboolean</link> add_tearoffs);</programlisting>
<para>
Sets whether the popup menu should have a tearoff 
menu item.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>add_tearoffs</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to add tearoff menu items
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-get-add-tearoffs" role="function">
<title>gtk_combo_box_get_add_tearoffs ()</title>
<indexterm zone="gtk-combo-box-get-add-tearoffs"><primary sortas="combo_box_get_add_tearoffs">gtk_combo_box_get_add_tearoffs</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_combo_box_get_add_tearoffs      (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Gets the current value of the :add-tearoffs property.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the current value of the :add-tearoffs property.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-combo-box-set-title" role="function" condition="since:2.10">
<title>gtk_combo_box_set_title ()</title>
<indexterm zone="gtk-combo-box-set-title" role="2.10"><primary sortas="combo_box_set_title">gtk_combo_box_set_title</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_title             (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         const <link linkend="gchar">gchar</link> *title);</programlisting>
<para>
Sets the menu's title in tearoff mode.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>title</parameter>&#160;:</term>
<listitem><simpara> a title for the menu in tearoff mode
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.10</para></refsect2>
<refsect2 id="gtk-combo-box-get-title" role="function" condition="since:2.10">
<title>gtk_combo_box_get_title ()</title>
<indexterm zone="gtk-combo-box-get-title" role="2.10"><primary sortas="combo_box_get_title">gtk_combo_box_get_title</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       gtk_combo_box_get_title             (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Gets the current title of the menu in tearoff mode. See
<link linkend="gtk-combo-box-set-add-tearoffs"><function>gtk_combo_box_set_add_tearoffs()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the menu's title in tearoff mode. This is an internal copy of the
string which must not be freed.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.10</para></refsect2>
<refsect2 id="gtk-combo-box-set-focus-on-click" role="function" condition="since:2.6">
<title>gtk_combo_box_set_focus_on_click ()</title>
<indexterm zone="gtk-combo-box-set-focus-on-click" role="2.6"><primary sortas="combo_box_set_focus_on_click">gtk_combo_box_set_focus_on_click</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_focus_on_click    (<link linkend="GtkComboBox">GtkComboBox</link> *combo,
                                                         <link linkend="gboolean">gboolean</link> focus_on_click);</programlisting>
<para>
Sets whether the combo box will grab focus when it is clicked with 
the mouse. Making mouse clicks not grab focus is useful in places 
like toolbars where you don't want the keyboard focus removed from 
the main area of the application.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>focus_on_click</parameter>&#160;:</term>
<listitem><simpara> whether the combo box grabs focus when clicked 
   with the mouse
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-get-focus-on-click" role="function" condition="since:2.6">
<title>gtk_combo_box_get_focus_on_click ()</title>
<indexterm zone="gtk-combo-box-get-focus-on-click" role="2.6"><primary sortas="combo_box_get_focus_on_click">gtk_combo_box_get_focus_on_click</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_combo_box_get_focus_on_click    (<link linkend="GtkComboBox">GtkComboBox</link> *combo);</programlisting>
<para>
Returns whether the combo box grabs focus when it is clicked 
with the mouse. See <link linkend="gtk-combo-box-set-focus-on-click"><function>gtk_combo_box_set_focus_on_click()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the combo box grabs focus when it is 
    clicked with the mouse.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-combo-box-set-button-sensitivity" role="function" condition="since:2.14">
<title>gtk_combo_box_set_button_sensitivity ()</title>
<indexterm zone="gtk-combo-box-set-button-sensitivity" role="2.14"><primary sortas="combo_box_set_button_sensitivity">gtk_combo_box_set_button_sensitivity</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_combo_box_set_button_sensitivity
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box,
                                                         <link linkend="GtkSensitivityType">GtkSensitivityType</link> sensitivity);</programlisting>
<para>
Sets whether the dropdown button of the combo box should be
always sensitive (<link linkend="GTK-SENSITIVITY-ON--CAPS"><literal>GTK_SENSITIVITY_ON</literal></link>), never sensitive (<link linkend="GTK-SENSITIVITY-OFF--CAPS"><literal>GTK_SENSITIVITY_OFF</literal></link>)
or only if there is at least one item to display (<link linkend="GTK-SENSITIVITY-AUTO--CAPS"><literal>GTK_SENSITIVITY_AUTO</literal></link>).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sensitivity</parameter>&#160;:</term>
<listitem><simpara> specify the sensitivity of the dropdown button
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>
<refsect2 id="gtk-combo-box-get-button-sensitivity" role="function" condition="since:2.14">
<title>gtk_combo_box_get_button_sensitivity ()</title>
<indexterm zone="gtk-combo-box-get-button-sensitivity" role="2.14"><primary sortas="combo_box_get_button_sensitivity">gtk_combo_box_get_button_sensitivity</primary></indexterm><programlisting><link linkend="GtkSensitivityType">GtkSensitivityType</link>  gtk_combo_box_get_button_sensitivity
                                                        (<link linkend="GtkComboBox">GtkComboBox</link> *combo_box);</programlisting>
<para>
Returns whether the combo box sets the dropdown button
sensitive or not when there are no items in the model.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>combo_box</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkComboBox"><type>GtkComboBox</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="GTK-SENSITIVITY-ON--CAPS"><literal>GTK_SENSITIVITY_ON</literal></link> if the dropdown button
   is sensitive when the model is empty, <link linkend="GTK-SENSITIVITY-OFF--CAPS"><literal>GTK_SENSITIVITY_OFF</literal></link>
   if the button is always insensitive or
   <link linkend="GTK-SENSITIVITY-AUTO--CAPS"><literal>GTK_SENSITIVITY_AUTO</literal></link> if it is only sensitive as long as
   the model has one item to be selected.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>

</refsect1>
<refsect1 id="GtkComboBox.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkComboBox--active" role="property"><title>The <literal>&quot;active&quot;</literal> property</title>
<indexterm zone="GtkComboBox--active" role="2.4"><primary sortas="ComboBox:active">GtkComboBox:active</primary></indexterm><programlisting>  &quot;active&quot;                   <link linkend="gint">gint</link>                  : Read / Write</programlisting>
<para>
The item which is currently active. If the model is a non-flat treemodel,
and the active item is not an immediate child of the root of the tree,
this property has the value
<literal>gtk_tree_path_get_indices (path)[0]</literal>,
where <literal>path</literal> is the <link linkend="GtkTreePath"><type>GtkTreePath</type></link> of the active item.</para>
<para>
</para><para>Allowed values: &gt;= G_MAXULONG</para>
<para>Default value: -1</para>
<para>Since 2.4</para>
</refsect2>
<refsect2 id="GtkComboBox--add-tearoffs" role="property"><title>The <literal>&quot;add-tearoffs&quot;</literal> property</title>
<indexterm zone="GtkComboBox--add-tearoffs" role="2.6"><primary sortas="ComboBox:add-tearoffs">GtkComboBox:add-tearoffs</primary></indexterm><programlisting>  &quot;add-tearoffs&quot;             <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>
The add-tearoffs property controls whether generated menus 
have tearoff menu items. 
</para>
<para>
Note that this only affects menu style combo boxes.</para>
<para>
</para><para>Default value: FALSE</para>
<para>Since 2.6</para>
</refsect2>
<refsect2 id="GtkComboBox--button-sensitivity" role="property"><title>The <literal>&quot;button-sensitivity&quot;</literal> property</title>
<indexterm zone="GtkComboBox--button-sensitivity" role="2.14"><primary sortas="ComboBox:button-sensitivity">GtkComboBox:button-sensitivity</primary></indexterm><programlisting>  &quot;button-sensitivity&quot;       <link linkend="GtkSensitivityType">GtkSensitivityType</link>    : Read / Write</programlisting>
<para>
Whether the dropdown button is sensitive when
the model is empty.</para>
<para>
</para><para>Default value: GTK_SENSITIVITY_AUTO</para>
<para>Since 2.14</para>
</refsect2>
<refsect2 id="GtkComboBox--column-span-column" role="property"><title>The <literal>&quot;column-span-column&quot;</literal> property</title>
<indexterm zone="GtkComboBox--column-span-column" role="2.4"><primary sortas="ComboBox:column-span-column">GtkComboBox:column-span-column</primary></indexterm><programlisting>  &quot;column-span-column&quot;       <link linkend="gint">gint</link>                  : Read / Write</programlisting>
<para>
If this is set to a non-negative value, it must be the index of a column 
of type <link linkend="G-TYPE-INT--CAPS"><literal>G_TYPE_INT</literal></link> in the model. 
</para>
<para>
The values of that column are used to determine how many columns a value 
in the list will span.</para>
<para>
</para><para>Allowed values: &gt;= G_MAXULONG</para>
<para>Default value: -1</para>
<para>Since 2.4</para>
</refsect2>
<refsect2 id="GtkComboBox--focus-on-click" role="property"><title>The <literal>&quot;focus-on-click&quot;</literal> property</title>
<indexterm zone="GtkComboBox--focus-on-click"><primary sortas="ComboBox:focus-on-click">GtkComboBox:focus-on-click</primary></indexterm><programlisting>  &quot;focus-on-click&quot;           <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>Whether the combo box grabs focus when it is clicked with the mouse.</para><para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkComboBox--has-frame" role="property"><title>The <literal>&quot;has-frame&quot;</literal> property</title>
<indexterm zone="GtkComboBox--has-frame" role="2.6"><primary sortas="ComboBox:has-frame">GtkComboBox:has-frame</primary></indexterm><programlisting>  &quot;has-frame&quot;                <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>
The has-frame property controls whether a frame
is drawn around the entry.</para>
<para>
</para><para>Default value: TRUE</para>
<para>Since 2.6</para>
</refsect2>
<refsect2 id="GtkComboBox--model" role="property"><title>The <literal>&quot;model&quot;</literal> property</title>
<indexterm zone="GtkComboBox--model" role="2.4"><primary sortas="ComboBox:model">GtkComboBox:model</primary></indexterm><programlisting>  &quot;model&quot;                    <link linkend="GtkTreeModel">GtkTreeModel</link>*         : Read / Write</programlisting>
<para>
The model from which the combo box takes the values shown
in the list.</para>
<para>
</para><para>Since 2.4</para>
</refsect2>
<refsect2 id="GtkComboBox--popup-shown" role="property"><title>The <literal>&quot;popup-shown&quot;</literal> property</title>
<indexterm zone="GtkComboBox--popup-shown" role="2.10"><primary sortas="ComboBox:popup-shown">GtkComboBox:popup-shown</primary></indexterm><programlisting>  &quot;popup-shown&quot;              <link linkend="gboolean">gboolean</link>              : Read</programlisting>
<para>
Whether the combo boxes dropdown is popped up. 
Note that this property is mainly useful, because
it allows you to connect to notify::popup-shown.</para>
<para>
</para><para>Default value: FALSE</para>
<para>Since 2.10</para>
</refsect2>
<refsect2 id="GtkComboBox--row-span-column" role="property"><title>The <literal>&quot;row-span-column&quot;</literal> property</title>
<indexterm zone="GtkComboBox--row-span-column" role="2.4"><primary sortas="ComboBox:row-span-column">GtkComboBox:row-span-column</primary></indexterm><programlisting>  &quot;row-span-column&quot;          <link linkend="gint">gint</link>                  : Read / Write</programlisting>
<para>
If this is set to a non-negative value, it must be the index of a column 
of type <link linkend="G-TYPE-INT--CAPS"><literal>G_TYPE_INT</literal></link> in the model. 
</para>
<para>
The values of that column are used to determine how many rows a value in 
the list will span. Therefore, the values in the model column pointed to 
by this property must be greater than zero and not larger than wrap-width.</para>
<para>
</para><para>Allowed values: &gt;= G_MAXULONG</para>
<para>Default value: -1</para>
<para>Since 2.4</para>
</refsect2>
<refsect2 id="GtkComboBox--tearoff-title" role="property"><title>The <literal>&quot;tearoff-title&quot;</literal> property</title>
<indexterm zone="GtkComboBox--tearoff-title" role="2.10"><primary sortas="ComboBox:tearoff-title">GtkComboBox:tearoff-title</primary></indexterm><programlisting>  &quot;tearoff-title&quot;            <link linkend="gchar">gchar</link>*                : Read / Write</programlisting>
<para>
A title that may be displayed by the window manager 
when the popup is torn-off.</para>
<para>
</para><para>Default value: NULL</para>
<para>Since 2.10</para>
</refsect2>
<refsect2 id="GtkComboBox--wrap-width" role="property"><title>The <literal>&quot;wrap-width&quot;</literal> property</title>
<indexterm zone="GtkComboBox--wrap-width" role="2.4"><primary sortas="ComboBox:wrap-width">GtkComboBox:wrap-width</primary></indexterm><programlisting>  &quot;wrap-width&quot;               <link linkend="gint">gint</link>                  : Read / Write</programlisting>
<para>
If wrap-width is set to a positive value, the list will be
displayed in multiple columns, the number of columns is
determined by wrap-width.</para>
<para>
</para><para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
<para>Since 2.4</para>
</refsect2>

</refsect1>
<refsect1 id="GtkComboBox.style-property-details" role="style_properties_details">
<title role="style_properties_details.title">Style Property Details</title>
<refsect2 id="GtkComboBox--s-appears-as-list" role="property"><title>The <literal>&quot;appears-as-list&quot;</literal> style property</title>
<indexterm zone="GtkComboBox--s-appears-as-list"><primary sortas="ComboBox:appears-as-list">GtkComboBox:appears-as-list</primary></indexterm><programlisting>  &quot;appears-as-list&quot;          <link linkend="gboolean">gboolean</link>              : Read</programlisting>
<para>Whether dropdowns should look like lists rather than menus.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkComboBox--s-arrow-size" role="property"><title>The <literal>&quot;arrow-size&quot;</literal> style property</title>
<indexterm zone="GtkComboBox--s-arrow-size" role="2.12"><primary sortas="ComboBox:arrow-size">GtkComboBox:arrow-size</primary></indexterm><programlisting>  &quot;arrow-size&quot;               <link linkend="gint">gint</link>                  : Read</programlisting>
<para>
Sets the minimum size of the arrow in the combo box.  Note
that the arrow size is coupled to the font size, so in case
a larger font is used, the arrow will be larger than set
by arrow size.</para>
<para>
</para><para>Allowed values: &gt;= 0</para>
<para>Default value: 15</para>
<para>Since 2.12</para>
</refsect2>
<refsect2 id="GtkComboBox--s-shadow-type" role="property"><title>The <literal>&quot;shadow-type&quot;</literal> style property</title>
<indexterm zone="GtkComboBox--s-shadow-type" role="2.12"><primary sortas="ComboBox:shadow-type">GtkComboBox:shadow-type</primary></indexterm><programlisting>  &quot;shadow-type&quot;              <link linkend="GtkShadowType">GtkShadowType</link>         : Read</programlisting>
<para>
Which kind of shadow to draw around the combo box.</para>
<para>
</para><para>Default value: GTK_SHADOW_NONE</para>
<para>Since 2.12</para>
</refsect2>
</refsect1>

<refsect1 id="GtkComboBox.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkComboBox-changed" role="signal"><title>The <literal>&quot;changed&quot;</literal> signal</title>
<indexterm zone="GtkComboBox-changed" role="2.4"><primary sortas="ComboBox::changed">GtkComboBox::changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkComboBox">GtkComboBox</link> *widget,
                                                        <link linkend="gpointer">gpointer</link>     user_data)      : Run Last</programlisting>
<para>
The changed signal is emitted when the active
item is changed. The can be due to the user selecting
a different item from the list, or due to a
call to <link linkend="gtk-combo-box-set-active-iter"><function>gtk_combo_box_set_active_iter()</function></link>.
It will also be emitted while typing into a GtkComboBoxEntry, 
as well as when selecting an item from the GtkComboBoxEntry's list.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&#160;:</term>
<listitem><simpara> the object which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist><para>Since 2.4</para></refsect2><refsect2 id="GtkComboBox-move-active" role="signal"><title>The <literal>&quot;move-active&quot;</literal> signal</title>
<indexterm zone="GtkComboBox-move-active" role="2.12"><primary sortas="ComboBox::move-active">GtkComboBox::move-active</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkComboBox">GtkComboBox</link>  *widget,
                                                        <link linkend="GtkScrollType">GtkScrollType</link> scroll_type,
                                                        <link linkend="gpointer">gpointer</link>      user_data)        : Run Last / Action</programlisting>
<para>
The ::move-active signal is a 
<link linkend="keybinding-signals">keybinding signal</link>
which gets emitted to move the active selection.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&#160;:</term>
<listitem><simpara> the object that received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>scroll_type</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkScrollType"><type>GtkScrollType</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist><para>Since 2.12</para></refsect2><refsect2 id="GtkComboBox-popdown" role="signal"><title>The <literal>&quot;popdown&quot;</literal> signal</title>
<indexterm zone="GtkComboBox-popdown" role="2.12"><primary sortas="ComboBox::popdown">GtkComboBox::popdown</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            user_function                      (<link linkend="GtkComboBox">GtkComboBox</link> *button,
                                                        <link linkend="gpointer">gpointer</link>     user_data)      : Run Last / Action</programlisting>
<para>
The ::popdown signal is a 
<link linkend="keybinding-signals">keybinding signal</link> 
which gets emitted to popdown the combo box list.
</para>
<para>
The default bindings for this signal are Alt+Up and Escape.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>button</parameter>&#160;:</term>
<listitem><simpara> the object which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist><para>Since 2.12</para></refsect2><refsect2 id="GtkComboBox-popup" role="signal"><title>The <literal>&quot;popup&quot;</literal> signal</title>
<indexterm zone="GtkComboBox-popup" role="2.12"><primary sortas="ComboBox::popup">GtkComboBox::popup</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkComboBox">GtkComboBox</link> *widget,
                                                        <link linkend="gpointer">gpointer</link>     user_data)      : Run Last / Action</programlisting>
<para>
The ::popup signal is a 
<link linkend="keybinding-signals">keybinding signal</link>
which gets emitted to popup the combo box list.
</para>
<para>
The default binding for this signal is Alt+Down.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>widget</parameter>&#160;:</term>
<listitem><simpara> the object that received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist><para>Since 2.12</para></refsect2>
</refsect1>


<refsect1 id="GtkComboBox.see-also">
<title>See Also</title>
<para>
<link linkend="GtkComboBoxEntry"><type>GtkComboBoxEntry</type></link>, <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link>, <link linkend="GtkCellRenderer"><type>GtkCellRenderer</type></link>
</para>
</refsect1>

</refentry>
