📄 gtkeditable.html
字号:
will be those characters from <em class="parameter"><code>start_pos</code></em> to the endof the text.</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> widget.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td><td>the starting position.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td><td>the end position.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3557416"></a><h3><a name="gtk-editable-get-selection-bounds"></a>gtk_editable_get_selection_bounds ()</h3><a class="indexterm" name="id3557430"></a><pre class="programlisting"><ahref="/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, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> *start, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> *end);</pre><p>Gets the current selection bounds, if there is a selection.</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> widget.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td><td>location to store the starting position, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td><td>location to store the end position, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.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><ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there is a selection.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3557568"></a><h3><a name="gtk-editable-insert-text"></a>gtk_editable_insert_text ()</h3><a class="indexterm" name="id3557581"></a><pre class="programlisting">void gtk_editable_insert_text (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable, const <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);</pre><p>Inserts text at a given 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> :</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>new_text</code></em> :</span></p></td><td>the 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 text to insert, in bytes</td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td><td>an inout parameter. The caller initializes it to the position at which to insert the text. After the call it points at the position after the newly inserted text.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3557704"></a><h3><a name="gtk-editable-delete-text"></a>gtk_editable_delete_text ()</h3><a class="indexterm" name="id3557718"></a><pre class="programlisting">void gtk_editable_delete_text (<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);</pre><p>Deletes a sequence of characters. The characters thatare 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 deletedwill be those characters from <em class="parameter"><code>start_pos</code></em> to the endof the text.</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> widget.</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></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3557844"></a><h3><a name="gtk-editable-get-chars"></a>gtk_editable_get_chars ()</h3><a class="indexterm" name="id3557857"></a><pre class="programlisting"><ahref="/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, <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);</pre><p>Retrieves a sequence of characters. The characters thatare 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 retrievedwill be those characters from <em class="parameter"><code>start_pos</code></em> to the endof the text.</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> widget.</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"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the characters in the indicated region. The result must be freed with <ahref="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when the application is finished with it.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3558006"></a><h3><a name="gtk-editable-cut-clipboard"></a>gtk_editable_cut_clipboard ()</h3><a class="indexterm" name="id3558020"></a><pre class="programlisting">void gtk_editable_cut_clipboard (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre><p>Causes the characters in the current selection tobe copied to the clipboard and then deleted fromthe 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> :</span></p></td><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="id3558075"></a><h3><a name="gtk-editable-copy-clipboard"></a>gtk_editable_copy_clipboard ()</h3><a class="indexterm" name="id3558089"></a><pre class="programlisting">void gtk_editable_copy_clipboard (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre><p>Causes the characters in the current selection tobe copied to the clipboard.</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> widget.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3558144"></a><h3><a name="gtk-editable-paste-clipboard"></a>gtk_editable_paste_clipboard ()</h3><a class="indexterm" name="id3558158"></a><pre class="programlisting">void gtk_editable_paste_clipboard (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre><p>Causes the contents of the clipboard to be pasted intothe given widget at 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> :</span></p></td><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="id3558214"></a><h3><a name="gtk-editable-delete-selection"></a>gtk_editable_delete_selection ()</h3><a class="indexterm" name="id3558228"></a><pre class="programlisting">void gtk_editable_delete_selection (<a class="link" href="GtkEditable.html" title="GtkEditable">GtkEditable</a> *editable);</pre><p>Deletes the current contents of the widgets selection anddisclaims the selection.</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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -