1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
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">
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>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#GtkTooltip.synopsis" class="shortcut">Top</a>
26
<a href="#GtkTooltip.description" class="shortcut">Description</a>
28
<a href="#GtkTooltip.object-hierarchy" class="shortcut">Object Hierarchy</a>
31
<div class="refentry">
32
<a name="GtkTooltip"></a><div class="titlepage"></div>
33
<div class="refnamediv"><table width="100%"><tr>
35
<h2><span class="refentrytitle"><a name="GtkTooltip.top_of_page"></a>GtkTooltip</span></h2>
36
<p>GtkTooltip — Add tips to your widgets</p>
38
<td valign="top" align="right"></td>
40
<div class="refsynopsisdiv">
41
<a name="GtkTooltip.synopsis"></a><h2>Synopsis</h2>
42
<pre class="synopsis">
43
#include <gtk/gtk.h>
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>);
68
<div class="refsect1">
69
<a name="GtkTooltip.object-hierarchy"></a><h2>Object Hierarchy</h2>
70
<pre class="synopsis">
75
<div class="refsect1">
76
<a name="GtkTooltip.description"></a><h2>Description</h2>
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.
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.
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:
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.
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.
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.
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
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
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.
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.
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>
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>
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.
157
<div class="variablelist"><table border="0" class="variablelist">
159
<col align="left" valign="top">
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>
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>
175
<p class="since">Since 2.12</p>
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>
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>.
186
<div class="variablelist"><table border="0" class="variablelist">
188
<col align="left" valign="top">
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>
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>
204
<p class="since">Since 2.12</p>
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>
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.
215
<div class="variablelist"><table border="0" class="variablelist">
217
<col align="left" valign="top">
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>
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>
233
<p class="since">Since 2.12</p>
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>
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.
246
<div class="variablelist"><table border="0" class="variablelist">
248
<col align="left" valign="top">
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>
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>
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>
269
<p class="since">Since 2.12</p>
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>
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.
282
<div class="variablelist"><table border="0" class="variablelist">
284
<col align="left" valign="top">
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>
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>
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>
305
<p class="since">Since 2.14</p>
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>
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.
318
<div class="variablelist"><table border="0" class="variablelist">
320
<col align="left" valign="top">
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>
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>
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>
341
<p class="since">Since 2.20</p>
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>
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
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>.
356
<div class="variablelist"><table border="0" class="variablelist">
358
<col align="left" valign="top">
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>
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>
374
<p class="since">Since 2.12</p>
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>
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
386
<div class="variablelist"><table border="0" class="variablelist">
388
<col align="left" valign="top">
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>
397
<p class="since">Since 2.12</p>
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>
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>,
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>.
415
<div class="variablelist"><table border="0" class="variablelist">
417
<col align="left" valign="top">
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>
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>
433
<p class="since">Since 2.12</p>
439
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'