<?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="GtkEditableLabel">
<refmeta>
<refentrytitle role="top_of_page" id="GtkEditableLabel.top_of_page">GtkEditableLabel</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkEditableLabel</refname>
<refpurpose>A label that can be edited</refpurpose>
</refnamediv>

<refsect1 id="GtkEditableLabel.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-editable-label-new">gtk_editable_label_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-editable-label-get-editing">gtk_editable_label_get_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-editable-label-start-editing">gtk_editable_label_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-editable-label-stop-editing">gtk_editable_label_stop_editing</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkEditableLabel.actions" role="actions">
<title role="actions.title">Actions</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="actions_none" colwidth="150px"/>
<colspec colname="actions_name" colwidth="300px"/>
<colspec colname="actions_param" colwidth="200px"/>
<tbody>
<row><entry></entry><entry role="action_name"><link linkend="GtkEditableLabel|editing.stop">editing.stop</link></entry><entry role="parameter_type">b</entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkEditableLabel|editing.start">editing.start</link></entry><entry role="parameter_type"></entry></row>

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

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

</refsect1>

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

<refsect1 id="GtkEditableLabel.description" role="desc">
<title role="desc.title">Description</title>
<para>A GtkEditableLabel is a <link linkend="GtkLabel"><type>GtkLabel</type></link> that allows users to
edit the text by switching the widget to an “edit mode”.</para>
<para>GtkEditableLabel does not have API of its own, but it
implements the <link linkend="GtkEditable"><type>GtkEditable</type></link> interface.</para>
<para>The default bindings for activating the edit mode is
to click or press the Enter key. The default bindings
for leaving the edit mode are the Enter key (to save
the results) or the Escape key (to cancel the editing).</para>
<refsect2><title>CSS nodes</title><informalexample><programlisting role="example"><![CDATA[
editablelabel[.editing]
╰── stack
    ├── label
    ╰── text
]]></programlisting></informalexample>
<para></para>
<para>GtkEditableLabel has a main node with the name editablelabel.
When the entry is in editing mode, it gets the .editing style
class.</para>
<para>For all the subnodes added to the text node in various situations,
see <link linkend="GtkText"><type>GtkText</type></link>.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkEditableLabel.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-editable-label-new" role="function">
<title>gtk_editable_label_new&#160;()</title>
<indexterm zone="gtk-editable-label-new"><primary>gtk_editable_label_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_editable_label_new (<parameter>const <link linkend="char"><type>char</type></link> *str</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkEditableLabel"><type>GtkEditableLabel</type></link> widget.</para>
<refsect3 id="gtk-editable-label-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>str</para></entry>
<entry role="parameter_description"><para>the text for the label</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-label-new.returns" role="returns">
<title>Returns</title>
<para> the new <link linkend="GtkEditableLabel"><type>GtkEditableLabel</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-label-get-editing" role="function">
<title>gtk_editable_label_get_editing&#160;()</title>
<indexterm zone="gtk-editable-label-get-editing"><primary>gtk_editable_label_get_editing</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_editable_label_get_editing (<parameter><link linkend="GtkEditableLabel"><type>GtkEditableLabel</type></link> *self</parameter>);</programlisting>
<para>Returns whether the label is currently in “editing mode”.</para>
<refsect3 id="gtk-editable-label-get-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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditableLabel"><type>GtkEditableLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-label-get-editing.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>self</parameter>
is currently in editing mode</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-label-start-editing" role="function">
<title>gtk_editable_label_start_editing&#160;()</title>
<indexterm zone="gtk-editable-label-start-editing"><primary>gtk_editable_label_start_editing</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_label_start_editing (<parameter><link linkend="GtkEditableLabel"><type>GtkEditableLabel</type></link> *self</parameter>);</programlisting>
<para>Switches the label into “editing mode”.</para>
<refsect3 id="gtk-editable-label-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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditableLabel"><type>GtkEditableLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-label-stop-editing" role="function">
<title>gtk_editable_label_stop_editing&#160;()</title>
<indexterm zone="gtk-editable-label-stop-editing"><primary>gtk_editable_label_stop_editing</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_label_stop_editing (<parameter><link linkend="GtkEditableLabel"><type>GtkEditableLabel</type></link> *self</parameter>,
                                 <parameter><link linkend="gboolean"><type>gboolean</type></link> commit</parameter>);</programlisting>
<para>Switches the label out of “editing mode”. If <parameter>commit</parameter>
 is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>,
the resulting text is kept as the <link linkend="GtkEditable--text"><type>“text”</type></link> property
value, otherwise the resulting text is discarded and the label
will keep its previous <link linkend="GtkEditable--text"><type>“text”</type></link> property value.</para>
<refsect3 id="gtk-editable-label-stop-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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditableLabel"><type>GtkEditableLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>commit</para></entry>
<entry role="parameter_description"><para>whether to set the edited text on the label</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

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

</refsect1>
<refsect1 id="GtkEditableLabel.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkEditableLabel--editing" role="property"><title>The <literal>“editing”</literal> property</title>
<indexterm zone="GtkEditableLabel--editing"><primary>GtkEditableLabel:editing</primary></indexterm>
<programlisting>  “editing”                  <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>This property is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> while the widget is in edit mode.</para>
<para>Owner: GtkEditableLabel</para>
<para>Flags: Read</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkEditableLabel.action-details" role="action_details">
<title role="action_details.title">Action Details</title>
<refsect2 id="GtkEditableLabel|editing.stop" role="action"><title>The <literal>“editing.stop”</literal> action</title>
<indexterm zone="GtkEditableLabel|editing.stop"><primary>GtkEditableLabel|editing.stop</primary></indexterm>
<para>Switch the widget out of editing mode. If <parameter>commit</parameter>

is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, then the results of the editing are taken
as the new value of <link linkend="GtkEditable--text"><type>“text”</type></link>.</para>
<para>The default binding for this action is the Escape
key.</para>
<para>This action is disabled when <link linkend="GtkEditableLabel--editing"><type>“editing”</type></link>
is <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>.</para>
<para>Parameter type: b</para>
<refsect3 id="GtkEditableLabel|editing.stop.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>commit</para></entry>
<entry role="parameter_description"><para>Whether the make changes permanent</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GtkEditableLabel|editing.start" role="action"><title>The <literal>“editing.start”</literal> action</title>
<indexterm zone="GtkEditableLabel|editing.start"><primary>GtkEditableLabel|editing.start</primary></indexterm>
<para>Switch the widget into editing mode, so that the
user can make changes to the text.</para>
<para>The default bindings for this action are clicking
on the widget and the Enter key.</para>
<para>This action is disabled when <link linkend="GtkEditableLabel--editing"><type>“editing”</type></link>
is <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkEditableLabel.see-also">
<title>See Also</title>
<para><link linkend="GtkEditable"><type>GtkEditable</type></link>, <link linkend="GtkLabel"><type>GtkLabel</type></link>, <link linkend="GtkEntry"><type>GtkEntry</type></link></para>

</refsect1>

</refentry>
