<?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="GtkEditable">
<refmeta>
<refentrytitle role="top_of_page" id="GtkEditable.top_of_page">GtkEditable</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkEditable</refname>
<refpurpose>Interface for text-editing widgets</refpurpose>
</refnamediv>

<refsect1 id="GtkEditable.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">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-editable-get-text">gtk_editable_get_text</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-set-text">gtk_editable_set_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-editable-get-chars">gtk_editable_get_chars</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-insert-text">gtk_editable_insert_text</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-delete-text">gtk_editable_delete_text</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-get-selection-bounds">gtk_editable_get_selection_bounds</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-select-region">gtk_editable_select_region</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-delete-selection">gtk_editable_delete_selection</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-set-position">gtk_editable_set_position</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-editable-get-position">gtk_editable_get_position</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-set-editable">gtk_editable_set_editable</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-get-editable">gtk_editable_get_editable</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-set-alignment">gtk_editable_set_alignment</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="float"><returnvalue>float</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-editable-get-alignment">gtk_editable_get_alignment</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-editable-get-width-chars">gtk_editable_get_width_chars</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-set-width-chars">gtk_editable_set_width_chars</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-editable-get-max-width-chars">gtk_editable_get_max_width_chars</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-set-max-width-chars">gtk_editable_set_max_width_chars</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-get-enable-undo">gtk_editable_get_enable_undo</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-set-enable-undo">gtk_editable_set_enable_undo</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-editable-install-properties">gtk_editable_install_properties</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-init-delegate">gtk_editable_init_delegate</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-finish-delegate">gtk_editable_finish_delegate</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-delegate-set-property">gtk_editable_delegate_set_property</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-delegate-get-property">gtk_editable_delegate_get_property</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkEditable.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="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkEditable--cursor-position">cursor-position</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkEditable--editable">editable</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkEditable--enable-undo">enable-undo</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkEditable--max-width-chars">max-width-chars</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkEditable--selection-bound">selection-bound</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkEditable--text">text</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkEditable--width-chars">width-chars</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gfloat"><type>gfloat</type></link></entry><entry role="property_name"><link linkend="GtkEditable--xalign">xalign</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkEditable.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="GtkEditable-changed">changed</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="GtkEditable-delete-text">delete-text</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="GtkEditable-insert-text">insert-text</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkEditable.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> GtkEditable
</screen>
</refsect1>
<refsect1 id="GtkEditable.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GtkEditable requires
 <link linkend="GtkWidget">GtkWidget</link>.</para>

</refsect1>
<refsect1 id="GtkEditable.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
GtkEditable is implemented by
 <link linkend="GtkEntry">GtkEntry</link>,  <link linkend="GtkPasswordEntry">GtkPasswordEntry</link>,  <link linkend="GtkSearchEntry">GtkSearchEntry</link>,  <link linkend="GtkSpinButton">GtkSpinButton</link> and  <link linkend="GtkText">GtkText</link>.</para>

</refsect1>

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

