File: class-gtkeditable.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (83 lines) | stat: -rw-r--r-- 27,896 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.Editable</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="previous" href="class-gtkdrawingarea.html" title="gtk.DrawingArea"><link rel="next" href="class-gtkentry.html" title="gtk.Entry"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.Editable</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkdrawingarea.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkentry.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkeditable"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.Editable</h2><p>gtk.Editable &#8212; an interface for text-editing widgets.</p></div><div class="refsect1" lang="en"><a name="id3403244"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Editable</span></span>(<span class="ooclass"><span class="classname">gobject.GInterface</span></span>):
<code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--select-region" title="gtk.Editable.select_region">select_region</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--get-selection-bounds" title="gtk.Editable.get_selection_bounds">get_selection_bounds</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--insert-text" title="gtk.Editable.insert_text">insert_text</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--delete-text" title="gtk.Editable.delete_text">delete_text</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_pos</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_pos</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--get-chars" title="gtk.Editable.get_chars">get_chars</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_pos</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_pos</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--cut-clipboard" title="gtk.Editable.cut_clipboard">cut_clipboard</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--copy-clipboard" title="gtk.Editable.copy_clipboard">copy_clipboard</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--paste-clipboard" title="gtk.Editable.paste_clipboard">paste_clipboard</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--delete-selection" title="gtk.Editable.delete_selection">delete_selection</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--set-position" title="gtk.Editable.set_position">set_position</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--get-position" title="gtk.Editable.get_position">get_position</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--set-editable" title="gtk.Editable.set_editable">set_editable</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_editable</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkeditable.html#method-gtkeditable--get-editable" title="gtk.Editable.get_editable">get_editable</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3403493"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtkeditable.html#signal-gtkeditable--changed" title='The "changed" gtk.Editable Signal'>changed</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>editable</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkeditable.html#signal-gtkeditable--delete-text" title='The "delete-text" gtk.Editable Signal'>delete-text</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>editable</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>start</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>end</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkeditable.html#signal-gtkeditable--insert-text" title='The "insert-text" gtk.Editable Signal'>insert-text</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>editable</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>new_text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>new_text_length</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>position</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3403644"></a><h2>Description</h2><p><a href="class-gtkeditable.html" title="gtk.Editable"><tt class="classname">gtk.Editable</tt></a>
is an interface for text editing widgets, such as <a href="class-gtkentry.html" title="gtk.Entry"><tt class="classname">gtk.Entry</tt></a>. The
editable class contains methods 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></div><div class="refsect1" lang="en"><a name="id3403670"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkeditable--select-region"></a><h3>gtk.Editable.select_region</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">select_region</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>start</tt></b>:</span></td><td>the new start position of the
selection</td></tr><tr><td><span class="term"><b class="parameter"><tt>end</tt></b>:</span></td><td>the new end position of the
selection</td></tr></tbody></table><p>The <tt class="methodname">select_region</tt>() method selects a
region of text from <i class="parameter"><tt>start</tt></i> up to, but not including
<i class="parameter"><tt>end</tt></i>. If <i class="parameter"><tt>end</tt></i> is negative, then
the selection will run from <i class="parameter"><tt>start</tt></i> to the end of the
text.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--get-selection-bounds"></a><h3>gtk.Editable.get_selection_bounds</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_selection_bounds</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing the start and end positions
of the selection or an empty tuple if there is no
selection</td></tr></tbody></table><p>The <tt class="methodname">get_selection_bounds</tt>() method
returns a tuple that contains the start and end positions of the selection
if any or an empty tuple if there is no selection.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--insert-text"></a><h3>gtk.Editable.insert_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_text</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span><span class="initializer">=0</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>the text to be inserted</td></tr><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>the position where the text should be
inserted</td></tr></tbody></table><p>The <tt class="methodname">insert_text</tt>() method inserts the
string specified by <i class="parameter"><tt>text</tt></i> at the location specified by
<i class="parameter"><tt>position</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--delete-text"></a><h3>gtk.Editable.delete_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete_text</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_pos</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_pos</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>start_pos</tt></b>:</span></td><td>the start position of the text to
delete</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_pos</tt></b>:</span></td><td>the end position of the text to
delete</td></tr></tbody></table><p>The <tt class="methodname">delete_text</tt>() method deletes a
sequence of characters starting from <i class="parameter"><tt>start_pos</tt></i> up to,
but not including <i class="parameter"><tt>end_pos</tt></i>. If
<i class="parameter"><tt>end_pos</tt></i> is negative, then the characters deleted will
be those characters from <i class="parameter"><tt>start_pos</tt></i> to the end of the
text.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--get-chars"></a><h3>gtk.Editable.get_chars</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_chars</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>start_pos</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>end_pos</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>start_pos</tt></b>:</span></td><td>the start position</td></tr><tr><td><span class="term"><b class="parameter"><tt>end_pos</tt></b>:</span></td><td>the end position</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a string containing the characters from start
to end</td></tr></tbody></table><p>The <tt class="methodname">get_chars</tt>() method retrieves a
string of characters starting from <i class="parameter"><tt>start_pos</tt></i> up to,
but not including <i class="parameter"><tt>end_pos</tt></i>. If
<i class="parameter"><tt>end_pos</tt></i> is negative, then all the characters from
<i class="parameter"><tt>start_pos</tt></i> to the end of the text are
retrieved.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--cut-clipboard"></a><h3>gtk.Editable.cut_clipboard</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">cut_clipboard</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">cut_clipboard</tt>() method copies the
characters in the current selection to the clipboard and then deletes them
from the widget.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--copy-clipboard"></a><h3>gtk.Editable.copy_clipboard</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy_clipboard</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">copy_clipboard</tt>() method copies the
characters in the current selection to the clipboard</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--paste-clipboard"></a><h3>gtk.Editable.paste_clipboard</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">paste_clipboard</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">paste_clipboard</tt>() method copies the
contents of the clipboard to the widget at the cursor position.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--delete-selection"></a><h3>gtk.Editable.delete_selection</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">delete_selection</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">delete_selection</tt>() method deletes
the characters in the selection and releases the selection ownership</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--set-position"></a><h3>gtk.Editable.set_position</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_position</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>the new cursor position</td></tr></tbody></table><p>The <tt class="methodname">set_position</tt>() method sets the
cursor position to be just before the character at the location specified by
<i class="parameter"><tt>position</tt></i>. If <i class="parameter"><tt>position</tt></i> is less
than 0 or greater than the number of characters in the widget the cursor is
positioned after the last character in the widget. Note
<i class="parameter"><tt>position</tt></i> is in characters not bytes.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--get-position"></a><h3>gtk.Editable.get_position</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_position</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the cursor position</td></tr></tbody></table><p>The <tt class="methodname">get_position</tt>() method retrieves the
cursor position as a character index starting from 0. If the cursor is after
the last character the position will equal the number of characters in the
widget. Note <i class="parameter"><tt>position</tt></i> is in characters not
bytes.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--set-editable"></a><h3>gtk.Editable.set_editable</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_editable</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_editable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>is_editable</tt></b>:</span></td><td>if TRUE the text can be
edited</td></tr></tbody></table><p>The <tt class="methodname">set_editable</tt>() method sets the
widget "editable" attribute of the widget to the value specified by
<i class="parameter"><tt>is_editable</tt></i>. If <i class="parameter"><tt>is_editable</tt></i> is
<tt class="literal">TRUE</tt> the text can be edited; if <tt class="literal">FALSE</tt>,
the text cannot be edited.</p></div><div class="refsect2" lang="en"><a name="method-gtkeditable--get-editable"></a><h3>gtk.Editable.get_editable</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_editable</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the text is
editable.</td></tr></tbody></table><p>The <tt class="methodname">get_editable</tt>() method retrieves the
value of the widget "editable" attribute that specifies whether the text is
editable. See <a href="class-gtkeditable.html#method-gtkeditable--set-editable" title="gtk.Editable.set_editable"><tt class="methodname">set_editable()</tt></a>.</p></div></div><div class="refsect1" lang="en"><a name="id3404407"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkeditable--changed"></a><h3>The "changed" gtk.Editable Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>editable</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>editable</tt></i>:</span></td><td>the editable that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "changed" signal is emitted when the contents of the widget
have changed.</p></div><div class="refsect2" lang="en"><a name="signal-gtkeditable--delete-text"></a><h3>The "delete-text" gtk.Editable Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>editable</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>start</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>end</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>editable</tt></i>:</span></td><td>the editable that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>start</tt></i>:</span></td><td>the start position</td></tr><tr><td><span class="term"><i class="parameter"><tt>end</tt></i>:</span></td><td>the end position</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "delete-text" 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 the <a href="class-gobject.html#method-gobject--stop-emission" title="gobject.GObject.stop_emission"><tt class="methodname">gobject.stop_emission</tt>()</a> 
method, it is possible to prevent it from being deleted. The
<i class="parameter"><tt>start</tt></i> and <i class="parameter"><tt>end</tt></i> parameters are
interpreted as for <a href="class-gtkeditable.html#method-gtkeditable--delete-text" title="gtk.Editable.delete_text"><tt class="methodname">delete_text</tt>()</a></p></div><div class="refsect2" lang="en"><a name="signal-gtkeditable--insert-text"></a><h3>The "insert-text" gtk.Editable Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>editable</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>new_text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>new_text_length</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>position</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>editable</tt></i>:</span></td><td>the editable that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>new_text</tt></i>:</span></td><td>the string that is being
inserted</td></tr><tr><td><span class="term"><i class="parameter"><tt>new_text_length</tt></i>:</span></td><td>the length of the new text</td></tr><tr><td><span class="term"><i class="parameter"><tt>position</tt></i>:</span></td><td>a pointer to the location at which the new text
will be inserted</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "insert-text" 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 the <a href="class-gobject.html#method-gobject--stop-emission" title="gobject.GObject.stop_emission"><tt class="methodname">gobject.stop_emission</tt>()</a>
method, it is possible to prevent it from being inserted entirely. The
<i class="parameter"><tt>position</tt></i> parameter is a <a href="class-gobjectgpointer.html" title="gobject.GPointer"><tt class="classname">gobject.GPointer</tt></a>
object containing a pointer to the insertion position - there is no way to
access the position value from <tt class="literal">PyGTK</tt>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkdrawingarea.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gtkentry.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.DrawingArea</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.Entry</td></tr></table></div></body></html>