| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/gtk-doc/html/gtk/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkEditable</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="prev" href="GtkSpinButton.html" title="GtkSpinButton">
<link rel="next" href="TextWidgetObjects.html" title="Multiline Text Editor">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="Builder.html" title="Interface builder">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="chapter" href="gtk-migrating-GtkBuilder.html" title="Migrating from libglade to GtkBuilder">
<link rel="chapter" href="gtk-migrating-tooltips.html" title="Migrating from GtkTooltips to GtkTooltip">
<link rel="chapter" href="gtk-migrating-entry-icons.html" title="Migrating from SexyIconEntry to GtkEntry">
<link rel="chapter" href="gtk-migrating-label-links.html" title="Migrating from SexyUrlLabel to GtkLabel">
<link rel="chapter" href="gtk-migrating-ClientSideWindows.html" title="Migrating to client-side windows">
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="api-index-full.html" title="Index of all symbols">
<link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
<link rel="index" href="api-index-2-2.html" title="Index of new symbols in 2.2">
<link rel="index" href="api-index-2-4.html" title="Index of new symbols in 2.4">
<link rel="index" href="api-index-2-6.html" title="Index of new symbols in 2.6">
<link rel="index" href="api-index-2-8.html" title="Index of new symbols in 2.8">
<link rel="index" href="api-index-2-10.html" title="Index of new symbols in 2.10">
<link rel="index" href="api-index-2-12.html" title="Index of new symbols in 2.12">
<link rel="index" href="api-index-2-14.html" title="Index of new symbols in 2.14">
<link rel="index" href="api-index-2-16.html" title="Index of new symbols in 2.16">
<link rel="index" href="api-index-2-18.html" title="Index of new symbols in 2.18">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkSpinButton.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="NumericEntry.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="TextWidgetObjects.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GtkEditable.synopsis" class="shortcut">Top</a>
|
<a href="#GtkEditable.description" class="shortcut">Description</a>
|
<a href="#GtkEditable.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#GtkEditable.implementations" class="shortcut">Known Implementations</a>
|
<a href="#GtkEditable.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" title="GtkEditable">
<a name="GtkEditable"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkEditable.top_of_page"></a>GtkEditable</span></h2>
<p>GtkEditable — Interface for text-editing widgets</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="GtkEditable.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <gtk/gtk.h>
<a class="link" href="GtkEditable.html#GtkEditable-struct" title="GtkEditable">GtkEditable</a>;
void <a class="link" href="GtkEditable.html#gtk-editable-select-region" title="gtk_editable_select_region ()">gtk_editable_select_region</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> start_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> end_pos);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a class="link" href="GtkEditable.html#gtk-editable-get-selection-bounds" title="gtk_editable_get_selection_bounds ()">gtk_editable_get_selection_bounds</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *start_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *end_pos);
void <a class="link" href="GtkEditable.html#gtk-editable-insert-text" title="gtk_editable_insert_text ()">gtk_editable_insert_text</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *new_text,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> new_text_length,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *position);
void <a class="link" href="GtkEditable.html#gtk-editable-delete-text" title="gtk_editable_delete_text ()">gtk_editable_delete_text</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> start_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> end_pos);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a class="link" href="GtkEditable.html#gtk-editable-get-chars" title="gtk_editable_get_chars ()">gtk_editable_get_chars</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> start_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> end_pos);
void <a class="link" href="GtkEditable.html#gtk-editable-cut-clipboard" title="gtk_editable_cut_clipboard ()">gtk_editable_cut_clipboard</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);
void <a class="link" href="GtkEditable.html#gtk-editable-copy-clipboard" title="gtk_editable_copy_clipboard ()">gtk_editable_copy_clipboard</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);
void <a class="link" href="GtkEditable.html#gtk-editable-paste-clipboard" title="gtk_editable_paste_clipboard ()">gtk_editable_paste_clipboard</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);
void <a class="link" href="GtkEditable.html#gtk-editable-delete-selection" title="gtk_editable_delete_selection ()">gtk_editable_delete_selection</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);
void <a class="link" href="GtkEditable.html#gtk-editable-set-position" title="gtk_editable_set_position ()">gtk_editable_set_position</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> position);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="GtkEditable.html#gtk-editable-get-position" title="gtk_editable_get_position ()">gtk_editable_get_position</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);
void <a class="link" href="GtkEditable.html#gtk-editable-set-editable" title="gtk_editable_set_editable ()">gtk_editable_set_editable</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> is_editable);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a class="link" href="GtkEditable.html#gtk-editable-get-editable" title="gtk_editable_get_editable ()">gtk_editable_get_editable</a> (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="GtkEditable.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GInterface
+----GtkEditable
</pre>
</div>
<div class="refsect1" title="Known Implementations">
<a name="GtkEditable.implementations"></a><h2>Known Implementations</h2>
<p>
GtkEditable is implemented by
<a class="link" href="GtkEntry.html" title="GtkEntry">GtkEntry</a>, <a class="link" href="GtkText.html" title="GtkText">GtkText</a>, <a class="link" href="GtkOldEditable.html" title="GtkOldEditable">GtkOldEditable</a> and <a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a>.</p>
</div>
<div class="refsect1" title="Signals">
<a name="GtkEditable.signals"></a><h2>Signals</h2>
<pre class="synopsis">
"<a class="link" href="GtkEditable.html#GtkEditable-changed" title='The "changed" signal'>changed</a>" : Run Last
"<a class="link" href="GtkEditable.html#GtkEditable-delete-text" title='The "delete-text" signal'>delete-text</a>" : Run Last
"<a class="link" href="GtkEditable.html#GtkEditable-insert-text" title='The "insert-text" signal'>insert-text</a>" : Run Last
</pre>
</div>
<div class="refsect1" title="Description">
<a name="GtkEditable.description"></a><h2>Description</h2>
<p>
The <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a> interface is an interface which should be implemented by
text editing widgets, such as <a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> and <a class="link" href="GtkText.html" title="GtkText"><span class="type">GtkText</span></a>. 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.
</p>
<p>
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.
</p>
<div class="example">
<a name="id626455"></a><p class="title"><b>Example 19. Forcing entry to uppercase.</b></p>
<div class="example-contents"><pre class="programlisting">
#include <ctype.h>
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);
}
</pre></div>
</div>
<p><br class="example-break">
</p>
</div>
<div class="refsect1" title="Details">
<a name="GtkEditable.details"></a><h2>Details</h2>
<div class="refsect2" title="GtkEditable">
<a name="GtkEditable-struct"></a><h3>GtkEditable</h3>
<pre class="programlisting">typedef struct _GtkEditable GtkEditable;</pre>
<p>
The <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a> structure is an opaque structure whose members
cannot be directly accessed.
</p>
</div>
<hr>
<div class="refsect2" title="gtk_editable_select_region ()">
<a name="gtk-editable-select-region"></a><h3>gtk_editable_select_region ()</h3>
<pre class="programlisting">void gtk_editable_select_region (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> start_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> end_pos);</pre>
<p>
Selects a region of text. The characters that are selected are
those characters at positions from <em class="parameter"><code>start_pos</code></em> up to, but not
including <em class="parameter"><code>end_pos</code></em>. If <em class="parameter"><code>end_pos</code></em> is negative, then the the
characters selected are those characters from <em class="parameter"><code>start_pos</code></em> to
the end of the text.
</p>
<p>
Note that positions are specified in characters, not bytes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_pos</code></em> :</span></p></td>
<td> start of region
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_pos</code></em> :</span></p></td>
<td> end of region
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_get_selection_bounds ()">
<a name="gtk-editable-get-selection-bounds"></a><h3>gtk_editable_get_selection_bounds ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_editable_get_selection_bounds (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *start_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *end_pos);</pre>
<p>
Retrieves the selection bound of the editable. start_pos will be filled
with the start of the selection and <em class="parameter"><code>end_pos</code></em> with end. If no text was
selected both will be identical and <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE--CAPS"
><code class="literal">FALSE</code></a> will be returned.
</p>
<p>
Note that positions are specified in characters, not bytes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_pos</code></em> :</span></p></td>
<td> location to store the starting position, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_pos</code></em> :</span></p></td>
<td> location to store the end position, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if an area is selected, <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE--CAPS"
><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_insert_text ()">
<a name="gtk-editable-insert-text"></a><h3>gtk_editable_insert_text ()</h3>
<pre class="programlisting">void gtk_editable_insert_text (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *new_text,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> new_text_length,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *position);</pre>
<p>
Inserts <em class="parameter"><code>new_text_length</code></em> bytes of <em class="parameter"><code>new_text</code></em> into the contents of the
widget, at position <em class="parameter"><code>position</code></em>.
</p>
<p>
Note that the position is in characters, not in bytes.
The function updates <em class="parameter"><code>position</code></em> to point after the newly inserted text.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_text</code></em> :</span></p></td>
<td> the text to append
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_text_length</code></em> :</span></p></td>
<td> the length of the text in bytes, or -1
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td> location of the position text will be inserted at
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_delete_text ()">
<a name="gtk-editable-delete-text"></a><h3>gtk_editable_delete_text ()</h3>
<pre class="programlisting">void gtk_editable_delete_text (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> start_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> end_pos);</pre>
<p>
Deletes a sequence of characters. The characters that are deleted are
those characters at positions from <em class="parameter"><code>start_pos</code></em> up to, but not including
<em class="parameter"><code>end_pos</code></em>. If <em class="parameter"><code>end_pos</code></em> is negative, then the the characters deleted
are those from <em class="parameter"><code>start_pos</code></em> to the end of the text.
</p>
<p>
Note that the positions are specified in characters, not bytes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_pos</code></em> :</span></p></td>
<td> start position
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_pos</code></em> :</span></p></td>
<td> end position
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_get_chars ()">
<a name="gtk-editable-get-chars"></a><h3>gtk_editable_get_chars ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_editable_get_chars (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> start_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> end_pos);</pre>
<p>
Retrieves a sequence of characters. The characters that are retrieved
are those characters at positions from <em class="parameter"><code>start_pos</code></em> up to, but not
including <em class="parameter"><code>end_pos</code></em>. If <em class="parameter"><code>end_pos</code></em> is negative, then the the characters
retrieved are those characters from <em class="parameter"><code>start_pos</code></em> to the end of the text.
</p>
<p>
Note that positions are specified in characters, not bytes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_pos</code></em> :</span></p></td>
<td> start of text
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_pos</code></em> :</span></p></td>
<td> end of text
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a pointer to the contents of the widget as a
string. This string is allocated by the <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
implementation and should be freed by the caller.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_cut_clipboard ()">
<a name="gtk-editable-cut-clipboard"></a><h3>gtk_editable_cut_clipboard ()</h3>
<pre class="programlisting">void gtk_editable_cut_clipboard (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre>
<p>
Removes the contents of the currently selected content in the editable and
puts it on the clipboard.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_copy_clipboard ()">
<a name="gtk-editable-copy-clipboard"></a><h3>gtk_editable_copy_clipboard ()</h3>
<pre class="programlisting">void gtk_editable_copy_clipboard (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre>
<p>
Copies the contents of the currently selected content in the editable and
puts it on the clipboard.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_paste_clipboard ()">
<a name="gtk-editable-paste-clipboard"></a><h3>gtk_editable_paste_clipboard ()</h3>
<pre class="programlisting">void gtk_editable_paste_clipboard (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre>
<p>
Pastes the content of the clipboard to the current position of the
cursor in the editable.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_delete_selection ()">
<a name="gtk-editable-delete-selection"></a><h3>gtk_editable_delete_selection ()</h3>
<pre class="programlisting">void gtk_editable_delete_selection (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre>
<p>
Deletes the currently selected text of the editable.
This call doesn't do anything if there is no selected text.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_set_position ()">
<a name="gtk-editable-set-position"></a><h3>gtk_editable_set_position ()</h3>
<pre class="programlisting">void gtk_editable_set_position (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> position);</pre>
<p>
Sets the cursor position in the editable to the given value.
</p>
<p>
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 <em class="parameter"><code>position</code></em> is in characters, not in bytes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td> the position of the cursor
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_get_position ()">
<a name="gtk-editable-get-position"></a><h3>gtk_editable_get_position ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> gtk_editable_get_position (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre>
<p>
Retrieves the current position of the cursor relative to the start
of the content of the editable.
</p>
<p>
Note that this position is in characters, not in bytes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the cursor position
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_set_editable ()">
<a name="gtk-editable-set-editable"></a><h3>gtk_editable_set_editable ()</h3>
<pre class="programlisting">void gtk_editable_set_editable (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> is_editable);</pre>
<p>
Determines if the user can edit the text in the editable
widget or not.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_editable</code></em> :</span></p></td>
<td> <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if the user is allowed to edit the text
in the widget
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gtk_editable_get_editable ()">
<a name="gtk-editable-get-editable"></a><h3>gtk_editable_get_editable ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_editable_get_editable (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre>
<p>
Retrieves whether <em class="parameter"><code>editable</code></em> is editable. See
<a class="link" href="GtkEditable.html#gtk-editable-set-editable" title="gtk_editable_set_editable ()"><code class="function">gtk_editable_set_editable()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>editable</code></em> is editable.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Signal Details">
<a name="GtkEditable.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" title='The "changed" signal'>
<a name="GtkEditable-changed"></a><h3>The <code class="literal">"changed"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run Last</pre>
<p>
The ::changed signal is emitted at the end of a single
user-visible operation on the contents of the <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a>.
</p>
<p>
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).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> the object which received the signal
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title='The "delete-text" signal'>
<a name="GtkEditable-delete-text"></a><h3>The <code class="literal">"delete-text"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> start_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> end_pos,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run Last</pre>
<p>
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 <a
href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#g-signal-stop-emission"
><code class="function">g_signal_stop_emission()</code></a>, it
is possible to modify the range of deleted text, or
prevent it from being deleted entirely. The <em class="parameter"><code>start_pos</code></em>
and <em class="parameter"><code>end_pos</code></em> parameters are interpreted as for
<a class="link" href="GtkEditable.html#gtk-editable-delete-text" title="gtk_editable_delete_text ()"><code class="function">gtk_editable_delete_text()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> the object which received the signal
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_pos</code></em> :</span></p></td>
<td> the starting position
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_pos</code></em> :</span></p></td>
<td> the end position
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title='The "insert-text" signal'>
<a name="GtkEditable-insert-text"></a><h3>The <code class="literal">"insert-text"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *new_text,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> new_text_length,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> *position,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run Last</pre>
<p>
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 <a
href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#g-signal-stop-emission"
><code class="function">g_signal_stop_emission()</code></a>, it
is possible to modify the inserted text, or prevent
it from being inserted entirely.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td>
<td> the object which received the signal
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_text</code></em> :</span></p></td>
<td> the new text to insert
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_text_length</code></em> :</span></p></td>
<td> the length of the new text, in bytes,
or -1 if new_text is nul-terminated
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td> 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.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>