<?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="GtkCellEditable">
<refmeta>
<refentrytitle role="top_of_page" id="GtkCellEditable.top_of_page">GtkCellEditable</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkCellEditable</refname>
<refpurpose>Interface for widgets that can be used for editing cells</refpurpose>
</refnamediv>

<refsect1 id="GtkCellEditable.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="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-cell-editable-start-editing">gtk_cell_editable_start_editing</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-cell-editable-editing-done">gtk_cell_editable_editing_done</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-cell-editable-remove-widget">gtk_cell_editable_remove_widget</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCellEditable.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="GtkCellEditable--editing-canceled">editing-canceled</link></entry><entry role="property_flags">Read / Write</entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCellEditable.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="GtkCellEditable-struct">GtkCellEditable</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkCellEditableIface">GtkCellEditableIface</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCellEditable.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GInterface">GInterface</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkCellEditable
</screen>
</refsect1>
<refsect1 id="GtkCellEditable.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GtkCellEditable requires
 <link linkend="GtkWidget">GtkWidget</link>.</para>

</refsect1>
<refsect1 id="GtkCellEditable.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
GtkCellEditable is implemented by
 <link linkend="GtkComboBox">GtkComboBox</link>,  <link linkend="GtkComboBoxText">GtkComboBoxText</link>,  <link linkend="GtkEntry">GtkEntry</link> and  <link linkend="GtkSpinButton">GtkSpinButton</link>.</para>

</refsect1>

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

<refsect1 id="GtkCellEditable.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkCellEditable"><type>GtkCellEditable</type></link> interface must be implemented for widgets to be usable
to edit the contents of a <link linkend="GtkTreeView"><type>GtkTreeView</type></link> cell. It provides a way to specify how
temporary widgets should be configured for editing, get the new value, etc.</para>

</refsect1>
<refsect1 id="GtkCellEditable.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-cell-editable-start-editing" role="function">
<title>gtk_cell_editable_start_editing&#160;()</title>
<indexterm zone="gtk-cell-editable-start-editing"><primary>gtk_cell_editable_start_editing</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_cell_editable_start_editing (<parameter><link linkend="GtkCellEditable"><type>GtkCellEditable</type></link> *cell_editable</parameter>,
                                 <parameter><link linkend="GdkEvent"><type>GdkEvent</type></link> *event</parameter>);</programlisting>
<para>Begins editing on a <parameter>cell_editable</parameter>
.</para>
<para>The <link linkend="GtkCellRenderer"><type>GtkCellRenderer</type></link> for the cell creates and returns a <link linkend="GtkCellEditable"><type>GtkCellEditable</type></link> from
<link linkend="gtk-cell-renderer-start-editing"><function>gtk_cell_renderer_start_editing()</function></link>, configured for the <link linkend="GtkCellRenderer"><type>GtkCellRenderer</type></link> type.</para>
<para>gtk_cell_editable_start_editing() can then set up <parameter>cell_editable</parameter>
 suitably for
editing a cell, e.g. making the Esc key emit <link linkend="GtkCellEditable-editing-done"><type>“editing-done”</type></link>.</para>
<para>Note that the <parameter>cell_editable</parameter>
 is created on-demand for the current edit; its
