527 lines
29 KiB
HTML
527 lines
29 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>GtkTooltip: GTK+ 3 Reference Manual</title>
|
||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
|
||
<link rel="up" href="MiscObjects.html" title="Miscellaneous">
|
||
<link rel="prev" href="GtkSizeGroup.html" title="GtkSizeGroup">
|
||
<link rel="next" href="GtkViewport.html" title="GtkViewport">
|
||
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
|
||
<link rel="stylesheet" href="style.css" type="text/css">
|
||
</head>
|
||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||
<td width="100%" align="left" class="shortcuts">
|
||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||
<a href="#GtkTooltip.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
|
||
<a href="#GtkTooltip.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
|
||
</td>
|
||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||
<td><a accesskey="u" href="MiscObjects.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||
<td><a accesskey="p" href="GtkSizeGroup.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||
<td><a accesskey="n" href="GtkViewport.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||
</tr></table>
|
||
<div class="refentry">
|
||
<a name="GtkTooltip"></a><div class="titlepage"></div>
|
||
<div class="refnamediv"><table width="100%"><tr>
|
||
<td valign="top">
|
||
<h2><span class="refentrytitle"><a name="GtkTooltip.top_of_page"></a>GtkTooltip</span></h2>
|
||
<p>GtkTooltip — Add tips to your widgets</p>
|
||
</td>
|
||
<td class="gallery_image" valign="top" align="right"></td>
|
||
</tr></table></div>
|
||
<div class="refsect1">
|
||
<a name="GtkTooltip.functions"></a><h2>Functions</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="functions_proto_type">
|
||
<col class="functions_proto_name">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkTooltip.html#gtk-tooltip-set-markup" title="gtk_tooltip_set_markup ()">gtk_tooltip_set_markup</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkTooltip.html#gtk-tooltip-set-text" title="gtk_tooltip_set_text ()">gtk_tooltip_set_text</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkTooltip.html#gtk-tooltip-set-icon" title="gtk_tooltip_set_icon ()">gtk_tooltip_set_icon</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<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> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<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> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<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> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkTooltip.html#gtk-tooltip-set-custom" title="gtk_tooltip_set_custom ()">gtk_tooltip_set_custom</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkTooltip.html#gtk-tooltip-trigger-tooltip-query" title="gtk_tooltip_trigger_tooltip_query ()">gtk_tooltip_trigger_tooltip_query</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkTooltip.html#gtk-tooltip-set-tip-area" title="gtk_tooltip_set_tip_area ()">gtk_tooltip_set_tip_area</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkTooltip.other"></a><h2>Types and Values</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="other_proto_type">
|
||
<col class="other_proto_name">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="datatype_keyword"> </td>
|
||
<td class="function_name"><a class="link" href="GtkTooltip.html#GtkTooltip-struct" title="GtkTooltip">GtkTooltip</a></td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkTooltip.object-hierarchy"></a><h2>Object Hierarchy</h2>
|
||
<pre class="screen"> GObject
|
||
<span class="lineart">╰──</span> GtkTooltip
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkTooltip.includes"></a><h2>Includes</h2>
|
||
<pre class="synopsis">#include <gtk/gtk.h>
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkTooltip.description"></a><h2>Description</h2>
|
||
<p>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>
|
||
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.</p>
|
||
<p>When you need a tooltip with a little more fancy contents, like adding an
|
||
image, or you want the tooltip to have different contents per <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a>
|
||
row or cell, you will have to do a little more work:</p>
|
||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||
<li class="listitem"><p>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 make GTK+
|
||
monitor the widget for motion and related events which are needed to
|
||
determine when and where to show a tooltip.</p></li>
|
||
<li class="listitem">
|
||
<p>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 will be
|
||
emitted when a tooltip is supposed to be shown. One of the arguments passed
|
||
to the signal handler is a GtkTooltip object. This is the object that we
|
||
are about to display as a tooltip, and can be manipulated in your callback
|
||
using functions 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
|
||
the tooltip’s markup, setting an image from a named icon, or even putting in
|
||
a custom widget.</p>
|
||
<p>Return <code class="literal">TRUE</code> from your query-tooltip handler. This causes the tooltip to be
|
||
show. If you return <code class="literal">FALSE</code>, it will not be shown.</p>
|
||
</li>
|
||
</ul></div>
|
||
<p>In the probably rare case where you want to have even more control over the
|
||
tooltip that is about to be shown, you can set your own <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> which
|
||
will be used as tooltip window. This works as follows:</p>
|
||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||
<li class="listitem"><p>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 before.
|
||
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 by you as
|
||
tooltip window.</p></li>
|
||
<li class="listitem"><p>In the <a class="link" href="GtkWidget.html#GtkWidget-query-tooltip" title="The “query-tooltip” signal"><span class="type">“query-tooltip”</span></a> callback you can access your window 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 wish. The semantics of
|
||
the return value are exactly as before, return <code class="literal">TRUE</code> to show the window,
|
||
<code class="literal">FALSE</code> to not show it.</p></li>
|
||
</ul></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkTooltip.functions_details"></a><h2>Functions</h2>
|
||
<div class="refsect2">
|
||
<a name="gtk-tooltip-set-markup"></a><h3>gtk_tooltip_set_markup ()</h3>
|
||
<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>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *markup</code></em>);</pre>
|
||
<p>Sets the text of the tooltip to be <em class="parameter"><code>markup</code></em>
|
||
, which is marked up
|
||
with the Pango text markup language.
|
||
If <em class="parameter"><code>markup</code></em>
|
||
is <code class="literal">NULL</code>, the label will be hidden.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-tooltip-set-markup.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>tooltip</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>markup</p></td>
|
||
<td class="parameter_description"><p>a markup string (see Pango markup format) or <code class="literal">NULL</code>. </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>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.12</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-tooltip-set-text"></a><h3>gtk_tooltip_set_text ()</h3>
|
||
<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>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>);</pre>
|
||
<p>Sets the text of the tooltip to be <em class="parameter"><code>text</code></em>
|
||
. If <em class="parameter"><code>text</code></em>
|
||
is <code class="literal">NULL</code>, the label
|
||
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>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-tooltip-set-text.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>tooltip</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>text</p></td>
|
||
<td class="parameter_description"><p>a text string or <code class="literal">NULL</code>. </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>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.12</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-tooltip-set-icon"></a><h3>gtk_tooltip_set_icon ()</h3>
|
||
<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>,
|
||
<em class="parameter"><code><span class="type">GdkPixbuf</span> *pixbuf</code></em>);</pre>
|
||
<p>Sets the icon of the tooltip (which is in front of the text) to be
|
||
<em class="parameter"><code>pixbuf</code></em>
|
||
. If <em class="parameter"><code>pixbuf</code></em>
|
||
is <code class="literal">NULL</code>, the image will be hidden.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-tooltip-set-icon.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>tooltip</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>pixbuf</p></td>
|
||
<td class="parameter_description"><p>a <span class="type">GdkPixbuf</span>, or <code class="literal">NULL</code>. </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>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.12</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-tooltip-set-icon-from-stock"></a><h3>gtk_tooltip_set_icon_from_stock ()</h3>
|
||
<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>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *stock_id</code></em>,
|
||
<em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_tooltip_set_icon_from_stock</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkTooltip.html#gtk-tooltip-set-icon-from-icon-name" title="gtk_tooltip_set_icon_from_icon_name ()"><code class="function">gtk_tooltip_set_icon_from_icon_name()</code></a> instead.</p>
|
||
</div>
|
||
<p>Sets the icon of the tooltip (which is in front of the text) to be
|
||
the stock item indicated by <em class="parameter"><code>stock_id</code></em>
|
||
with the size indicated
|
||
by <em class="parameter"><code>size</code></em>
|
||
. If <em class="parameter"><code>stock_id</code></em>
|
||
is <code class="literal">NULL</code>, the image will be hidden.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-tooltip-set-icon-from-stock.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>tooltip</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>stock_id</p></td>
|
||
<td class="parameter_description"><p>a stock id, or <code class="literal">NULL</code>. </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>size</p></td>
|
||
<td class="parameter_description"><p>a stock icon size (<a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a>). </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> int]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.12</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-tooltip-set-icon-from-icon-name"></a><h3>gtk_tooltip_set_icon_from_icon_name ()</h3>
|
||
<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>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *icon_name</code></em>,
|
||
<em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
|
||
<p>Sets the icon of the tooltip (which is in front of the text) to be
|
||
the icon indicated by <em class="parameter"><code>icon_name</code></em>
|
||
with the size indicated
|
||
by <em class="parameter"><code>size</code></em>
|
||
. If <em class="parameter"><code>icon_name</code></em>
|
||
is <code class="literal">NULL</code>, the image will be hidden.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-tooltip-set-icon-from-icon-name.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>tooltip</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>icon_name</p></td>
|
||
<td class="parameter_description"><p>an icon name, or <code class="literal">NULL</code>. </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>size</p></td>
|
||
<td class="parameter_description"><p>a stock icon size (<a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a>). </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> int]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.14</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-tooltip-set-icon-from-gicon"></a><h3>gtk_tooltip_set_icon_from_gicon ()</h3>
|
||
<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>,
|
||
<em class="parameter"><code><span class="type">GIcon</span> *gicon</code></em>,
|
||
<em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
|
||
<p>Sets the icon of the tooltip (which is in front of the text)
|
||
to be the icon indicated by <em class="parameter"><code>gicon</code></em>
|
||
with the size indicated
|
||
by <em class="parameter"><code>size</code></em>
|
||
. If <em class="parameter"><code>gicon</code></em>
|
||
is <code class="literal">NULL</code>, the image will be hidden.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-tooltip-set-icon-from-gicon.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>tooltip</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>gicon</p></td>
|
||
<td class="parameter_description"><p>a <span class="type">GIcon</span> representing the icon, or <code class="literal">NULL</code>. </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>size</p></td>
|
||
<td class="parameter_description"><p>a stock icon size (<a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a>). </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> int]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.20</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-tooltip-set-custom"></a><h3>gtk_tooltip_set_custom ()</h3>
|
||
<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>,
|
||
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *custom_widget</code></em>);</pre>
|
||
<p>Replaces the widget packed into the tooltip with
|
||
<em class="parameter"><code>custom_widget</code></em>
|
||
. <em class="parameter"><code>custom_widget</code></em>
|
||
does not get destroyed when the tooltip goes
|
||
away.
|
||
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
|
||
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>
|
||
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>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-tooltip-set-custom.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>tooltip</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>custom_widget</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>, or <code class="literal">NULL</code> to unset the old custom widget. </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>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.12</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-tooltip-trigger-tooltip-query"></a><h3>gtk_tooltip_trigger_tooltip_query ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_tooltip_trigger_tooltip_query (<em class="parameter"><code><span class="type">GdkDisplay</span> *display</code></em>);</pre>
|
||
<p>Triggers a new tooltip query on <em class="parameter"><code>display</code></em>
|
||
, in order to update the current
|
||
visible tooltip, or to show/hide the current tooltip. This function is
|
||
useful to call when, for example, the state of the widget changed by a
|
||
key press.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-tooltip-trigger-tooltip-query.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>display</p></td>
|
||
<td class="parameter_description"><p>a <span class="type">GdkDisplay</span></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.12</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-tooltip-set-tip-area"></a><h3>gtk_tooltip_set_tip_area ()</h3>
|
||
<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>,
|
||
<em class="parameter"><code>const <span class="type">GdkRectangle</span> *rect</code></em>);</pre>
|
||
<p>Sets the area of the widget, where the contents of this tooltip apply,
|
||
to be <em class="parameter"><code>rect</code></em>
|
||
(in widget coordinates). This is especially useful for
|
||
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#GtkIconView-struct"><span class="type">GtkIconViews</span></a>,
|
||
etc.</p>
|
||
<p>For setting tooltips on <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a>, please refer to the convenience
|
||
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
|
||
<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>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-tooltip-set-tip-area.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>tooltip</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkTooltip.html" title="GtkTooltip"><span class="type">GtkTooltip</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>rect</p></td>
|
||
<td class="parameter_description"><p>a <span class="type">GdkRectangle</span></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.12</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkTooltip.other_details"></a><h2>Types and Values</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkTooltip-struct"></a><h3>GtkTooltip</h3>
|
||
<pre class="programlisting">typedef struct _GtkTooltip GtkTooltip;</pre>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="footer">
|
||
<hr>Generated by GTK-Doc V1.33.1</div>
|
||
</body>
|
||
</html> |