<refsect1 id="GtkEditable.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkEditable"><type>GtkEditable</type></link> interface is an interface which should be implemented by
text editing widgets, such as <link linkend="GtkEntry"><type>GtkEntry</type></link> and <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>. It contains functions
for generically manipulating an editable widget, a large number of action
signals used for key bindings, and several signals that an application can
connect to to modify the behavior of a widget.</para>
<para>As an example of the latter usage, by connecting
the following handler to <link linkend="GtkEditable-insert-text"><type>“insert-text”</type></link>, an application
can convert all entry into a widget into uppercase.</para>
<refsect3><title>Forcing entry to uppercase.</title><informalexample><programlisting role="example"><![CDATA[
#include <ctype.h>;

void
insert_text_handler (GtkEditable *editable,
                     const char  *text,
                     int          length,
                     int         *position,
                     gpointer     data)
{
  char *result = g_utf8_strup (text, length);

  g_signal_handlers_block_by_func (editable,
                               (gpointer) insert_text_handler, data);
  gtk_editable_insert_text (editable, result, length, position);
  g_signal_handlers_unblock_by_func (editable,
                                     (gpointer) insert_text_handler, data);

  g_signal_stop_emission_by_name (editable, "insert_text");

  g_free (result);
}
]]></programlisting></informalexample>
<para></para>
</refsect3>
<refsect3><title>Implementing GtkEditable</title><para>The most likely scenario for implementing GtkEditable on your own widget
is that you will embed a <link linkend="GtkText"><type>GtkText</type></link> inside a complex widget, and want to
delegate the editable functionality to that text widget. GtkEditable
provides some utility functions to make this easy.</para>
<para>In your class_init function, call <link linkend="gtk-editable-install-properties"><function>gtk_editable_install_properties()</function></link>,
passing the first available property ID:</para>
<informalexample><programlisting role="example"><![CDATA[
static void
my_class_init (MyClass *class)
{
   ...
   g_object_class_install_properties (object_class, NUM_PROPERTIES, props);
   gtk_editable_install_properties (object_clas, NUM_PROPERTIES);
   ...
}
]]></programlisting></informalexample>
<para></para>
<para>In your interface_init function for the GtkEditable interface, provide
an implementation for the get_delegate vfunc that returns your text widget:</para>
<informalexample><programlisting role="example"><![CDATA[
GtkEditable *
get_editable_delegate (GtkEditable *editable)
{
  return GTK_EDITABLE (MY_WIDGET (editable)->text_widget);
}

static void
my_editable_init (GtkEditableInterface *iface)
{
  iface->get_delegate = get_editable_delegate;
}
]]></programlisting></informalexample>
<para></para>
<para>You don't need to provide any other vfuncs. The default implementations
work by forwarding to the delegate that the <link linkend="GtkEditableInterface.get-delegate"><function>GtkEditableInterface.get_delegate()</function></link>
vfunc returns.</para>
<para>In your instance_init function, create your text widget, and then call
<link linkend="gtk-editable-init-delegate"><function>gtk_editable_init_delegate()</function></link>:</para>
<informalexample><programlisting role="example"><![CDATA[
static void
my_widget_init (MyWidget *self)
{
  ...
  self->text_widget = gtk_text_new ();
  gtk_editable_init_delegate (GTK_EDITABLE (self));
  ...
}
]]></programlisting></informalexample>
<para></para>
<para>In your dispose function, call <link linkend="gtk-editable-finish-delegate"><function>gtk_editable_finish_delegate()</function></link> before
destroying your text widget:</para>
<informalexample><programlisting role="example"><![CDATA[
static void
my_widget_dispose (GObject *object)
{
  ...
  gtk_editable_finish_delegate (GTK_EDITABLE (self));
  g_clear_pointer (&self->text_widget, gtk_widget_unparent);
  ...
}
]]></programlisting></informalexample>
<para></para>
<para>Finally, use <link linkend="gtk-editable-delegate-set-property"><function>gtk_editable_delegate_set_property()</function></link> in your set_property
function (and similar for get_property), to set the editable properties:</para>
<informalexample><programlisting role="example"><![CDATA[
  ...
  if (gtk_editable_delegate_set_property (object, prop_id, value, pspec))
    return;

  switch (prop_id)
  ...
]]></programlisting></informalexample>
<para></para>
</refsect3>

