<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkcellrenderercombo">
  <refnamediv>
    <refname>gtk.CellRendererCombo</refname> <refpurpose>an object that
    renders a <link
    linkend="class-gtkcomboboxentry"><classname>gtk.ComboBoxEntry</classname></link>
    into a <link
    linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link>
    cell (new in PyGTK 2.6)</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.CellRendererCombo</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkcellrenderertext">gtk.CellRendererText</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtkcellrenderercombo">gtk.CellRendererCombo</link></methodname>
	<methodparam></methodparam>
      </constructorsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkcellrenderer">gtk.CellRenderer</link>
      +-- <link linkend="class-gtkcellrenderertext">gtk.CellRendererText</link>
        +-- <link linkend="class-gtkcellrenderercombo">gtk.CellRendererCombo</link>
</synopsis>

  </refsect1>

  <refsect1 id="properties-gtkcellrenderercombo">
    <title>gtk.CellRendererCombo Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkcellrenderer">gtk.CellRenderer Properties</link></para>
    <para><link linkend="properties-gtkcellrenderertext">gtk.CellRendererText Properties</link></para>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="3.5in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"has-entry"</entry>
	      <entry>Read/Write</entry>
	<entry>If <literal>False</literal>, don't allow entering strings
other than the given ones. Default value: <literal>True</literal>. Available
in GTK+ 2.6 and above.</entry>
	  </row>

	<row valign="top">
	  <entry>"model"</entry>
	  <entry>Read/Write</entry>
	  <entry>The tree model containing the possible values for the combo
box entry. Available in GTK+ 2.6 and above.</entry>
	</row>

	<row valign="top">
	  <entry>"text-column"</entry>
	  <entry>Read/Write</entry>
	  <entry>A column in the data source model to get the strings from.
Allowed values: >= -1. Default value: -1. Available in GTK+ 2.6 and
above.</entry>
	</row>

	</tbody>
      </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkcellrenderercombo">
    <title>gtk.CellRendererCombo Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcellrenderer">gtk.CellRenderer Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcellrenderertext">gtk.CellRendererText Signal Prototypes</link></para>
    
    <variablelist>
      <varlistentry>
        <term>"<link
linkend="signal-gtkcellrenderercombo--changed">changed</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>combo</parameter></methodparam>
	    <methodparam><parameter>path_string</parameter></methodparam>
	    <methodparam><parameter>new_iter</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <note>
      <para>This object is available in PyGTK 2.6 and above.</para>
    </note>

    <para>The <link
linkend="class-gtkcellrenderercombo"><classname>gtk.CellRendererCombo</classname></link>
manages the rendering of a <link
linkend="class-gtkcomboboxentry"><classname>gtk.ComboBoxEntry</classname></link>
into a <link
linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link>
cell.</para>

  </refsect1>

  <refsect1 id="constructor-gtkcellrenderercombo">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.CellRendererCombo</methodname>
	<methodparam></methodparam>  </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>the new cell renderer</simpara></listitem>
      </varlistentry>
    </variablelist>

    <note>
      <para>This constructor is available in PyGTK 2.6 and above.</para>
    </note>

    <para>Creates a new <link
linkend="class-gtkcellrenderercombo"><classname>gtk.CellRendererCombo</classname></link>. 
Rendering parameters are adjusted using the object properties. The object
properties can be set globally (with <link
linkend="method-gobject--set-property"><methodname>set_property</methodname>()</link>). 
Also, with <link
linkend="class-gtktreeviewcolumn"><classname>gtk.TreeViewColumn</classname></link>, 
you can bind a property to a value in a <link
linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>.
For example, you can bind the "text" property on the cell renderer to a
string value in the model, thus rendering a different string in each row of
the <link
linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link>.</para>

  </refsect1>
<refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtkcellrenderercombo--changed">
      <title>The "changed" gtk.CellRendererCombo Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>combo</parameter></methodparam>
	  <methodparam><parameter>path_string</parameter></methodparam>
	  <methodparam><parameter>new_iter</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>combo</parameter>&nbsp;:</term>
	  <listitem><simpara>the object on which the signal is emitted </simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>path_string</parameter>&nbsp;:</term>
	  <listitem><simpara>a string of the path identifying the edited cell
	  (relative to the tree view model) </simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>new_iter</parameter>&nbsp;:</term>
	  <listitem><simpara>the new iter selected in the combo box
	  (relative to the combo box model) </simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>
	The "changed" signal is emitted each time after the user selected an item in
	the combo box, either by using the mouse or the arrow keys. Contrary to GtkComboBox,
        GtkCellRendererCombo::changed is not emitted for changes made to a selected item in
	the entry. The argument new_iter corresponds to the newly selected item in the combo
	box and it is relative to the GtkTreeModel set via the model property on GtkCellRendererCombo.
      </para>
      <para>
	Note that as soon as you change the model displayed in the tree view, the tree view will
	immediately cease the editing operating. This means that you most probably want to refrain
	from changing the model until the combo cell renderer emits the edited or editing_canceled signal.
      </para>
      <note>
	  <para>This method is available in PyGTK 2.14 and above.</para>
      </note>
    </refsect2>
  </refsect1>
</refentry>
