~inkscape.dev/inkscape-devlibs/devlibs-gtk3

« back to all changes in this revision

Viewing changes to share/gtk-doc/html/gtk2/GtkTooltip.html

  • Committer: JazzyNico
  • Date: 2013-01-21 10:11:05 UTC
  • Revision ID: nicoduf@yahoo.fr-20130121101105-i8d8slkq9ng4olx8
Adding gtk2 libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>GtkTooltip</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
 
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
 
8
<link rel="up" href="MiscObjects.html" title="Miscellaneous">
 
9
<link rel="prev" href="GtkSizeGroup.html" title="GtkSizeGroup">
 
10
<link rel="next" href="GtkViewport.html" title="GtkViewport">
 
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
 
17
<td><a accesskey="p" href="GtkSizeGroup.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
18
<td><a accesskey="u" href="MiscObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
20
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
 
21
<td><a accesskey="n" href="GtkViewport.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#GtkTooltip.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#GtkTooltip.description" class="shortcut">Description</a>
 
27
                   | 
 
28
                  <a href="#GtkTooltip.object-hierarchy" class="shortcut">Object Hierarchy</a>
 
29
</td></tr>
 
30
</table>
 
31
<div class="refentry">
 
32
<a name="GtkTooltip"></a><div class="titlepage"></div>
 
33
<div class="refnamediv"><table width="100%"><tr>
 
34
<td valign="top">
 
35
<h2><span class="refentrytitle"><a name="GtkTooltip.top_of_page"></a>GtkTooltip</span></h2>
 
36
<p>GtkTooltip — Add tips to your widgets</p>
 
37
</td>
 
38
<td valign="top" align="right"></td>
 
39
</tr></table></div>
 
40
<div class="refsynopsisdiv">
 
41
<a name="GtkTooltip.synopsis"></a><h2>Synopsis</h2>
 
42
<pre class="synopsis">
 
43
#include &lt;gtk/gtk.h&gt;
 
44
 
 
45
                    <a class="link" href="GtkTooltip.html#GtkTooltip-struct" title="GtkTooltip">GtkTooltip</a>;
 
46
<span class="returnvalue">void</span>                <a class="link" href="GtkTooltip.html#gtk-tooltip-set-markup" title="gtk_tooltip_set_markup ()">gtk_tooltip_set_markup</a>              (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
47
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *markup</code></em>);
 
48
<span class="returnvalue">void</span>                <a class="link" href="GtkTooltip.html#gtk-tooltip-set-text" title="gtk_tooltip_set_text ()">gtk_tooltip_set_text</a>                (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
49
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>);
 
50
<span class="returnvalue">void</span>                <a class="link" href="GtkTooltip.html#gtk-tooltip-set-icon" title="gtk_tooltip_set_icon ()">gtk_tooltip_set_icon</a>                (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
51
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);
 