lifetime is temporary and does not persist across other edits and/or cells.</para>
<refsect3 id="gtk-cell-editable-start-editing.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>cell_editable</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkCellEditable"><type>GtkCellEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>event</para></entry>
<entry role="parameter_description"><para>The <link linkend="GdkEvent"><type>GdkEvent</type></link> that began the editing process, or
<link linkend="NULL:CAPS"><literal>NULL</literal></link> if editing was initiated programmatically. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-cell-editable-editing-done" role="function">
<title>gtk_cell_editable_editing_done&#160;()</title>
<indexterm zone="gtk-cell-editable-editing-done"><primary>gtk_cell_editable_editing_done</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_cell_editable_editing_done (<parameter><link linkend="GtkCellEditable"><type>GtkCellEditable</type></link> *cell_editable</parameter>);</programlisting>
<para>Emits the <link linkend="GtkCellEditable-editing-done"><type>“editing-done”</type></link> signal.</para>
<refsect3 id="gtk-cell-editable-editing-done.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>cell_editable</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkCellEditable"><type>GtkCellEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-cell-editable-remove-widget" role="function">
<title>gtk_cell_editable_remove_widget&#160;()</title>
<indexterm zone="gtk-cell-editable-remove-widget"><primary>gtk_cell_editable_remove_widget</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_cell_editable_remove_widget (<parameter><link linkend="GtkCellEditable"><type>GtkCellEditable</type></link> *cell_editable</parameter>);</programlisting>
<para>Emits the <link linkend="GtkCellEditable-remove-widget"><type>“remove-widget”</type></link> signal.</para>
<refsect3 id="gtk-cell-editable-remove-widget.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>cell_editable</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkCellEditable"><type>GtkCellEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkCellEditable.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkCellEditable-struct" role="struct">
<title>GtkCellEditable</title>
<indexterm zone="GtkCellEditable-struct"><primary>GtkCellEditable</primary></indexterm>
<programlisting language="C">typedef struct _GtkCellEditable GtkCellEditable;</programlisting>
</refsect2>
<refsect2 id="GtkCellEditableIface" role="struct">
<title>struct GtkCellEditableIface</title>
<indexterm zone="GtkCellEditableIface"><primary>GtkCellEditableIface</primary></indexterm>
<programlisting language="C">struct GtkCellEditableIface {
  /* signals */
  void (* editing_done)  (GtkCellEditable *cell_editable);
  void (* remove_widget) (GtkCellEditable *cell_editable);

  /* virtual table */
  void (* start_editing) (GtkCellEditable *cell_editable,
			  GdkEvent        *event);
};
</programlisting>
<refsect3 id="GtkCellEditableIface.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkCellEditableIface.editing-done">editing_done</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal is a sign for the cell renderer to update its
value from the cell_editable.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkCellEditableIface.remove-widget">remove_widget</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal is meant to indicate that the cell is
finished editing, and the widget may now be destroyed.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkCellEditableIface.start-editing">start_editing</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Begins editing on a cell_editable.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>

</refsect1>
<refsect1 id="GtkCellEditable.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkCellEditable--editing-canceled" role="property"><title>The <literal>“editing-canceled”</literal> property</title>
<indexterm zone="GtkCellEditable--editing-canceled"><primary>GtkCellEditable:editing-canceled</primary></indexterm>
<programlisting>  “editing-canceled”         <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Indicates whether editing on the cell has been canceled.</para>
<para>Owner: GtkCellEditable</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkCellEditable.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkCellEditable-editing-done" role="signal"><title>The <literal>“editing-done”</literal> signal</title>
<indexterm zone="GtkCellEditable-editing-done"><primary>GtkCellEditable::editing-done</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkCellEditable"><type>GtkCellEditable</type></link> *cell_editable,
               <link linkend="gpointer"><type>gpointer</type></link>         user_data)</programlisting>
<para>This signal is a sign for the cell renderer to update its
value from the <parameter>cell_editable</parameter>
.</para>
<para>Implementations of <link linkend="GtkCellEditable"><type>GtkCellEditable</type></link> are responsible for
emitting this signal when they are done editing, e.g.
<link linkend="GtkEntry"><type>GtkEntry</type></link> emits this signal when the user presses Enter. Typical things to
do in a handler for ::editing-done are to capture the edited value,
disconnect the <parameter>cell_editable</parameter>
 from signals on the <link linkend="GtkCellRenderer"><type>GtkCellRenderer</type></link>, etc.</para>
<para>gtk_cell_editable_editing_done() is a convenience method
for emitting <link linkend="GtkCellEditable-editing-done"><type>“editing-done”</type></link>.</para>
<refsect3 id="GtkCellEditable-editing-done.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>cell_editable</para></entry>
<entry role="parameter_description"><para>the object on which the signal was emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkCellEditable-remove-widget" role="signal"><title>The <literal>“remove-widget”</literal> signal</title>
<indexterm zone="GtkCellEditable-remove-widget"><primary>GtkCellEditable::remove-widget</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkCellEditable"><type>GtkCellEditable</type></link> *cell_editable,
               <link linkend="gpointer"><type>gpointer</type></link>         user_data)</programlisting>
<para>This signal is meant to indicate that the cell is finished
editing, and the <parameter>cell_editable</parameter>
 widget is being removed and may
subsequently be destroyed.</para>
<para>Implementations of <link linkend="GtkCellEditable"><type>GtkCellEditable</type></link> are responsible for
emitting this signal when they are done editing. It must
be emitted after the <link linkend="GtkCellEditable-editing-done"><type>“editing-done”</type></link> signal,
to give the cell renderer a chance to update the cell's value
before the widget is removed.</para>
<para>gtk_cell_editable_remove_widget() is a convenience method
for emitting <link linkend="GtkCellEditable-remove-widget"><type>“remove-widget”</type></link>.</para>
<refsect3 id="GtkCellEditable-remove-widget.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>cell_editable</para></entry>
<entry role="parameter_description"><para>the object on which the signal was emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkCellEditable.see-also">
<title>See Also</title>
<para><link linkend="GtkCellRenderer"><type>GtkCellRenderer</type></link></para>

</refsect1>

</refentry>
