⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtkeditable.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<td>a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a> widget.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3558284"></a><h3><a name="gtk-editable-set-position"></a>gtk_editable_set_position ()</h3><a class="indexterm" name="id3558298"></a><pre class="programlisting">void                gtk_editable_set_position           (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> position);</pre><p>Sets the cursor position.</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>&#160;:</span></p></td><td>a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a> widget.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td><td>the position of the cursor. The cursor is displayed           before the character with the given (base 0) index           in the widget. The value must be less than or           equal to the number of characters in the widget.           A value of -1 indicates that the position should           be set after the last character in the entry.           Note that this position is in characters, not in           bytes.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3558388"></a><h3><a name="gtk-editable-get-position"></a>gtk_editable_get_position ()</h3><a class="indexterm" name="id3558402"></a><pre class="programlisting"><ahref="/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 cursor position.</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>&#160;:</span></p></td><td>a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a> widget.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td>the position of the cursor. The cursor is displayed           before the character with the given (base 0) index           in the widget. The value will be less than or           equal to the number of characters in the widget.           Note that this position is in characters, not in           bytes.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3558472"></a><h3><a name="gtk-editable-set-editable"></a>gtk_editable_set_editable ()</h3><a class="indexterm" name="id3558486"></a><pre class="programlisting">void                gtk_editable_set_editable           (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,                                                         <ahref="/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 editablewidget or not.</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>&#160;:</span></p></td><td>a <a class="link" href="GtkEditable.html" title="GtkEditable"><span class="type">GtkEditable</span></a> widget.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>is_editable</code></em>&#160;:</span></p></td><td><ahref="/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" lang="en"><a name="id3558573"></a><h3><a name="gtk-editable-get-editable"></a>gtk_editable_get_editable ()</h3><a class="indexterm" name="id3558587"></a><pre class="programlisting"><ahref="/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"><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>&#160;:</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>&#160;:</span></p></td><td> <ahref="/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" lang="en"><a name="id3558688"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id3558699"></a><h3><a name="GtkEditable-changed"></a>The <code class="literal">"changed"</code> signal</h3><a class="indexterm" name="id3558715"></a><pre class="programlisting">void                user_function                      (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a>     user_data)      : Run Last</pre><p>Indicates that the user has changed the contentsof the widget.</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>&#160;:</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>&#160;:</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3558784"></a><h3><a name="GtkEditable-delete-text"></a>The <code class="literal">"delete-text"</code> signal</h3><a class="indexterm" name="id3558800"></a><pre class="programlisting">void                user_function                      (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>         start_pos,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>         end_pos,                                                        <ahref="/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 fromthe widget by the user. The default handler forthis signal will normally be responsible for insertingthe text, so by connecting to this signal and thenstopping the signal with <a class="link" href="gtk-Signals.html#gtk-signal-emit-stop"><code class="function">gtk_signal_emit_stop()</code></a>, itis possible to modify the inserted text, or preventit from being inserted 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"><code class="function">gtk_editable_delete_text()</code></a></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>&#160;:</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>&#160;:</span></p></td><td>the starting position.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>end_pos</code></em>&#160;:</span></p></td><td>the end position.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3558953"></a><h3><a name="GtkEditable-insert-text"></a>The <code class="literal">"insert-text"</code> signal</h3><a class="indexterm" name="id3558969"></a><pre class="programlisting">void                user_function                      (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a>       *new_text,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>         new_text_length,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>        *position,                                                        <ahref="/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 intothe widget by the user. The default handler forthis signal will normally be responsible for insertingthe text, so by connecting to this signal and thenstopping the signal with <a class="link" href="gtk-Signals.html#gtk-signal-emit-stop"><code class="function">gtk_signal_emit_stop()</code></a>, itis possible to modify the inserted text, or preventit from being inserted entirely.</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>&#160;:</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>&#160;:</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>&#160;:</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>&#160;:</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>&#160;:</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3559127"></a><div class="refsect2" lang="en"><a name="id3559128"></a></div><hr><div class="refsect2" lang="en"><a name="id3559129"></a></div></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -