1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Tooltips</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtktooltip.html" title="gtk.Tooltip"><link rel="next" href="class-gtktreedragdest.html" title="gtk.TreeDragDest"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.Tooltips</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktooltip.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtktreedragdest.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktooltips"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Tooltips</h2><p>gtk.Tooltips — add tips to your widgets.</p></div><div class="refsect1" lang="en"><a name="id3763979"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Tooltips</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a></span></span>):
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Tooltips</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtktooltip.html" title="gtk.Tooltip"><link rel="next" href="class-gtktreedragdest.html" title="gtk.TreeDragDest"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.Tooltips</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktooltip.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtktreedragdest.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktooltips"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Tooltips</h2><p>gtk.Tooltips — add tips to your widgets.</p></div><div class="refsect1" lang="en"><a name="id3964886"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Tooltips</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a></span></span>):
2
2
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtktooltips.html#constructor-gtktooltips" title="Constructor">gtk.Tooltips</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktooltips.html#method-gtktooltips--enable" title="gtk.Tooltips.enable">enable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktooltips.html#method-gtktooltips--disable" title="gtk.Tooltips.disable">disable</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktooltips.html#method-gtktooltips--set-tip" title="gtk.Tooltips.set_tip">set_tip</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_text</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_private</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktooltips.html#method-gtktooltips--force-window" title="gtk.Tooltips.force_window">force_window</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
3
3
<span class="bold"><strong>Functions</strong></span>
5
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktooltips.html#function-gtk--tooltips-data-get" title="gtk.tooltips_data_get">gtk.tooltips_data_get</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>)</code></pre></div><div class="refsect1" lang="en"><a name="id3764185"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
5
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktooltips.html#function-gtk--tooltips-data-get" title="gtk.tooltips_data_get">gtk.tooltips_data_get</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>)</code></pre></div><div class="refsect1" lang="en"><a name="id3965093"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
6
6
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
7
7
+-- <a class="link" href="class-gtktooltips.html" title="gtk.Tooltips">gtk.Tooltips</a>
8
</pre></div><div class="refsect1" lang="en"><a name="properties-gtktooltips"></a><h2>gtk.Tooltips Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p></div><div class="refsect1" lang="en"><a name="id3764236"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"tip_window"</td><td valign="top">Read</td><td valign="top">The window that the tooltip is displayed in.</td></tr><tr valign="top"><td valign="top">"tip_label"</td><td valign="top">Read</td><td valign="top">The label that displays the tooltip text.</td></tr><tr valign="top"><td valign="top">"active_tips_data"</td><td valign="top">Read</td><td valign="top">The data associated with the active tooltip.</td></tr><tr valign="top"><td valign="top">"tips_data_list"</td><td valign="top">Read</td><td valign="top">A list containing the data associated with the tooltips in a tooltips group. For each tooltip the data is a tuple containing:
8
</pre></div><div class="refsect1" lang="en"><a name="properties-gtktooltips"></a><h2>gtk.Tooltips Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p></div><div class="refsect1" lang="en"><a name="id3965144"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"tip_window"</td><td valign="top">Read</td><td valign="top">The window that the tooltip is displayed in.</td></tr><tr valign="top"><td valign="top">"tip_label"</td><td valign="top">Read</td><td valign="top">The label that displays the tooltip text.</td></tr><tr valign="top"><td valign="top">"active_tips_data"</td><td valign="top">Read</td><td valign="top">The data associated with the active tooltip.</td></tr><tr valign="top"><td valign="top">"tips_data_list"</td><td valign="top">Read</td><td valign="top">A list containing the data associated with the tooltips in a tooltips group. For each tooltip the data is a tuple containing:
9
9
the tooltip object, the associated widget, the tooltip text and the tooltip
10
10
private text.</td></tr><tr valign="top"><td valign="top">"delay"</td><td valign="top">Read</td><td valign="top">The delay between the mouse pausing over the widget and
11
11
the display of the tooltip in msec.</td></tr><tr valign="top"><td valign="top">"enabled"</td><td valign="top">Read</td><td valign="top">If <code class="literal">True</code> the tooltips are
12
12
enabled</td></tr><tr valign="top"><td valign="top">"use_sticky_delay"</td><td valign="top">Read</td><td valign="top">If <code class="literal">True</code> shorten the delay for
13
13
showing a tooltip on another widget is already showing a tooltip.</td></tr><tr valign="top"><td valign="top">"timer_tag"</td><td valign="top">Read</td><td valign="top">The tag of the timeout handler used for the
14
delay.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtktooltips"></a><h2>gtk.Tooltips Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p></div><div class="refsect1" lang="en"><a name="id3764477"></a><h2>Description</h2><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.12 and above</p></div><p>Tooltips are the messages that appear next to a widget when the
14
delay.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtktooltips"></a><h2>gtk.Tooltips Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p></div><div class="refsect1" lang="en"><a name="id3965384"></a><h2>Description</h2><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.12 and above</p></div><p>Tooltips are the messages that appear next to a widget when the
15
15
mouse pointer is held over it for a short amount of time. They are
16
16
especially helpful for adding more verbose descriptions of things such as
17
17
buttons in a toolbar. An individual tooltip belongs to a group of tooltips.
30
30
the <a class="link" href="class-gtktooltips.html#function-gtk--tooltips-data-get" title="gtk.tooltips_data_get"><code class="function">gtk.tooltips_data_get</code>()</a>
31
31
function.</p></div><div class="refsect1" lang="en"><a name="constructor-gtktooltips"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Tooltips</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtktooltips.html" title="gtk.Tooltips"><code class="classname">gtk.Tooltips</code></a>
32
32
object</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.12 and above</p></div><p>Creates an empty <a class="link" href="class-gtktooltips.html" title="gtk.Tooltips"><code class="classname">gtk.Tooltips</code></a>
33
group.</p></div><div class="refsect1" lang="en"><a name="id3764664"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktooltips--enable"></a><h3>gtk.Tooltips.enable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enable</span>(<span class="methodparam"></span>)</code></pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.12 and above</p></div><p>The <code class="methodname">enable</code>() method enables a group of
33
group.</p></div><div class="refsect1" lang="en"><a name="id3965572"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktooltips--enable"></a><h3>gtk.Tooltips.enable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">enable</span>(<span class="methodparam"></span>)</code></pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.12 and above</p></div><p>The <code class="methodname">enable</code>() method enables a group of
34
34
tooltips. A tooltip will be displayed over its associated widget when
35
35
the mouse pointer pauses over the widget.</p></div><div class="refsect2" lang="en"><a name="method-gtktooltips--disable"></a><h3>gtk.Tooltips.disable</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">disable</span>(<span class="methodparam"></span>)</code></pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.12 and above</p></div><p>The <code class="methodname">disable</code>() method disables a group
36
36
of tooltips. A tooltip will not be displayed over its associated widget when
41
41
enabled..</p></div><div class="refsect2" lang="en"><a name="method-gtktooltips--force-window"></a><h3>gtk.Tooltips.force_window</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">force_window</span>(<span class="methodparam"></span>)</code></pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.12 and above</p></div><p>The <code class="methodname">force_window</code>() method ensures that
42
42
the window used for displaying the given tooltips is created. Applications
43
43
should never have to call this function, since PyGTK takes care of
44
this.</p></div></div><div class="refsect1" lang="en"><a name="id3764996"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--tooltips-data-get"></a><h3>gtk.tooltips_data_get</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.tooltips_data_get</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>widget</code></strong> :</span></p></td><td>a widget</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the tooltip data associated
44
this.</p></div></div><div class="refsect1" lang="en"><a name="id3965903"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--tooltips-data-get"></a><h3>gtk.tooltips_data_get</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.tooltips_data_get</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>widget</code></strong> :</span></p></td><td>a widget</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the tooltip data associated
45
45
with <em class="parameter"><code>widget</code></em> or
46
46
<code class="literal">None</code></td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.12 and above</p></div><p>The <code class="function">gtk.tooltips_data_get</code>() function
47
47
returns a tuple containing the tooltip data associated with