45
45
#include <gtk/gtk.h>
47
47
<a class="link" href="GtkTextMark.html#GtkTextMark-struct" title="GtkTextMark">GtkTextMark</a>;
48
<a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="returnvalue">GtkTextMark</span></a> * <a class="link" href="GtkTextMark.html#gtk-text-mark-new" title="gtk_text_mark_new ()">gtk_text_mark_new</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
49
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> left_gravity</code></em>);
48
<a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="returnvalue">GtkTextMark</span></a> * <a class="link" href="GtkTextMark.html#gtk-text-mark-new" title="gtk_text_mark_new ()">gtk_text_mark_new</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
49
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> left_gravity</code></em>);
50
50
<span class="returnvalue">void</span> <a class="link" href="GtkTextMark.html#gtk-text-mark-set-visible" title="gtk_text_mark_set_visible ()">gtk_text_mark_set_visible</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>,
51
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);
52
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkTextMark.html#gtk-text-mark-get-visible" title="gtk_text_mark_get_visible ()">gtk_text_mark_get_visible</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
53
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkTextMark.html#gtk-text-mark-get-deleted" title="gtk_text_mark_get_deleted ()">gtk_text_mark_get_deleted</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
54
const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a>* <a class="link" href="GtkTextMark.html#gtk-text-mark-get-name" title="gtk_text_mark_get_name ()">gtk_text_mark_get_name</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
51
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);
52
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkTextMark.html#gtk-text-mark-get-visible" title="gtk_text_mark_get_visible ()">gtk_text_mark_get_visible</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
53
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkTextMark.html#gtk-text-mark-get-deleted" title="gtk_text_mark_get_deleted ()">gtk_text_mark_get_deleted</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
54
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a>* <a class="link" href="GtkTextMark.html#gtk-text-mark-get-name" title="gtk_text_mark_get_name ()">gtk_text_mark_get_name</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
55
55
<a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="returnvalue">GtkTextBuffer</span></a>* <a class="link" href="GtkTextMark.html#gtk-text-mark-get-buffer" title="gtk_text_mark_get_buffer ()">gtk_text_mark_get_buffer</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
56
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkTextMark.html#gtk-text-mark-get-left-gravity" title="gtk_text_mark_get_left_gravity ()">gtk_text_mark_get_left_gravity</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkTextMark.html#gtk-text-mark-get-left-gravity" title="gtk_text_mark_get_left_gravity ()">gtk_text_mark_get_left_gravity</a> (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
59
59
<div class="refsect1" title="Object Hierarchy">
60
60
<a name="GtkTextMark.object-hierarchy"></a><h2>Object Hierarchy</h2>
61
61
<pre class="synopsis">
62
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
62
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
66
66
<div class="refsect1" title="Properties">
67
67
<a name="GtkTextMark.properties"></a><h2>Properties</h2>
68
68
<pre class="synopsis">
69
"<a class="link" href="GtkTextMark.html#GtkTextMark--left-gravity" title='The "left-gravity" property'>left-gravity</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only
70
"<a class="link" href="GtkTextMark.html#GtkTextMark--name" title='The "name" property'>name</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only
69
"<a class="link" href="GtkTextMark.html#GtkTextMark--left-gravity" title='The "left-gravity" property'>left-gravity</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only
70
"<a class="link" href="GtkTextMark.html#GtkTextMark--name" title='The "name" property'>name</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only
73
73
<div class="refsect1" title="Description">
87
87
mark, a mark with <em class="firstterm">left gravity</em> will be moved to the
88
88
beginning of the newly-inserted text, and a mark with <em class="firstterm">right
89
89
gravity</em> will be moved to the end.
90
<sup>[<a name="id827762" href="#ftn.id827762" class="footnote">3</a>]</sup>
90
<sup>[<a name="id664165" href="#ftn.id664165" class="footnote">3</a>]</sup>
93
93
Marks are reference counted, but the reference count only controls the validity
115
115
<div class="refsect2" title="gtk_text_mark_new ()">
116
116
<a name="gtk-text-mark-new"></a><h3>gtk_text_mark_new ()</h3>
117
<pre class="programlisting"><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="returnvalue">GtkTextMark</span></a> * gtk_text_mark_new (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
118
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> left_gravity</code></em>);</pre>
117
<pre class="programlisting"><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="returnvalue">GtkTextMark</span></a> * gtk_text_mark_new (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
118
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> left_gravity</code></em>);</pre>
120
120
Creates a text mark. Add it to a buffer using <a class="link" href="GtkTextBuffer.html#gtk-text-buffer-add-mark" title="gtk_text_buffer_add_mark ()"><code class="function">gtk_text_buffer_add_mark()</code></a>.
121
If <em class="parameter"><code>name</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the mark is anonymous; otherwise, the mark can be
121
If <em class="parameter"><code>name</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the mark is anonymous; otherwise, the mark can be
122
122
retrieved by name using <a class="link" href="GtkTextBuffer.html#gtk-text-buffer-get-mark" title="gtk_text_buffer_get_mark ()"><code class="function">gtk_text_buffer_get_mark()</code></a>. If a mark has left
123
123
gravity, and text is inserted at the mark's current location, the mark
124
124
will be moved to the left of the newly-inserted text. If the mark has
125
right gravity (<em class="parameter"><code>left_gravity</code></em> = <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>), the mark will end up on the
125
right gravity (<em class="parameter"><code>left_gravity</code></em> = <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>), the mark will end up on the
126
126
right of newly-inserted text. The standard left-to-right cursor is a
127
127
mark with right gravity (when you type, the cursor stays on the right
128
128
side of the text you're typing).
154
154
<div class="refsect2" title="gtk_text_mark_set_visible ()">
155
155
<a name="gtk-text-mark-set-visible"></a><h3>gtk_text_mark_set_visible ()</h3>
156
156
<pre class="programlisting"><span class="returnvalue">void</span> gtk_text_mark_set_visible (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>,
157
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);</pre>
157
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);</pre>
159
159
Sets the visibility of <em class="parameter"><code>mark</code></em>; the insertion point is normally
160
160
visible, i.e. you can see it as a vertical bar. Also, the text
182
182
<div class="refsect2" title="gtk_text_mark_get_visible ()">
183
183
<a name="gtk-text-mark-get-visible"></a><h3>gtk_text_mark_get_visible ()</h3>
184
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_text_mark_get_visible (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
184
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_text_mark_get_visible (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
186
Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the mark is visible (i.e. a cursor is displayed
186
Returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the mark is visible (i.e. a cursor is displayed
189
189
<div class="variablelist"><table border="0">
206
206
<div class="refsect2" title="gtk_text_mark_get_deleted ()">
207
207
<a name="gtk-text-mark-get-deleted"></a><h3>gtk_text_mark_get_deleted ()</h3>
208
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_text_mark_get_deleted (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
208
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_text_mark_get_deleted (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
210
Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the mark has been removed from its buffer
210
Returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the mark has been removed from its buffer
211
211
with <a class="link" href="GtkTextBuffer.html#gtk-text-buffer-delete-mark" title="gtk_text_buffer_delete_mark ()"><code class="function">gtk_text_buffer_delete_mark()</code></a>. See <a class="link" href="GtkTextBuffer.html#gtk-text-buffer-add-mark" title="gtk_text_buffer_add_mark ()"><code class="function">gtk_text_buffer_add_mark()</code></a>
212
212
for a way to add it to a buffer again.
231
231
<div class="refsect2" title="gtk_text_mark_get_name ()">
232
232
<a name="gtk-text-mark-get-name"></a><h3>gtk_text_mark_get_name ()</h3>
233
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a>* gtk_text_mark_get_name (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
233
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a>* gtk_text_mark_get_name (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
235
235
Returns the mark name; returns NULL for anonymous marks.
256
256
<pre class="programlisting"><a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="returnvalue">GtkTextBuffer</span></a>* gtk_text_mark_get_buffer (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
258
258
Gets the buffer this mark is located inside,
259
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the mark is deleted.
259
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the mark is deleted.
261
261
<div class="variablelist"><table border="0">
262
262
<col align="left" valign="top">
278
278
<div class="refsect2" title="gtk_text_mark_get_left_gravity ()">
279
279
<a name="gtk-text-mark-get-left-gravity"></a><h3>gtk_text_mark_get_left_gravity ()</h3>
280
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_text_mark_get_left_gravity (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
280
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_text_mark_get_left_gravity (<em class="parameter"><code><a class="link" href="GtkTextMark.html" title="GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
282
282
Determines whether the mark has left gravity.
302
302
<a name="GtkTextMark.property-details"></a><h2>Property Details</h2>
303
303
<div class="refsect2" title='The "left-gravity" property'>
304
304
<a name="GtkTextMark--left-gravity"></a><h3>The <code class="literal">"left-gravity"</code> property</h3>
305
<pre class="programlisting"> "left-gravity" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only</pre>
305
<pre class="programlisting"> "left-gravity" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only</pre>
306
306
<p>Whether the mark has left gravity.</p>
307
307
<p>Default value: FALSE</p>
310
310
<div class="refsect2" title='The "name" property'>
311
311
<a name="GtkTextMark--name"></a><h3>The <code class="literal">"name"</code> property</h3>
312
<pre class="programlisting"> "name" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only</pre>
312
<pre class="programlisting"> "name" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only</pre>
313
313
<p>Mark name.</p>
314
314
<p>Default value: NULL</p>
317
317
<div class="footnotes">
318
318
<br><hr width="100" align="left">
319
<div class="footnote"><p><sup>[<a name="ftn.id827762" href="#id827762" class="para">3</a>] </sup>
319
<div class="footnote"><p><sup>[<a name="ftn.id664165" href="#id664165" class="para">3</a>] </sup>
320
320
"left" and "right" here refer to logical direction (left is the toward the start
321
321
of the buffer); in some languages such as Hebrew the logically-leftmost text is
322
322
not actually on the left when displayed.