New upstream version 3.23.0
This commit is contained in:
@ -3,12 +3,12 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>GtkTextView: GTK+ 3 Reference Manual</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
|
||||
<link rel="up" href="TextWidgetObjects.html" title="Multiline Text Editor">
|
||||
<link rel="prev" href="GtkTextTagTable.html" title="GtkTextTagTable">
|
||||
<link rel="next" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
|
||||
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
|
||||
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -955,31 +955,16 @@ which gives an overview of all the objects and data
|
||||
types related to the text widget and how they work together.</p>
|
||||
<div class="refsect2">
|
||||
<a name="id-1.3.11.8.12.3"></a><h3>CSS nodes</h3>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">textview</span><span class="symbol">.</span><span class="normal">view</span>
|
||||
<span class="normal">├── border</span><span class="symbol">.</span><span class="normal">top</span>
|
||||
<span class="normal">├── border</span><span class="symbol">.</span><span class="normal">left</span>
|
||||
<span class="normal">├── text</span>
|
||||
<span class="normal">│ ╰── </span><span class="symbol">[</span><span class="normal">selection</span><span class="symbol">]</span>
|
||||
<span class="normal">├── border</span><span class="symbol">.</span><span class="normal">right</span>
|
||||
<span class="normal">├── border</span><span class="symbol">.</span><span class="normal">bottom</span>
|
||||
<span class="normal">╰── </span><span class="symbol">[</span><span class="normal">window</span><span class="symbol">.</span><span class="normal">popup</span><span class="symbol">]</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
textview.view
|
||||
├── border.top
|
||||
├── border.left
|
||||
├── text
|
||||
│ ╰── [selection]
|
||||
├── border.right
|
||||
├── border.bottom
|
||||
╰── [window.popup]
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>GtkTextView has a main css node with name textview and style class .view,
|
||||
and subnodes for each of the border windows, and the main text area,
|
||||
@ -1069,7 +1054,7 @@ will not “adopt” it.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>buffer</p></td>
|
||||
<td class="parameter_description"><p>a <a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>. </p></td>
|
||||
<td class="parameter_description"><p> a <a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -1101,7 +1086,7 @@ of this function won’t own a new reference.</p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-text-view-get-buffer.returns"></a><h4>Returns</h4>
|
||||
<p>a <a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>. </p>
|
||||
<p> a <a class="link" href="GtkTextBuffer.html" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>. </p>
|
||||
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -1132,7 +1117,7 @@ gtk_text_view_get_hadjustment (<em class="parameter"><code><a class="link" href=
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-text-view-get-hadjustment.returns"></a><h4>Returns</h4>
|
||||
<p>pointer to the horizontal <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>. </p>
|
||||
<p> pointer to the horizontal <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>. </p>
|
||||
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2.22</p>
|
||||
@ -1164,7 +1149,7 @@ gtk_text_view_get_vadjustment (<em class="parameter"><code><a class="link" href=
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-text-view-get-vadjustment.returns"></a><h4>Returns</h4>
|
||||
<p>pointer to the vertical <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>. </p>
|
||||
<p> pointer to the vertical <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>. </p>
|
||||
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2.22</p>
|
||||
@ -1435,7 +1420,7 @@ with <a class="link" href="GtkTextView.html#gtk-text-view-buffer-to-window-coord
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>visible_rect</p></td>
|
||||
<td class="parameter_description"><p>rectangle to fill. </p></td>
|
||||
<td class="parameter_description"><p> rectangle to fill. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -1475,7 +1460,7 @@ coordinates to coordinates for one of the windows in the text view.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>location</p></td>
|
||||
<td class="parameter_description"><p>bounds of the character at <em class="parameter"><code>iter</code></em>
|
||||
<td class="parameter_description"><p> bounds of the character at <em class="parameter"><code>iter</code></em>
|
||||
. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -1526,18 +1511,18 @@ coordinates to coordinates for one of the windows in the text view.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>iter</p></td>
|
||||
<td class="parameter_description"><p>a <a class="link" href="GtkTextIter.html" title="GtkTextIter"><span class="type">GtkTextIter</span></a>. </p></td>
|
||||
<td class="parameter_description"><p> a <a class="link" href="GtkTextIter.html" title="GtkTextIter"><span class="type">GtkTextIter</span></a>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>strong</p></td>
|
||||
<td class="parameter_description"><p>location to store the strong
|
||||
<td class="parameter_description"><p> location to store the strong
|
||||
cursor position (may be <code class="literal">NULL</code>). </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>weak</p></td>
|
||||
<td class="parameter_description"><p>location to store the weak
|
||||
<td class="parameter_description"><p> location to store the weak
|
||||
cursor position (may be <code class="literal">NULL</code>). </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -1578,7 +1563,7 @@ edge of the line.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>target_iter</p></td>
|
||||
<td class="parameter_description"><p>a <a class="link" href="GtkTextIter.html" title="GtkTextIter"><span class="type">GtkTextIter</span></a>. </p></td>
|
||||
<td class="parameter_description"><p> a <a class="link" href="GtkTextIter.html" title="GtkTextIter"><span class="type">GtkTextIter</span></a>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1588,7 +1573,7 @@ edge of the line.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>line_top</p></td>
|
||||
<td class="parameter_description"><p>return location for top coordinate of the line. </p></td>
|
||||
<td class="parameter_description"><p> return location for top coordinate of the line. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -1628,12 +1613,12 @@ convert to window coordinates with <a class="link" href="GtkTextView.html#gtk-te
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>y</p></td>
|
||||
<td class="parameter_description"><p>return location for a y coordinate. </p></td>
|
||||
<td class="parameter_description"><p> return location for a y coordinate. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>height</p></td>
|
||||
<td class="parameter_description"><p>return location for a height. </p></td>
|
||||
<td class="parameter_description"><p> return location for a height. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -1671,7 +1656,7 @@ event, you have to convert those to buffer coordinates with
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>iter</p></td>
|
||||
<td class="parameter_description"><p>a <a class="link" href="GtkTextIter.html" title="GtkTextIter"><span class="type">GtkTextIter</span></a>. </p></td>
|
||||
<td class="parameter_description"><p> a <a class="link" href="GtkTextIter.html" title="GtkTextIter"><span class="type">GtkTextIter</span></a>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1728,12 +1713,12 @@ characters.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>iter</p></td>
|
||||
<td class="parameter_description"><p>a <a class="link" href="GtkTextIter.html" title="GtkTextIter"><span class="type">GtkTextIter</span></a>. </p></td>
|
||||
<td class="parameter_description"><p> a <a class="link" href="GtkTextIter.html" title="GtkTextIter"><span class="type">GtkTextIter</span></a>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>trailing</p></td>
|
||||
<td class="parameter_description"><p>if non-<code class="literal">NULL</code>, location to store an integer indicating where
|
||||
<td class="parameter_description"><p> if non-<code class="literal">NULL</code>, location to store an integer indicating where
|
||||
in the grapheme the user clicked. It will either be
|
||||
zero, or the number of characters in the grapheme.
|
||||
0 represents the trailing edge of the grapheme. </p></td>
|
||||
@ -1808,12 +1793,12 @@ gtk_text_view_buffer_to_window_coords (<em class="parameter"><code><a class="lin
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>window_x</p></td>
|
||||
<td class="parameter_description"><p>window x coordinate return location or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_description"><p> window x coordinate return location or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>window_y</p></td>
|
||||
<td class="parameter_description"><p>window y coordinate return location or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_description"><p> window y coordinate return location or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -1868,12 +1853,12 @@ coordinates, storing the result in (<em class="parameter"><code>buffer_x</code><
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>buffer_x</p></td>
|
||||
<td class="parameter_description"><p>buffer x coordinate return location or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_description"><p> buffer x coordinate return location or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>buffer_y</p></td>
|
||||
<td class="parameter_description"><p>buffer y coordinate return location or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_description"><p> buffer y coordinate return location or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -1916,7 +1901,7 @@ realized.</p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-text-view-get-window.returns"></a><h4>Returns</h4>
|
||||
<p>a <span class="type">GdkWindow</span>, or <code class="literal">NULL</code>. </p>
|
||||
<p> a <span class="type">GdkWindow</span>, or <code class="literal">NULL</code>. </p>
|
||||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -2377,7 +2362,7 @@ The returned list should be freed with <code class="function">g_list_free()</cod
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-text-child-anchor-get-widgets.returns"></a><h4>Returns</h4>
|
||||
<p>list of widgets anchored at <em class="parameter"><code>anchor</code></em>
|
||||
<p> list of widgets anchored at <em class="parameter"><code>anchor</code></em>
|
||||
. </p>
|
||||
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p>
|
||||
</div>
|
||||
@ -3382,7 +3367,7 @@ with <code class="function">pango_tab_array_free()</code>.</p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-text-view-get-tabs.returns"></a><h4>Returns</h4>
|
||||
<p>copy of default tab array, or <code class="literal">NULL</code> if
|
||||
<p> copy of default tab array, or <code class="literal">NULL</code> if
|
||||
“standard" tabs are used; must be freed with <code class="function">pango_tab_array_free()</code>. </p>
|
||||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
|
||||
</div>
|
||||
@ -3501,51 +3486,26 @@ processing should be done for this key event. See
|
||||
when overriding key event handling. This is needed in the case when
|
||||
you need to insert your own key handling between the input method
|
||||
and the default key event handling of the <a class="link" href="GtkTextView.html" title="GtkTextView"><span class="type">GtkTextView</span></a>.</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> gboolean</span>
|
||||
<span class="function">gtk_foo_bar_key_press_event</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">widget</span><span class="symbol">,</span>
|
||||
<span class="normal"> </span><span class="usertype">GdkEventKey</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">)</span>
|
||||
<span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="usertype">guint</span><span class="normal"> keyval</span><span class="symbol">;</span>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
static gboolean
|
||||
gtk_foo_bar_key_press_event (GtkWidget *widget,
|
||||
GdkEventKey *event)
|
||||
{
|
||||
guint keyval;
|
||||
|
||||
<span class="normal"> </span><span class="function">gdk_event_get_keyval</span><span class="normal"> </span><span class="symbol">((</span><span class="normal">GdkEvent</span><span class="symbol">*)</span><span class="normal">event</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">keyval</span><span class="symbol">);</span>
|
||||
gdk_event_get_keyval ((GdkEvent*)event, &keyval);
|
||||
|
||||
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">keyval </span><span class="symbol">==</span><span class="normal"> GDK_KEY_Return </span><span class="symbol">||</span><span class="normal"> keyval </span><span class="symbol">==</span><span class="normal"> GDK_KEY_KP_Enter</span><span class="symbol">)</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GtkTextView.html#gtk-text-view-im-context-filter-keypress">gtk_text_view_im_context_filter_keypress</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_TEXT_VIEW</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">),</span><span class="normal"> event</span><span class="symbol">))</span>
|
||||
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> TRUE</span><span class="symbol">;</span>
|
||||
<span class="normal"> </span><span class="cbracket">}</span>
|
||||
if (keyval == GDK_KEY_Return || keyval == GDK_KEY_KP_Enter)
|
||||
{
|
||||
if (gtk_text_view_im_context_filter_keypress (GTK_TEXT_VIEW (widget), event))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
<span class="normal"> </span><span class="comment">// Do some stuff</span>
|
||||
|
||||
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="function">GTK_WIDGET_CLASS</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">gtk_foo_bar_parent_class</span><span class="symbol">)-></span><span class="function">key_press_event</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">);</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
// Do some stuff
|
||||
|
||||
return GTK_WIDGET_CLASS (gtk_foo_bar_parent_class)->key_press_event (widget, event);
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-text-view-im-context-filter-keypress.parameters"></a><h4>Parameters</h4>
|
||||
@ -5067,6 +5027,6 @@ which gets emitted to toggle the overwrite mode of the text view.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.27</div>
|
||||
<hr>Generated by GTK-Doc V1.25</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user