</refsect1>
<refsect1 id="GtkEditable.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-editable-get-text" role="function">
<title>gtk_editable_get_text&#160;()</title>
<indexterm zone="gtk-editable-get-text"><primary>gtk_editable_get_text</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_editable_get_text (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Retrieves the contents of <parameter>editable</parameter>
. The returned string is
owned by GTK and must not be modified or freed.</para>
<refsect3 id="gtk-editable-get-text.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-get-text.returns" role="returns">
<title>Returns</title>
<para>a pointer to the contents of the editable. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-set-text" role="function">
<title>gtk_editable_set_text&#160;()</title>
<indexterm zone="gtk-editable-set-text"><primary>gtk_editable_set_text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_set_text (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                       <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>);</programlisting>
<para>Sets the text in the editable to the given value,
replacing the current contents.</para>
<refsect3 id="gtk-editable-set-text.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>the text to set</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-get-chars" role="function">
<title>gtk_editable_get_chars&#160;()</title>
<indexterm zone="gtk-editable-get-chars"><primary>gtk_editable_get_chars</primary></indexterm>
<programlisting language="C"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_editable_get_chars (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                        <parameter><link linkend="int"><type>int</type></link> start_pos</parameter>,
                        <parameter><link linkend="int"><type>int</type></link> end_pos</parameter>);</programlisting>
<para>Retrieves a sequence of characters. The characters that are retrieved 
are those characters at positions from <parameter>start_pos</parameter>
 up to, but not 
including <parameter>end_pos</parameter>
. If <parameter>end_pos</parameter>
 is negative, then the characters
retrieved are those characters from <parameter>start_pos</parameter>
 to the end of the text.</para>
<para>Note that positions are specified in characters, not bytes.</para>
<refsect3 id="gtk-editable-get-chars.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start_pos</para></entry>
<entry role="parameter_description"><para>start of text</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end_pos</para></entry>
<entry role="parameter_description"><para>end of text</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-get-chars.returns" role="returns">
<title>Returns</title>
<para>a pointer to the contents of the widget as a
string. This string is allocated by the <link linkend="GtkEditable"><type>GtkEditable</type></link>
implementation and should be freed by the caller. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-insert-text" role="function">
<title>gtk_editable_insert_text&#160;()</title>
<indexterm zone="gtk-editable-insert-text"><primary>gtk_editable_insert_text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_insert_text (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                          <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>,
                          <parameter><link linkend="int"><type>int</type></link> length</parameter>,
                          <parameter><link linkend="int"><type>int</type></link> *position</parameter>);</programlisting>
<para>Inserts <parameter>length</parameter>
 bytes of <parameter>text</parameter>
 into the contents of the
widget, at position <parameter>position</parameter>
.</para>
<para>Note that the position is in characters, not in bytes. 
The function updates <parameter>position</parameter>
 to point after the newly inserted text.</para>

<para><emphasis role="annotation">[<acronym>virtual</acronym> do_insert_text]</emphasis></para><refsect3 id="gtk-editable-insert-text.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>the text to append</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>length</para></entry>
<entry role="parameter_description"><para>the length of the text in bytes, or -1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>location of the position text will be inserted at. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>inout</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-delete-text" role="function">
<title>gtk_editable_delete_text&#160;()</title>
<indexterm zone="gtk-editable-delete-text"><primary>gtk_editable_delete_text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_delete_text (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                          <parameter><link linkend="int"><type>int</type></link> start_pos</parameter>,
                          <parameter><link linkend="int"><type>int</type></link> end_pos</parameter>);</programlisting>
<para>Deletes a sequence of characters. The characters that are deleted are 
those characters at positions from <parameter>start_pos</parameter>
 up to, but not including 
<parameter>end_pos</parameter>
. If <parameter>end_pos</parameter>
 is negative, then the characters deleted
are those from <parameter>start_pos</parameter>
 to the end of the text.</para>
<para>Note that the positions are specified in characters, not bytes.</para>

<para><emphasis role="annotation">[<acronym>virtual</acronym> do_delete_text]</emphasis></para><refsect3 id="gtk-editable-delete-text.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start_pos</para></entry>
<entry role="parameter_description"><para>start position</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end_pos</para></entry>
<entry role="parameter_description"><para>end position</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-get-selection-bounds" role="function">
<title>gtk_editable_get_selection_bounds&#160;()</title>
<indexterm zone="gtk-editable-get-selection-bounds"><primary>gtk_editable_get_selection_bounds</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_editable_get_selection_bounds (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                                   <parameter><link linkend="int"><type>int</type></link> *start_pos</parameter>,
                                   <parameter><link linkend="int"><type>int</type></link> *end_pos</parameter>);</programlisting>
<para>Retrieves the selection bound of the editable.</para>
<para><parameter>start_pos</parameter>
 will be filled with the start of the selection and
<parameter>end_pos</parameter>
 with end. If no text was selected both will be identical
and <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> will be returned.</para>
<para>Note that positions are specified in characters, not bytes.</para>
<refsect3 id="gtk-editable-get-selection-bounds.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start_pos</para></entry>
<entry role="parameter_description"><para>location to store the starting position, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>end_pos</para></entry>
<entry role="parameter_description"><para>location to store the end position, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-get-selection-bounds.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if there is a non-empty selection, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-select-region" role="function">
<title>gtk_editable_select_region&#160;()</title>
<indexterm zone="gtk-editable-select-region"><primary>gtk_editable_select_region</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_select_region (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                            <parameter><link linkend="int"><type>int</type></link> start_pos</parameter>,
                            <parameter><link linkend="int"><type>int</type></link> end_pos</parameter>);</programlisting>
<para>Selects a region of text.</para>
<para>The characters that are selected are those characters at positions
from <parameter>start_pos</parameter>
 up to, but not including <parameter>end_pos</parameter>
. If <parameter>end_pos</parameter>
 is
negative, then the characters selected are those characters from
<parameter>start_pos</parameter>
 to  the end of the text.</para>
<para>Note that positions are specified in characters, not bytes.</para>

<para><emphasis role="annotation">[<acronym>virtual</acronym> set_selection_bounds]</emphasis></para><refsect3 id="gtk-editable-select-region.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start_pos</para></entry>
<entry role="parameter_description"><para>start of region</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end_pos</para></entry>
<entry role="parameter_description"><para>end of region</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-delete-selection" role="function">
<title>gtk_editable_delete_selection&#160;()</title>
<indexterm zone="gtk-editable-delete-selection"><primary>gtk_editable_delete_selection</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_delete_selection (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Deletes the currently selected text of the editable.
This call doesn’t do anything if there is no selected text.</para>
<refsect3 id="gtk-editable-delete-selection.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-set-position" role="function">
<title>gtk_editable_set_position&#160;()</title>
<indexterm zone="gtk-editable-set-position"><primary>gtk_editable_set_position</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_set_position (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                           <parameter><link linkend="int"><type>int</type></link> position</parameter>);</programlisting>
<para>Sets the cursor position in the editable to the given value.</para>
<para>The cursor is displayed before the character with the given (base 0) 
index in the contents of the editable. The value must be less than or 
equal to the number of characters in the editable. A value of -1 
indicates that the position should be set after the last character 
of the editable. Note that <parameter>position</parameter>
 is in characters, not in bytes.</para>
<refsect3 id="gtk-editable-set-position.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>the position of the cursor </para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-get-position" role="function">
<title>gtk_editable_get_position&#160;()</title>
<indexterm zone="gtk-editable-get-position"><primary>gtk_editable_get_position</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
gtk_editable_get_position (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Retrieves the current position of the cursor relative to the start
of the content of the editable. </para>
<para>Note that this position is in characters, not in bytes.</para>
<refsect3 id="gtk-editable-get-position.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-get-position.returns" role="returns">
<title>Returns</title>
<para> the cursor position</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-set-editable" role="function">
<title>gtk_editable_set_editable&#160;()</title>
<indexterm zone="gtk-editable-set-editable"><primary>gtk_editable_set_editable</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_set_editable (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                           <parameter><link linkend="gboolean"><type>gboolean</type></link> is_editable</parameter>);</programlisting>
<para>Determines if the user can edit the text
in the editable widget or not.</para>
<refsect3 id="gtk-editable-set-editable.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>is_editable</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the user is allowed to edit the text
in the widget</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-get-editable" role="function">
<title>gtk_editable_get_editable&#160;()</title>
<indexterm zone="gtk-editable-get-editable"><primary>gtk_editable_get_editable</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_editable_get_editable (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Retrieves whether <parameter>editable</parameter>
 is editable.
See <link linkend="gtk-editable-set-editable"><function>gtk_editable_set_editable()</function></link>.</para>
<refsect3 id="gtk-editable-get-editable.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-get-editable.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>editable</parameter>
is editable.</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-set-alignment" role="function">
<title>gtk_editable_set_alignment&#160;()</title>
<indexterm zone="gtk-editable-set-alignment"><primary>gtk_editable_set_alignment</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_set_alignment (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                            <parameter><link linkend="float"><type>float</type></link> xalign</parameter>);</programlisting>
<para>Sets the alignment for the contents of the editable.</para>
<para>This controls the horizontal positioning of the contents when
the displayed text is shorter than the width of the editable.</para>
<refsect3 id="gtk-editable-set-alignment.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>xalign</para></entry>
<entry role="parameter_description"><para>The horizontal alignment, from 0 (left) to 1 (right).
Reversed for RTL layouts</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-get-alignment" role="function">
<title>gtk_editable_get_alignment&#160;()</title>
<indexterm zone="gtk-editable-get-alignment"><primary>gtk_editable_get_alignment</primary></indexterm>
<programlisting language="C"><link linkend="float"><returnvalue>float</returnvalue></link>
gtk_editable_get_alignment (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Gets the value set by <link linkend="gtk-editable-set-alignment"><function>gtk_editable_set_alignment()</function></link>.</para>
<refsect3 id="gtk-editable-get-alignment.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-get-alignment.returns" role="returns">
<title>Returns</title>
<para> the alignment</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-get-width-chars" role="function">
<title>gtk_editable_get_width_chars&#160;()</title>
<indexterm zone="gtk-editable-get-width-chars"><primary>gtk_editable_get_width_chars</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
gtk_editable_get_width_chars (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Gets the value set by <link linkend="gtk-editable-set-width-chars"><function>gtk_editable_set_width_chars()</function></link>.</para>
<refsect3 id="gtk-editable-get-width-chars.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-get-width-chars.returns" role="returns">
<title>Returns</title>
<para> number of chars to request space for, or negative if unset</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-set-width-chars" role="function">
<title>gtk_editable_set_width_chars&#160;()</title>
<indexterm zone="gtk-editable-set-width-chars"><primary>gtk_editable_set_width_chars</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_set_width_chars (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                              <parameter><link linkend="int"><type>int</type></link> n_chars</parameter>);</programlisting>
<para>Changes the size request of the editable to be about the
right size for <parameter>n_chars</parameter>
 characters.</para>
<para>Note that it changes the size request, the size can still
be affected by how you pack the widget into containers.
If <parameter>n_chars</parameter>
 is -1, the size reverts to the default size.</para>
<refsect3 id="gtk-editable-set-width-chars.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>n_chars</para></entry>
<entry role="parameter_description"><para>width in chars</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-get-max-width-chars" role="function">
<title>gtk_editable_get_max_width_chars&#160;()</title>
<indexterm zone="gtk-editable-get-max-width-chars"><primary>gtk_editable_get_max_width_chars</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
gtk_editable_get_max_width_chars (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Retrieves the desired maximum width of <parameter>editable</parameter>
, in characters.
See <link linkend="gtk-editable-set-max-width-chars"><function>gtk_editable_set_max_width_chars()</function></link>.</para>
<refsect3 id="gtk-editable-get-max-width-chars.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-get-max-width-chars.returns" role="returns">
<title>Returns</title>
<para> the maximum width of the entry, in characters</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-set-max-width-chars" role="function">
<title>gtk_editable_set_max_width_chars&#160;()</title>
<indexterm zone="gtk-editable-set-max-width-chars"><primary>gtk_editable_set_max_width_chars</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_set_max_width_chars (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                                  <parameter><link linkend="int"><type>int</type></link> n_chars</parameter>);</programlisting>
<para>Sets the desired maximum width in characters of <parameter>editable</parameter>
.</para>
<refsect3 id="gtk-editable-set-max-width-chars.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>n_chars</para></entry>
<entry role="parameter_description"><para>the new desired maximum width, in characters</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-get-enable-undo" role="function">
<title>gtk_editable_get_enable_undo&#160;()</title>
<indexterm zone="gtk-editable-get-enable-undo"><primary>gtk_editable_get_enable_undo</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_editable_get_enable_undo (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Gets if undo/redo actions are enabled for <parameter>editable</parameter>
</para>
<refsect3 id="gtk-editable-get-enable-undo.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-get-enable-undo.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if undo is enabled</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-set-enable-undo" role="function">
<title>gtk_editable_set_enable_undo&#160;()</title>
<indexterm zone="gtk-editable-set-enable-undo"><primary>gtk_editable_set_enable_undo</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_set_enable_undo (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>,
                              <parameter><link linkend="gboolean"><type>gboolean</type></link> enable_undo</parameter>);</programlisting>
<para>If enabled, changes to <parameter>editable</parameter>
 will be saved for undo/redo actions.</para>
<para>This results in an additional copy of text changes and are not stored in
secure memory. As such, undo is forcefully disabled when <link linkend="GtkText--visibility"><type>“visibility”</type></link>
is set to <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>.</para>
<refsect3 id="gtk-editable-set-enable-undo.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>enable_undo</para></entry>
<entry role="parameter_description"><para>if undo/redo should be enabled</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-install-properties" role="function">
<title>gtk_editable_install_properties&#160;()</title>
<indexterm zone="gtk-editable-install-properties"><primary>gtk_editable_install_properties</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_editable_install_properties (<parameter><link linkend="GObjectClass"><type>GObjectClass</type></link> *object_class</parameter>,
                                 <parameter><link linkend="guint"><type>guint</type></link> first_prop</parameter>);</programlisting>
<para>Installs the GtkEditable properties for <parameter>class</parameter>
.</para>
<para>This is a helper function that should be called in class_init,
after installing your own properties.</para>
<para>To handle the properties in your set_property and get_property
functions, you can either use <link linkend="gtk-editable-delegate-set-property"><function>gtk_editable_delegate_set_property()</function></link>
and <link linkend="gtk-editable-delegate-get-property"><function>gtk_editable_delegate_get_property()</function></link> (if you are using a delegate),
or remember the <parameter>first_prop</parameter>
 offset and add it to the values in the
<link linkend="GtkEditableProperties"><type>GtkEditableProperties</type></link> enumeration to get the property IDs for these
properties.</para>
<refsect3 id="gtk-editable-install-properties.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>object_class</para></entry>
<entry role="parameter_description"><para>a <link linkend="GObjectClass"><type>GObjectClass</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>first_prop</para></entry>
<entry role="parameter_description"><para>property ID to use for the first property</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-install-properties.returns" role="returns">
<title>Returns</title>
<para> the number of properties that were installed</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-init-delegate" role="function">
<title>gtk_editable_init_delegate&#160;()</title>
<indexterm zone="gtk-editable-init-delegate"><primary>gtk_editable_init_delegate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_init_delegate (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Sets up a delegate for <link linkend="GtkEditable"><type>GtkEditable</type></link>, assuming that the
get_delegate vfunc in the <link linkend="GtkEditable"><type>GtkEditable</type></link> interface has been
set up for the <parameter>editable</parameter>
's type.</para>
<para>This is a helper function that should be called in instance init,
after creating the delegate object.</para>
<refsect3 id="gtk-editable-init-delegate.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-finish-delegate" role="function">
<title>gtk_editable_finish_delegate&#160;()</title>
<indexterm zone="gtk-editable-finish-delegate"><primary>gtk_editable_finish_delegate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_editable_finish_delegate (<parameter><link linkend="GtkEditable"><type>GtkEditable</type></link> *editable</parameter>);</programlisting>
<para>Undoes the setup done by <link linkend="gtk-editable-init-delegate"><function>gtk_editable_init_delegate()</function></link>.</para>
<para>This is a helper function that should be called from dispose,
before removing the delegate object.</para>
<refsect3 id="gtk-editable-finish-delegate.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>editable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEditable"><type>GtkEditable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-editable-delegate-set-property" role="function">
<title>gtk_editable_delegate_set_property&#160;()</title>
<indexterm zone="gtk-editable-delegate-set-property"><primary>gtk_editable_delegate_set_property</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_editable_delegate_set_property (<parameter><link linkend="GObject"><type>GObject</type></link> *object</parameter>,
                                    <parameter><link linkend="guint"><type>guint</type></link> prop_id</parameter>,
                                    <parameter>const <link linkend="GValue"><type>GValue</type></link> *value</parameter>,
                                    <parameter><link linkend="GParamSpec"><type>GParamSpec</type></link> *pspec</parameter>);</programlisting>
<para>Sets a property on the <link linkend="GtkEditable"><type>GtkEditable</type></link> delegate for <parameter>object</parameter>
.</para>
<para>This is a helper function that should be called in set_property,
before handling your own properties.</para>
<refsect3 id="gtk-editable-delegate-set-property.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>object</para></entry>
<entry role="parameter_description"><para>a <link linkend="GObject"><type>GObject</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>prop_id</para></entry>
<entry role="parameter_description"><para>a property ID</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>value to set</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>pspec</para></entry>
<entry role="parameter_description"><para>the <link linkend="GParamSpec"><type>GParamSpec</type></link> for the property</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-delegate-set-property.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the property was found</para>
</refsect3></refsect2>
<refsect2 id="gtk-editable-delegate-get-property" role="function">
<title>gtk_editable_delegate_get_property&#160;()</title>
<indexterm zone="gtk-editable-delegate-get-property"><primary>gtk_editable_delegate_get_property</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_editable_delegate_get_property (<parameter><link linkend="GObject"><type>GObject</type></link> *object</parameter>,
                                    <parameter><link linkend="guint"><type>guint</type></link> prop_id</parameter>,
                                    <parameter><link linkend="GValue"><type>GValue</type></link> *value</parameter>,
                                    <parameter><link linkend="GParamSpec"><type>GParamSpec</type></link> *pspec</parameter>);</programlisting>
<para>Gets a property of the <link linkend="GtkEditable"><type>GtkEditable</type></link> delegate for <parameter>object</parameter>
.</para>
<para>This is helper function that should be called in get_property,
before handling your own properties.</para>
<refsect3 id="gtk-editable-delegate-get-property.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>object</para></entry>
<entry role="parameter_description"><para>a <link linkend="GObject"><type>GObject</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>prop_id</para></entry>
<entry role="parameter_description"><para>a property ID</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>value to set</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>pspec</para></entry>
<entry role="parameter_description"><para>the <link linkend="GParamSpec"><type>GParamSpec</type></link> for the property</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-editable-delegate-get-property.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the property was found</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkEditable.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkEditable-struct" role="struct">
<title>GtkEditable</title>
<indexterm zone="GtkEditable-struct"><primary>GtkEditable</primary></indexterm>
<programlisting language="C">typedef struct _GtkEditable GtkEditable;</programlisting>
</refsect2>
<refsect2 id="GtkEditableInterface" role="struct">
<title>struct GtkEditableInterface</title>
<indexterm zone="GtkEditableInterface"><primary>GtkEditableInterface</primary></indexterm>
<programlisting language="C">struct GtkEditableInterface {
  GTypeInterface                   base_iface;

  /* signals */
  void (* insert_text)              (GtkEditable    *editable,
                                     const gchar    *text,
                                     int             length,
                                     int            *position);
  void (* delete_text)              (GtkEditable    *editable,
                                     int             start_pos,
                                     int             end_pos);
  void (* changed)                  (GtkEditable    *editable);

  /* vtable */
  const char * (* get_text)         (GtkEditable    *editable);
  void     (* do_insert_text)       (GtkEditable    *editable,
                                     const char     *text,
                                     int             length,
                                     int            *position);
  void     (* do_delete_text)       (GtkEditable    *editable,
                                     int             start_pos,
                                     int             end_pos);

  gboolean (* get_selection_bounds) (GtkEditable    *editable,
                                     int            *start_pos,
                                     int            *end_pos);
  void     (* set_selection_bounds) (GtkEditable    *editable,
                                     int             start_pos,
                                     int             end_pos);
  GtkEditable * (* get_delegate)    (GtkEditable    *editable);
};
</programlisting>
</refsect2>
<refsect2 id="GtkEditableProperties" role="enum">
<title>enum GtkEditableProperties</title>
<indexterm zone="GtkEditableProperties"><primary>GtkEditableProperties</primary></indexterm>
<refsect3 id="GtkEditableProperties.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EDITABLE-PROP-TEXT:CAPS">GTK_EDITABLE_PROP_TEXT</para></entry>
<entry /><entry />
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EDITABLE-PROP-CURSOR-POSITION:CAPS">GTK_EDITABLE_PROP_CURSOR_POSITION</para></entry>
<entry /><entry />
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EDITABLE-PROP-SELECTION-BOUND:CAPS">GTK_EDITABLE_PROP_SELECTION_BOUND</para></entry>
<entry /><entry />
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EDITABLE-PROP-EDITABLE:CAPS">GTK_EDITABLE_PROP_EDITABLE</para></entry>
<entry /><entry />
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EDITABLE-PROP-WIDTH-CHARS:CAPS">GTK_EDITABLE_PROP_WIDTH_CHARS</para></entry>
<entry /><entry />
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EDITABLE-PROP-MAX-WIDTH-CHARS:CAPS">GTK_EDITABLE_PROP_MAX_WIDTH_CHARS</para></entry>
<entry /><entry />
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EDITABLE-PROP-XALIGN:CAPS">GTK_EDITABLE_PROP_XALIGN</para></entry>
<entry /><entry />
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EDITABLE-PROP-ENABLE-UNDO:CAPS">GTK_EDITABLE_PROP_ENABLE_UNDO</para></entry>
<entry /><entry />
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-EDITABLE-NUM-PROPERTIES:CAPS">GTK_EDITABLE_NUM_PROPERTIES</para></entry>
<entry /><entry />
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkEditable.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkEditable--cursor-position" role="property"><title>The <literal>“cursor-position”</literal> property</title>
<indexterm zone="GtkEditable--cursor-position"><primary>GtkEditable:cursor-position</primary></indexterm>
<programlisting>  “cursor-position”          <link linkend="gint"><type>gint</type></link></programlisting>
<para>The current position of the insertion cursor in chars.</para><para>Owner: GtkEditable</para>
<para>Flags: Read</para>
<para>Allowed values: [0,65535]</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkEditable--editable" role="property"><title>The <literal>“editable”</literal> property</title>
<indexterm zone="GtkEditable--editable"><primary>GtkEditable:editable</primary></indexterm>
<programlisting>  “editable”                 <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether the entry contents can be edited.</para><para>Owner: GtkEditable</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkEditable--enable-undo" role="property"><title>The <literal>“enable-undo”</literal> property</title>
<indexterm zone="GtkEditable--enable-undo"><primary>GtkEditable:enable-undo</primary></indexterm>
<programlisting>  “enable-undo”              <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If undo/redo should be enabled for the editable.</para><para>Owner: GtkEditable</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkEditable--max-width-chars" role="property"><title>The <literal>“max-width-chars”</literal> property</title>
<indexterm zone="GtkEditable--max-width-chars"><primary>GtkEditable:max-width-chars</primary></indexterm>
<programlisting>  “max-width-chars”          <link linkend="gint"><type>gint</type></link></programlisting>
<para>The desired maximum width of the entry, in characters.</para><para>Owner: GtkEditable</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &gt;= -1</para>
<para>Default value: -1</para>
</refsect2>
<refsect2 id="GtkEditable--selection-bound" role="property"><title>The <literal>“selection-bound”</literal> property</title>
<indexterm zone="GtkEditable--selection-bound"><primary>GtkEditable:selection-bound</primary></indexterm>
<programlisting>  “selection-bound”          <link linkend="gint"><type>gint</type></link></programlisting>
<para>The position of the opposite end of the selection from the cursor in chars.</para><para>Owner: GtkEditable</para>
<para>Flags: Read</para>
<para>Allowed values: [0,65535]</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkEditable--text" role="property"><title>The <literal>“text”</literal> property</title>
<indexterm zone="GtkEditable--text"><primary>GtkEditable:text</primary></indexterm>
<programlisting>  “text”                     <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The contents of the entry.</para><para>Owner: GtkEditable</para>
<para>Flags: Read / Write</para>
<para>Default value: ""</para>
</refsect2>
<refsect2 id="GtkEditable--width-chars" role="property"><title>The <literal>“width-chars”</literal> property</title>
<indexterm zone="GtkEditable--width-chars"><primary>GtkEditable:width-chars</primary></indexterm>
<programlisting>  “width-chars”              <link linkend="gint"><type>gint</type></link></programlisting>
<para>Number of characters to leave space for in the entry.</para><para>Owner: GtkEditable</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &gt;= -1</para>
<para>Default value: -1</para>
</refsect2>
<refsect2 id="GtkEditable--xalign" role="property"><title>The <literal>“xalign”</literal> property</title>
<indexterm zone="GtkEditable--xalign"><primary>GtkEditable:xalign</primary></indexterm>
<programlisting>  “xalign”                   <link linkend="gfloat"><type>gfloat</type></link></programlisting>
<para>The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.</para><para>Owner: GtkEditable</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [0,1]</para>
<para>Default value: 0</para>
</refsect2>

</refsect1>
<refsect1 id="GtkEditable.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkEditable-changed" role="signal"><title>The <literal>“changed”</literal> signal</title>
<indexterm zone="GtkEditable-changed"><primary>GtkEditable::changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkEditable"><type>GtkEditable</type></link> *editable,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>The ::changed signal is emitted at the end of a single
user-visible operation on the contents of the <link linkend="GtkEditable"><type>GtkEditable</type></link>.</para>
<para>E.g., a paste operation that replaces the contents of the
selection will cause only one signal emission (even though it
is implemented by first deleting the selection, then inserting
the new content, and may cause multiple ::notify::text signals
to be emitted).</para>
<refsect3 id="GtkEditable-changed.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>editable</para></entry>
<entry role="parameter_description"><para>the object which received the signal</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="GtkEditable-delete-text" role="signal"><title>The <literal>“delete-text”</literal> signal</title>
<indexterm zone="GtkEditable-delete-text"><primary>GtkEditable::delete-text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkEditable"><type>GtkEditable</type></link> *editable,
               <link linkend="gint"><type>gint</type></link>         start_pos,
               <link linkend="gint"><type>gint</type></link>         end_pos,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>This signal is emitted when text is deleted from
the widget by the user. The default handler for
this signal will normally be responsible for deleting
the text, so by connecting to this signal and then
stopping the signal with <link linkend="g-signal-stop-emission"><function>g_signal_stop_emission()</function></link>, it
is possible to modify the range of deleted text, or
prevent it from being deleted entirely. The <parameter>start_pos</parameter>

and <parameter>end_pos</parameter>
 parameters are interpreted as for
<link linkend="gtk-editable-delete-text"><function>gtk_editable_delete_text()</function></link>.</para>
<refsect3 id="GtkEditable-delete-text.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>editable</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start_pos</para></entry>
<entry role="parameter_description"><para>the starting position</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end_pos</para></entry>
<entry role="parameter_description"><para>the end position</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="GtkEditable-insert-text" role="signal"><title>The <literal>“insert-text”</literal> signal</title>
<indexterm zone="GtkEditable-insert-text"><primary>GtkEditable::insert-text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkEditable"><type>GtkEditable</type></link> *editable,
               <link linkend="gchar"><type>gchar</type></link>       *text,
               <link linkend="gint"><type>gint</type></link>         length,
               <link linkend="gpointer"><type>gpointer</type></link>     position,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>This signal is emitted when text is inserted into
the widget by the user. The default handler for
this signal will normally be responsible for inserting
the text, so by connecting to this signal and then
stopping the signal with <link linkend="g-signal-stop-emission"><function>g_signal_stop_emission()</function></link>, it
is possible to modify the inserted text, or prevent
it from being inserted entirely.</para>
<refsect3 id="GtkEditable-insert-text.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>editable</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>the new text to insert</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>length</para></entry>
<entry role="parameter_description"><para>the length of the new text, in bytes,
or -1 if new_text is nul-terminated</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>the position, in characters,
at which to insert the new text. this is an in-out
parameter.  After the signal emission is finished, it
should point after the newly inserted text. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>inout</acronym>][<acronym>type</acronym> int]</emphasis></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>

</refentry>
