📄 gtktextbuffer.html
字号:
void <a class="link" href="GtkTextBuffer.html#gtk-text-buffer-unregister-serialize-format">gtk_text_buffer_unregister_serialize_format</a> (<a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer, <ahref="/usr/share/gtk-doc/html/gdk/gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> format);</pre></div><div class="refsect1" lang="en"><a name="id3597061"></a><h2>Object Hierarchy</h2><pre class="synopsis"> <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> +----GtkTextBuffer</pre></div><div class="refsect1" lang="en"><a name="id3597085"></a><h2>Properties</h2><pre class="synopsis"> "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer--copy-target-list">copy-target-list</a>" <a class="link" href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> : Read "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer--cursor-position">cursor-position</a>" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> : Read "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer--has-selection">has-selection</a>" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer--paste-target-list">paste-target-list</a>" <a class="link" href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> : Read "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer--tag-table">tag-table</a>" <a class="link" href="GtkTextTagTable.html" title="GtkTextTagTable">GtkTextTagTable</a> : Read / Write / Construct Only "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer--text">text</a>" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre></div><div class="refsect1" lang="en"><a name="id3597205"></a><h2>Signals</h2><pre class="synopsis"> "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-apply-tag">apply-tag</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-begin-user-action">begin-user-action</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-changed">changed</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-delete-range">delete-range</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-end-user-action">end-user-action</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-insert-child-anchor">insert-child-anchor</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-insert-pixbuf">insert-pixbuf</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-insert-text">insert-text</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-mark-deleted">mark-deleted</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-mark-set">mark-set</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-modified-changed">modified-changed</a>" : Run Last "<a class="link" href="GtkTextBuffer.html#GtkTextBuffer-remove-tag">remove-tag</a>" : Run Last</pre></div><div class="refsect1" lang="en"><a name="id3597347"></a><h2>Description</h2><p>You may wish to begin by reading the <a class="link" href="TextWidget.html" title="Text Widget Overview">text widgetconceptual overview</a> which gives an overview of all the objects and datatypes related to the text widget and how they work together.</p><p></p></div><div class="refsect1" lang="en"><a name="id3597374"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id3597384"></a><h3><a name="GtkTextBuffer-struct"></a>GtkTextBuffer</h3><a class="indexterm" name="id3597397"></a><pre class="programlisting">typedef struct _GtkTextBuffer GtkTextBuffer;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id3597413"></a><h3><a name="gtk-text-buffer-new"></a>gtk_text_buffer_new ()</h3><a class="indexterm" name="id3597425"></a><pre class="programlisting"><a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a>* gtk_text_buffer_new (<a class="link" href="GtkTextTagTable.html" title="GtkTextTagTable">GtkTextTagTable</a> *table);</pre><p>Creates a new text buffer.</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>table</code></em> :</span></p></td><td> a tag table, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to create a new one</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a new text buffer</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3597497"></a><h3><a name="gtk-text-buffer-get-line-count"></a>gtk_text_buffer_get_line_count ()</h3><a class="indexterm" name="id3597510"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> gtk_text_buffer_get_line_count (<a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer);</pre><p>Obtains the number of lines in the buffer. This value is cached, sothe function is very fast.</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>buffer</code></em> :</span></p></td><td> a <a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a> </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> number of lines in the buffer</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3597581"></a><h3><a name="gtk-text-buffer-get-char-count"></a>gtk_text_buffer_get_char_count ()</h3><a class="indexterm" name="id3597595"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> gtk_text_buffer_get_char_count (<a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer);</pre><p>Gets the number of characters in the buffer; note that charactersand bytes are not the same, you can't e.g. expect the contents ofthe buffer in string form to be this many bytes long. The charactercount is cached, so this function is very fast.</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>buffer</code></em> :</span></p></td><td> a <a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a> </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> number of characters in the buffer</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3597668"></a><h3><a name="gtk-text-buffer-get-tag-table"></a>gtk_text_buffer_get_tag_table ()</h3><a class="indexterm" name="id3597682"></a><pre class="programlisting"><a class="link" href="GtkTextTagTable.html" title="GtkTextTagTable">GtkTextTagTable</a>* gtk_text_buffer_get_tag_table (<a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer">GtkTextBuffer</a> *buffer);</pre><p>Get the <a class="link" href="GtkTextTagTable.html" title="GtkTextTagTable"><span class="type">GtkTextTagTable</span></a> associated with this buffer.</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>buffer</code></em> :</span></p></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -