<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
<refentry id="GtkEditable">
<refmeta>
<refentrytitle role="top_of_page" id="GtkEditable.top_of_page">GtkEditable</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkEditable</refname>
<refpurpose>Interface for text-editing widgets</refpurpose>
</refnamediv>

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

<synopsis>

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

                    <link linkend="GtkEditable-struct">GtkEditable</link>;
<link linkend="void">void</link>                <link linkend="gtk-editable-select-region">gtk_editable_select_region</link>          (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> start_pos,
                                                         <link linkend="gint">gint</link> end_pos);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-editable-get-selection-bounds">gtk_editable_get_selection_bounds</link>   (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> *start_pos,
                                                         <link linkend="gint">gint</link> *end_pos);
<link linkend="void">void</link>                <link linkend="gtk-editable-insert-text">gtk_editable_insert_text</link>            (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         const <link linkend="gchar">gchar</link> *new_text,
                                                         <link linkend="gint">gint</link> new_text_length,
                                                         <link linkend="gint">gint</link> *position);
<link linkend="void">void</link>                <link linkend="gtk-editable-delete-text">gtk_editable_delete_text</link>            (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> start_pos,
                                                         <link linkend="gint">gint</link> end_pos);
<link linkend="gchar">gchar</link>*              <link linkend="gtk-editable-get-chars">gtk_editable_get_chars</link>              (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> start_pos,
                                                         <link linkend="gint">gint</link> end_pos);
<link linkend="void">void</link>                <link linkend="gtk-editable-cut-clipboard">gtk_editable_cut_clipboard</link>          (<link linkend="GtkEditable">GtkEditable</link> *editable);
<link linkend="void">void</link>                <link linkend="gtk-editable-copy-clipboard">gtk_editable_copy_clipboard</link>         (<link linkend="GtkEditable">GtkEditable</link> *editable);
<link linkend="void">void</link>                <link linkend="gtk-editable-paste-clipboard">gtk_editable_paste_clipboard</link>        (<link linkend="GtkEditable">GtkEditable</link> *editable);
<link linkend="void">void</link>                <link linkend="gtk-editable-delete-selection">gtk_editable_delete_selection</link>       (<link linkend="GtkEditable">GtkEditable</link> *editable);
<link linkend="void">void</link>                <link linkend="gtk-editable-set-position">gtk_editable_set_position</link>           (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> position);
<link linkend="gint">gint</link>                <link linkend="gtk-editable-get-position">gtk_editable_get_position</link>           (<link linkend="GtkEditable">GtkEditable</link> *editable);
<link linkend="void">void</link>                <link linkend="gtk-editable-set-editable">gtk_editable_set_editable</link>           (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gboolean">gboolean</link> is_editable);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-editable-get-editable">gtk_editable_get_editable</link>           (<link linkend="GtkEditable">GtkEditable</link> *editable);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GtkEditable.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GInterface">GInterface</link>
   +----GtkEditable
</synopsis>
</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="GtkText">GtkText</link>,  <link linkend="GtkOldEditable">GtkOldEditable</link> and  <link linkend="GtkSpinButton">GtkSpinButton</link>.</para>
</refsect1>


<refsect1 id="GtkEditable.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="GtkEditable-changed">changed</link>&quot;                                        : Run Last
  &quot;<link linkend="GtkEditable-delete-text">delete-text</link>&quot;                                    : Run Last
  &quot;<link linkend="GtkEditable-insert-text">insert-text</link>&quot;                                    : Run Last
</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="GtkText"><type>GtkText</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 "insert_text", an application
can convert all entry into a widget into uppercase.
<example>
<title>Forcing entry to uppercase.</title>
<programlisting>
#include &lt;ctype.h&gt;
void
insert_text_handler (GtkEditable *editable,
                     const gchar *text,
                     gint         length,
                     gint        *position,
                     gpointer     data)
{
  int i;
  gchar *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>
</example>
</para>
</refsect1>

<refsect1 id="GtkEditable.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkEditable-struct" role="struct">
<title>GtkEditable</title>
<indexterm zone="GtkEditable-struct"><primary sortas="Editable">GtkEditable</primary></indexterm><programlisting>typedef struct _GtkEditable GtkEditable;</programlisting>
<para>
The <link linkend="GtkEditable"><type>GtkEditable</type></link> structure is an opaque structure whose members
cannot be directly accessed.
</para></refsect2>
<refsect2 id="gtk-editable-select-region" role="function">
<title>gtk_editable_select_region ()</title>
<indexterm zone="gtk-editable-select-region"><primary sortas="editable_select_region">gtk_editable_select_region</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_editable_select_region          (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> start_pos,
                                                         <link linkend="gint">gint</link> end_pos);</programlisting>
<para>
Selects a region of text. 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 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>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_pos</parameter>&#160;:</term>
<listitem><simpara> start of region
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_pos</parameter>&#160;:</term>
<listitem><simpara> end of region
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-get-selection-bounds" role="function">
<title>gtk_editable_get_selection_bounds ()</title>
<indexterm zone="gtk-editable-get-selection-bounds"><primary sortas="editable_get_selection_bounds">gtk_editable_get_selection_bounds</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_editable_get_selection_bounds   (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> *start_pos,
                                                         <link linkend="gint">gint</link> *end_pos);</programlisting>
<para>
Retrieves the selection bound of the editable. start_pos 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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_pos</parameter>&#160;:</term>
<listitem><simpara> location to store the starting position, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_pos</parameter>&#160;:</term>
<listitem><simpara> location to store the end position, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if an area is selected, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-insert-text" role="function">
<title>gtk_editable_insert_text ()</title>
<indexterm zone="gtk-editable-insert-text"><primary sortas="editable_insert_text">gtk_editable_insert_text</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_editable_insert_text            (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         const <link linkend="gchar">gchar</link> *new_text,
                                                         <link linkend="gint">gint</link> new_text_length,
                                                         <link linkend="gint">gint</link> *position);</programlisting>
<para>
Inserts <parameter>new_text_length</parameter> bytes of <parameter>new_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>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_text</parameter>&#160;:</term>
<listitem><simpara> the text to append
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_text_length</parameter>&#160;:</term>
<listitem><simpara> the length of the text in bytes, or -1
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>position</parameter>&#160;:</term>
<listitem><simpara> location of the position text will be inserted at
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-delete-text" role="function">
<title>gtk_editable_delete_text ()</title>
<indexterm zone="gtk-editable-delete-text"><primary sortas="editable_delete_text">gtk_editable_delete_text</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_editable_delete_text            (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> start_pos,
                                                         <link linkend="gint">gint</link> end_pos);</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 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>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_pos</parameter>&#160;:</term>
<listitem><simpara> start position
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_pos</parameter>&#160;:</term>
<listitem><simpara> end position
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-get-chars" role="function">
<title>gtk_editable_get_chars ()</title>
<indexterm zone="gtk-editable-get-chars"><primary sortas="editable_get_chars">gtk_editable_get_chars</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              gtk_editable_get_chars              (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> start_pos,
                                                         <link linkend="gint">gint</link> end_pos);</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 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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_pos</parameter>&#160;:</term>
<listitem><simpara> start of text
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_pos</parameter>&#160;:</term>
<listitem><simpara> end of text
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 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.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-cut-clipboard" role="function">
<title>gtk_editable_cut_clipboard ()</title>
<indexterm zone="gtk-editable-cut-clipboard"><primary sortas="editable_cut_clipboard">gtk_editable_cut_clipboard</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_editable_cut_clipboard          (<link linkend="GtkEditable">GtkEditable</link> *editable);</programlisting>
<para>
Removes the contents of the currently selected content in the editable and
puts it on the clipboard.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-copy-clipboard" role="function">
<title>gtk_editable_copy_clipboard ()</title>
<indexterm zone="gtk-editable-copy-clipboard"><primary sortas="editable_copy_clipboard">gtk_editable_copy_clipboard</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_editable_copy_clipboard         (<link linkend="GtkEditable">GtkEditable</link> *editable);</programlisting>
<para>
Copies the contents of the currently selected content in the editable and
puts it on the clipboard.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-paste-clipboard" role="function">
<title>gtk_editable_paste_clipboard ()</title>
<indexterm zone="gtk-editable-paste-clipboard"><primary sortas="editable_paste_clipboard">gtk_editable_paste_clipboard</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_editable_paste_clipboard        (<link linkend="GtkEditable">GtkEditable</link> *editable);</programlisting>
<para>
Pastes the content of the clipboard to the current position of the
cursor in the editable.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-delete-selection" role="function">
<title>gtk_editable_delete_selection ()</title>
<indexterm zone="gtk-editable-delete-selection"><primary sortas="editable_delete_selection">gtk_editable_delete_selection</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_editable_delete_selection       (<link linkend="GtkEditable">GtkEditable</link> *editable);</programlisting>
<para>
Deletes the currently selected text of the editable.
This call doesn't do anything if there is no selected text.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-set-position" role="function">
<title>gtk_editable_set_position ()</title>
<indexterm zone="gtk-editable-set-position"><primary sortas="editable_set_position">gtk_editable_set_position</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_editable_set_position           (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gint">gint</link> position);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>position</parameter>&#160;:</term>
<listitem><simpara> the position of the cursor 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-get-position" role="function">
<title>gtk_editable_get_position ()</title>
<indexterm zone="gtk-editable-get-position"><primary sortas="editable_get_position">gtk_editable_get_position</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_editable_get_position           (<link linkend="GtkEditable">GtkEditable</link> *editable);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the cursor position
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-set-editable" role="function">
<title>gtk_editable_set_editable ()</title>
<indexterm zone="gtk-editable-set-editable"><primary sortas="editable_set_editable">gtk_editable_set_editable</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_editable_set_editable           (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                         <link linkend="gboolean">gboolean</link> is_editable);</programlisting>
<para>
Determines if the user can edit the text in the editable
widget or not.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>is_editable</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the user is allowed to edit the text
  in the widget
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-editable-get-editable" role="function">
<title>gtk_editable_get_editable ()</title>
<indexterm zone="gtk-editable-get-editable"><primary sortas="editable_get_editable">gtk_editable_get_editable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_editable_get_editable           (<link linkend="GtkEditable">GtkEditable</link> *editable);</programlisting>
<para>
Retrieves whether <parameter>editable</parameter> is editable. See
<link linkend="gtk-editable-set-editable"><function>gtk_editable_set_editable()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkEditable"><type>GtkEditable</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>editable</parameter> is editable.
</simpara></listitem></varlistentry>
</variablelist></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>&quot;changed&quot;</literal> signal</title>
<indexterm zone="GtkEditable-changed"><primary sortas="Editable::changed">GtkEditable::changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                        <link linkend="gpointer">gpointer</link>     user_data)      : Run Last</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> the object which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkEditable-delete-text" role="signal"><title>The <literal>&quot;delete-text&quot;</literal> signal</title>
<indexterm zone="GtkEditable-delete-text"><primary sortas="Editable::delete-text">GtkEditable::delete-text</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                        <link linkend="gint">gint</link>         start_pos,
                                                        <link linkend="gint">gint</link>         end_pos,
                                                        <link linkend="gpointer">gpointer</link>     user_data)      : Run Last</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> the object which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_pos</parameter>&#160;:</term>
<listitem><simpara> the starting position
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_pos</parameter>&#160;:</term>
<listitem><simpara> the end position
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkEditable-insert-text" role="signal"><title>The <literal>&quot;insert-text&quot;</literal> signal</title>
<indexterm zone="GtkEditable-insert-text"><primary sortas="Editable::insert-text">GtkEditable::insert-text</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkEditable">GtkEditable</link> *editable,
                                                        <link linkend="gchar">gchar</link>       *new_text,
                                                        <link linkend="gint">gint</link>         new_text_length,
                                                        <link linkend="gint">gint</link>        *position,
                                                        <link linkend="gpointer">gpointer</link>     user_data)            : Run Last</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>editable</parameter>&#160;:</term>
<listitem><simpara> the object which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_text</parameter>&#160;:</term>
<listitem><simpara> the new text to insert
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_text_length</parameter>&#160;:</term>
<listitem><simpara> the length of the new text, in bytes,
    or -1 if new_text is nul-terminated
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>position</parameter>&#160;:</term>
<listitem><simpara> 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.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>



</refentry>