52
<span class="returnvalue">void</span>                <a class="link" href="GtkTooltip.html#gtk-tooltip-set-icon-from-stock" title="gtk_tooltip_set_icon_from_stock ()">gtk_tooltip_set_icon_from_stock</a>     (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
53
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *stock_id</code></em>,
 
54
                                                         <em class="parameter"><code><a class="link" href="gtk2-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
 
55
<span class="returnvalue">void</span>                <a class="link" href="GtkTooltip.html#gtk-tooltip-set-icon-from-icon-name" title="gtk_tooltip_set_icon_from_icon_name ()">gtk_tooltip_set_icon_from_icon_name</a> (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
56
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *icon_name</code></em>,
 
57
                                                         <em class="parameter"><code><a class="link" href="gtk2-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
 
58
<span class="returnvalue">void</span>                <a class="link" href="GtkTooltip.html#gtk-tooltip-set-icon-from-gicon" title="gtk_tooltip_set_icon_from_gicon ()">gtk_tooltip_set_icon_from_gicon</a>     (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
59
                                                         <em class="parameter"><code><span class="type">GIcon</span> *gicon</code></em>,
 
60
                                                         <em class="parameter"><code><a class="link" href="gtk2-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
 
61
<span class="returnvalue">void</span>                <a class="link" href="GtkTooltip.html#gtk-tooltip-set-custom" title="gtk_tooltip_set_custom ()">gtk_tooltip_set_custom</a>              (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
62
                                                         <em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *custom_widget</code></em>);
 
63
<span class="returnvalue">void</span>                <a class="link" href="GtkTooltip.html#gtk-tooltip-trigger-tooltip-query" title="gtk_tooltip_trigger_tooltip_query ()">gtk_tooltip_trigger_tooltip_query</a>   (<em class="parameter"><code><a href="../gdk2/GdkDisplay.html"><span class="type">GdkDisplay</span></a> *display</code></em>);
 
64
<span class="returnvalue">void</span>                <a class="link" href="GtkTooltip.html#gtk-tooltip-set-tip-area" title="gtk_tooltip_set_tip_area ()">gtk_tooltip_set_tip_area</a>            (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
65
                                                         <em class="parameter"><code>const <a href="../gdk2/gdk2-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a> *rect</code></em>);
 
66
</pre>
 
67
</div>
 
68
<div class="refsect1">
 
69
<a name="GtkTooltip.object-hierarchy"></a><h2>Object Hierarchy</h2>
 
70
<pre class="synopsis">
 
71
  GObject
 
72
   +----GtkTooltip
 
73
</pre>
 
74
</div>
 
75
<div class="refsect1">
 
76
<a name="GtkTooltip.description"></a><h2>Description</h2>
 
77
<p>
 
78
<a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> belongs to the new tooltips API that was
 
79
introduced in GTK+ 2.12 and which deprecates the old
 
80
<a class="link" href="GtkTooltips.html" title="GtkTooltips"><span class="type">GtkTooltips</span></a> API.
 
81
</p>
 
82
<p>
 
83
Basic tooltips can be realized simply by using <a class="link" href="GtkWidget.html#gtk-widget-set-tooltip-text" title="gtk_widget_set_tooltip_text ()"><code class="function">gtk_widget_set_tooltip_text()</code></a>
 
84
or <a class="link" href="GtkWidget.html#gtk-widget-set-tooltip-markup" title="gtk_widget_set_tooltip_markup ()"><code class="function">gtk_widget_set_tooltip_markup()</code></a> without any explicit tooltip object.
 
85
</p>
 
86
<p>
 
87
When you need a tooltip with a little more fancy contents, like
 
88
adding an image, or you want the tooltip to have different contents
 
89
per GtkTreeView row or cell, you will have to do a little more work:
 
90
</p>
 
91
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 
92
<li class="listitem"><p>
 
93
Set the <a class="link" href="GtkWidget.html#GtkWidget--has-tooltip" title='The "has-tooltip" property'><span class="type">"has-tooltip"</span></a> property to <code class="literal">TRUE</code>, this will
 
94
make GTK+ monitor the widget for motion and related events
 
95
which are needed to determine when and where to show a tooltip.
 
96
</p></li>
 
97
<li class="listitem"><p>
 
98
Connect to the <a class="link" href="GtkWidget.html#GtkWidget-query-tooltip" title='The "query-tooltip" signal'><span class="type">"query-tooltip"</span></a> signal.  This signal
 
99
will be emitted when a tooltip is supposed to be shown. One
 
100
of the arguments passed to the signal handler is a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a>
 
101
object. This is the object that we are about to display as a
 
102
tooltip, and can be manipulated in your callback using functions
 
103
like <a class="link" href="GtkTooltip.html#gtk-tooltip-set-icon" title="gtk_tooltip_set_icon ()"><code class="function">gtk_tooltip_set_icon()</code></a>. There are functions for setting
 
104
the tooltip's markup, setting an image from a stock icon, or
 
105
even putting in a custom widget.
 
106
</p></li>
 
107
<li class="listitem"><p>
 
108
Return <code class="literal">TRUE</code> from your query-tooltip handler. This causes
 
109
the tooltip to be show. If you return <code class="literal">FALSE</code>, it will not be shown.
 
110
</p></li>
 
111
</ul></div>
 
112
<p>
 
113
</p>
 
114
<p>
 
115
In the probably rare case where you want to have even more control
 
116
over the tooltip that is about to be shown, you can set your own
 
117
<a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> which will be used as tooltip window.  This works as
 
118
follows:
 
119
</p>
 
120
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 
121
<li class="listitem"><p>
 
122
Set <a class="link" href="GtkWidget.html#GtkWidget--has-tooltip" title='The "has-tooltip" property'><span class="type">"has-tooltip"</span></a> and connect to <a class="link" href="GtkWidget.html#GtkWidget-query-tooltip" title='The "query-tooltip" signal'><span class="type">"query-tooltip"</span></a> as
 
123
before.
 
124
</p></li>
 
125
<li class="listitem"><p>
 
126
Use <a class="link" href="GtkWidget.html#gtk-widget-set-tooltip-window" title="gtk_widget_set_tooltip_window ()"><code class="function">gtk_widget_set_tooltip_window()</code></a> to set a <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> created
 
127
by you as tooltip window.
 
128
</p></li>
 
129
<li class="listitem"><p>
 
130
In the ::query-tooltip callback you can access your window
 
131
using <a class="link" href="GtkWidget.html#gtk-widget-get-tooltip-window" title="gtk_widget_get_tooltip_window ()"><code class="function">gtk_widget_get_tooltip_window()</code></a> and manipulate as you
 
132
wish. The semantics of the return value are exactly as before,
 
133
return <code class="literal">TRUE</code> to show the window, <code class="literal">FALSE</code> to not show it.
 
134
</p></li>
 
135
</ul></div>
 
136
<p>
 
137
</p>
 
138
</div>
 
139
<div class="refsect1">
 
140
<a name="GtkTooltip.details"></a><h2>Details</h2>
 
141
<div class="refsect2">
 
142
<a name="GtkTooltip-struct"></a><h3>GtkTooltip</h3>
 
143
<pre class="programlisting">typedef struct _GtkTooltip GtkTooltip;</pre>
 
144
<p>
 
145
</p>
 
146
</div>
 
147
<hr>
 
148
<div class="refsect2">
 
149
<a name="gtk-tooltip-set-markup"></a><h3>gtk_tooltip_set_markup ()</h3>
 
150
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tooltip_set_markup              (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
151
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *markup</code></em>);</pre>
 
152
<p>
 
153
Sets the text of the tooltip to be <em class="parameter"><code>markup</code></em>, which is marked up
 
154
with the <a href="/usr/share/gtk-doc/html/pango/PangoMarkupFormat.html">Pango text markup language</a>.
 
155
If <em class="parameter"><code>markup</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, the label will be hidden.
 
156
</p>
 
157
<div class="variablelist"><table border="0" class="variablelist">
 
158
<colgroup>
 
159
<col align="left" valign="top">
 
160
<col>
 
161
</colgroup>
 
162
<tbody>
 
163
<tr>
 
164
<td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td>
 
165
<td>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a>
 
166
</td>
 
167
</tr>
 
168
<tr>
 
169
<td><p><span class="term"><em class="parameter"><code>markup</code></em> :</span></p></td>
 
170
<td>a markup string (see <a href="/usr/share/gtk-doc/html/pango/PangoMarkupFormat.html">Pango markup format</a>) or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
171
</td>
 
172
</tr>
 
173
</tbody>
 
174
</table></div>
 
175
<p class="since">Since 2.12</p>
 
176
</div>
 
177
<hr>
 
178
<div class="refsect2">
 
179
<a name="gtk-tooltip-set-text"></a><h3>gtk_tooltip_set_text ()</h3>
 
180
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tooltip_set_text                (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
181
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>);</pre>
 
182
<p>
 
183
Sets the text of the tooltip to be <em class="parameter"><code>text</code></em>. If <em class="parameter"><code>text</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, the label
 
184
will be hidden. See also <a class="link" href="GtkTooltip.html#gtk-tooltip-set-markup" title="gtk_tooltip_set_markup ()"><code class="function">gtk_tooltip_set_markup()</code></a>.
 
185
</p>
 
186
<div class="variablelist"><table border="0" class="variablelist">
 
187
<colgroup>
 
188
<col align="left" valign="top">
 
189
<col>
 
190
</colgroup>
 
191
<tbody>
 
192
<tr>
 
193
<td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td>
 
194
<td>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a>
 
195
</td>
 
196
</tr>
 
197
<tr>
 
198
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
 
199
<td>a text string or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
200
</td>
 
201
</tr>
 
202
</tbody>
 
203
</table></div>
 
204
<p class="since">Since 2.12</p>
 
205
</div>
 
206
<hr>
 
207
<div class="refsect2">
 
208
<a name="gtk-tooltip-set-icon"></a><h3>gtk_tooltip_set_icon ()</h3>
 
209
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tooltip_set_icon                (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
210
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
 
211
<p>
 
212
Sets the icon of the tooltip (which is in front of the text) to be
 
213
<em class="parameter"><code>pixbuf</code></em>.  If <em class="parameter"><code>pixbuf</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, the image will be hidden.
 
214
</p>
 
215
<div class="variablelist"><table border="0" class="variablelist">
 
216
<colgroup>
 
217
<col align="left" valign="top">
 
218
<col>
 
219
</colgroup>
 
220
<tbody>
 
221
<tr>
 
222
<td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td>
 
223
<td>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a>
 
224
</td>
 
225
</tr>
 
226
<tr>
 
227
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
 
228
<td>a <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
229
</td>
 
230
</tr>
 
231
</tbody>
 
232
</table></div>
 
233
<p class="since">Since 2.12</p>
 
234
</div>
 
235
<hr>
 
236
<div class="refsect2">
 
237
<a name="gtk-tooltip-set-icon-from-stock"></a><h3>gtk_tooltip_set_icon_from_stock ()</h3>
 
238
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tooltip_set_icon_from_stock     (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
239
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *stock_id</code></em>,
 
240
                                                         <em class="parameter"><code><a class="link" href="gtk2-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
 
241
<p>
 
242
Sets the icon of the tooltip (which is in front of the text) to be
 
243
the stock item indicated by <em class="parameter"><code>stock_id</code></em> with the size indicated
 
244
by <em class="parameter"><code>size</code></em>.  If <em class="parameter"><code>stock_id</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, the image will be hidden.
 
245
</p>
 
246
<div class="variablelist"><table border="0" class="variablelist">
 
247
<colgroup>
 
248
<col align="left" valign="top">
 
249
<col>
 
250
</colgroup>
 
251
<tbody>
 
252
<tr>
 
253
<td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td>
 
254
<td>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a>
 
255
</td>
 
256
</tr>
 
257
<tr>
 
258
<td><p><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></p></td>
 
259
<td>a stock id, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
260
</td>
 
261
</tr>
 
262
<tr>
 
263
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
 
264
<td>a stock icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
 
265
</td>
 
266
</tr>
 
267
</tbody>
 
268
</table></div>
 
269
<p class="since">Since 2.12</p>
 
270
</div>
 
271
<hr>
 
272
<div class="refsect2">
 
273
<a name="gtk-tooltip-set-icon-from-icon-name"></a><h3>gtk_tooltip_set_icon_from_icon_name ()</h3>
 
274
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tooltip_set_icon_from_icon_name (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
275
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *icon_name</code></em>,
 
276
                                                         <em class="parameter"><code><a class="link" href="gtk2-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
 
277
<p>
 
278
Sets the icon of the tooltip (which is in front of the text) to be
 
279
the icon indicated by <em class="parameter"><code>icon_name</code></em> with the size indicated
 
280
by <em class="parameter"><code>size</code></em>.  If <em class="parameter"><code>icon_name</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, the image will be hidden.
 
281
</p>
 
282
<div class="variablelist"><table border="0" class="variablelist">
 
283
<colgroup>
 
284
<col align="left" valign="top">
 
285
<col>
 
286
</colgroup>
 
287
<tbody>
 
288
<tr>
 
289
<td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td>
 
290
<td>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a>
 
291
</td>
 
292
</tr>
 
293
<tr>
 
294
<td><p><span class="term"><em class="parameter"><code>icon_name</code></em> :</span></p></td>
 
295
<td>an icon name, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
296
</td>
 
297
</tr>
 
298
<tr>
 
299
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
 
300
<td>a stock icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
 
301
</td>
 
302
</tr>
 
303
</tbody>
 
304
</table></div>
 
305
<p class="since">Since 2.14</p>
 
306
</div>
 
307
<hr>
 
308
<div class="refsect2">
 
309
<a name="gtk-tooltip-set-icon-from-gicon"></a><h3>gtk_tooltip_set_icon_from_gicon ()</h3>
 
310
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tooltip_set_icon_from_gicon     (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
311
                                                         <em class="parameter"><code><span class="type">GIcon</span> *gicon</code></em>,
 
312
                                                         <em class="parameter"><code><a class="link" href="gtk2-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
 
313
<p>
 
314
Sets the icon of the tooltip (which is in front of the text)
 
315
to be the icon indicated by <em class="parameter"><code>gicon</code></em> with the size indicated
 
316
by <em class="parameter"><code>size</code></em>. If <em class="parameter"><code>gicon</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, the image will be hidden.
 
317
</p>
 
318
<div class="variablelist"><table border="0" class="variablelist">
 
319
<colgroup>
 
320
<col align="left" valign="top">
 
321
<col>
 
322
</colgroup>
 
323
<tbody>
 
324
<tr>
 
325
<td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td>
 
326
<td>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a>
 
327
</td>
 
328
</tr>
 
329
<tr>
 
330
<td><p><span class="term"><em class="parameter"><code>gicon</code></em> :</span></p></td>
 
331
<td>a <span class="type">GIcon</span> representing the icon, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
332
</td>
 
333
</tr>
 
334
<tr>
 
335
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
 
336
<td>a stock icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
 
337
</td>
 
338
</tr>
 
339
</tbody>
 
340
</table></div>
 
341
<p class="since">Since 2.20</p>
 
342
</div>
 
343
<hr>
 
344
<div class="refsect2">
 
345
<a name="gtk-tooltip-set-custom"></a><h3>gtk_tooltip_set_custom ()</h3>
 
346
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tooltip_set_custom              (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
347
                                                         <em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *custom_widget</code></em>);</pre>
 
348
<p>
 
349
Replaces the widget packed into the tooltip with
 
350
<em class="parameter"><code>custom_widget</code></em>. <em class="parameter"><code>custom_widget</code></em> does not get destroyed when the tooltip goes
 
351
away.
 
352
By default a box with a <a class="link" href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> and <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> is embedded in 
 
353
the tooltip, which can be configured using <a class="link" href="GtkTooltip.html#gtk-tooltip-set-markup" title="gtk_tooltip_set_markup ()"><code class="function">gtk_tooltip_set_markup()</code></a> 
 
354
and <a class="link" href="GtkTooltip.html#gtk-tooltip-set-icon" title="gtk_tooltip_set_icon ()"><code class="function">gtk_tooltip_set_icon()</code></a>.
 
355
</p>
 
356
<div class="variablelist"><table border="0" class="variablelist">
 
357
<colgroup>
 
358
<col align="left" valign="top">
 
359
<col>
 
360
</colgroup>
 
361
<tbody>
 
362
<tr>
 
363
<td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td>
 
364
<td>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a>
 
365
</td>
 
366
</tr>
 
367
<tr>
 
368
<td><p><span class="term"><em class="parameter"><code>custom_widget</code></em> :</span></p></td>
 
369
<td>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to unset the old custom widget. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
370
</td>
 
371
</tr>
 
372
</tbody>
 
373
</table></div>
 
374
<p class="since">Since 2.12</p>
 
375
</div>
 
376
<hr>
 
377
<div class="refsect2">
 
378
<a name="gtk-tooltip-trigger-tooltip-query"></a><h3>gtk_tooltip_trigger_tooltip_query ()</h3>
 
379
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tooltip_trigger_tooltip_query   (<em class="parameter"><code><a href="../gdk2/GdkDisplay.html"><span class="type">GdkDisplay</span></a> *display</code></em>);</pre>
 
380
<p>
 
381
Triggers a new tooltip query on <em class="parameter"><code>display</code></em>, in order to update the current
 
382
visible tooltip, or to show/hide the current tooltip.  This function is
 
383
useful to call when, for example, the state of the widget changed by a
 
384
key press.
 
385
</p>
 
386
<div class="variablelist"><table border="0" class="variablelist">
 
387
<colgroup>
 
388
<col align="left" valign="top">
 
389
<col>
 
390
</colgroup>
 
391
<tbody><tr>
 
392
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
 
393
<td>a <a href="../gdk2/GdkDisplay.html"><span class="type">GdkDisplay</span></a>
 
394
</td>
 
395
</tr></tbody>
 
396
</table></div>
 
397
<p class="since">Since 2.12</p>
 
398
</div>
 
399
<hr>
 
400
<div class="refsect2">
 
401
<a name="gtk-tooltip-set-tip-area"></a><h3>gtk_tooltip_set_tip_area ()</h3>
 
402
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tooltip_set_tip_area            (<em class="parameter"><code><a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a> *tooltip</code></em>,
 
403
                                                         <em class="parameter"><code>const <a href="../gdk2/gdk2-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a> *rect</code></em>);</pre>
 
404
<p>
 
405
Sets the area of the widget, where the contents of this tooltip apply,
 
406
to be <em class="parameter"><code>rect</code></em> (in widget coordinates).  This is especially useful for
 
407
properly setting tooltips on <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a> rows and cells, <a href="GtkIconView.html"><span class="type">GtkIconViews</span></a>,
 
408
etc.
 
409
</p>
 
410
<p>
 
411
For setting tooltips on <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a>, please refer to the convenience
 
412
functions for this: <a class="link" href="GtkTreeView.html#gtk-tree-view-set-tooltip-row" title="gtk_tree_view_set_tooltip_row ()"><code class="function">gtk_tree_view_set_tooltip_row()</code></a> and
 
413
<a class="link" href="GtkTreeView.html#gtk-tree-view-set-tooltip-cell" title="gtk_tree_view_set_tooltip_cell ()"><code class="function">gtk_tree_view_set_tooltip_cell()</code></a>.
 
414
</p>
 
415
<div class="variablelist"><table border="0" class="variablelist">
 
416
<colgroup>
 
417
<col align="left" valign="top">
 
418
<col>
 
419
</colgroup>
 
420
<tbody>
 
421
<tr>
 
422
<td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td>
 
423
<td>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a>
 
424
</td>
 
425
</tr>
 
426
<tr>
 
427
<td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
 
428
<td>a <a href="../gdk2/gdk2-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a>
 
429
</td>
 
430
</tr>
 
431
</tbody>
 
432
</table></div>
 
433
<p class="since">Since 2.12</p>
 
434
</div>
 
435
</div>
 
436
</div>
 
437
<div class="footer">
 
438
<hr>
 
439
          Generated by GTK-Doc V1.18</div>
 
440
</body>
 
441
</html>
 
 
b'\\ No newline at end of file'