File: wx.lib.agw.supertooltip.txt

package info (click to toggle)
wxpython4.0 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 211,112 kB
  • sloc: cpp: 888,355; python: 223,130; makefile: 52,087; ansic: 45,780; sh: 3,012; xml: 1,534; perl: 264
file content (180 lines) | stat: -rw-r--r-- 5,309 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. module:: wx.lib.agw.supertooltip

.. currentmodule:: wx.lib.agw.supertooltip

.. highlight:: python



.. _wx.lib.agw.supertooltip:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.supertooltip**
==========================================================================================================================================

:class:`~wx.lib.agw.supertooltip.SuperToolTip` is a class that mimics the behaviour of :class:`TipWindow` and generic tooltip
windows, although it is a custom-drawn widget.


Description
===========

:class:`SuperToolTip` is a class that mimics the behaviour of :class:`TipWindow` and generic tooltip
windows, although it is a custom-drawn widget.

This class supports:

* Blended triple-gradient for the tooltip background;
* Header text and header image, with possibility to set the header font indipendently;
* Footer text and footer image, with possibility to set the footer font indipendently;
* Multiline text message in the tooltip body, plus an optional image as "body image";
* Bold lines and hyperlink lines in the tooltip body;
* A wide set of predefined drawing styles for the tooltip background;
* Drawing of separator lines after the header and/or before the footer;
* Rounded corners and shadows below the tooltip window (Windows XP only);
* Fade in/fade out effects (Windows XP only);
* User-settable delays for the delay after which the tooltip appears and the delay
  after which the tooltip is destroyed.

And a lot more. Check the demo for an almost complete review of the functionalities.


Usage
=====

Usage example::

    import wx
    import wx.lib.agw.supertooltip as STT

    class MyFrame(wx.Frame):

        def __init__(self, parent):

            wx.Frame.__init__(self, parent, -1, "SuperToolTip Demo")

            panel = wx.Panel(self)
            button = wx.Button(panel, -1, "I am the SuperToolTip target", pos=(100, 50))

            tip = STT.SuperToolTip("A nice tooltip message")

            tip.SetHeader("Hello World")
            tip.SetTarget(button)
            tip.SetDrawHeaderLine(True)

            tip.ApplyStyle("Office 2007 Blue")

            tip.SetDropShadow(True)


    # our normal wxApp-derived class, as usual

    app = wx.App(0)

    frame = MyFrame(None)
    app.SetTopWindow(frame)
    frame.Show()

    app.MainLoop()



Supported Platforms
===================

:class:`SuperToolTip` has been tested on the following platforms:
  * Windows (Windows XP).


Window Styles
=============

`No particular window styles are available for this class.`


Events Processing
=================

`No custom events are available for this class.`


License And Version
===================

:class:`SuperToolTip` is distributed under the wxPython license.

Latest Revision: Andrea Gavana @ 04 Feb 2013, 21.00 GMT

Version 0.5


|function_summary| Functions Summary
====================================

================================================================================ ================================================================================
:func:`~wx.lib.agw.supertooltip.ExtractLink`                                     Extract the link from an hyperlink line.
:func:`~wx.lib.agw.supertooltip.GetStyleKeys`                                    Returns the predefined styles keywords.
:func:`~wx.lib.agw.supertooltip.MakeBold`                                        Makes a font bold. Utility method.
================================================================================ ================================================================================


|


|class_summary| Classes Summary
===============================

================================================================================ ================================================================================
:ref:`~wx.lib.agw.supertooltip.SuperToolTip`                                     The main class for :class:`SuperToolTip`, which holds all the methods
:ref:`~wx.lib.agw.supertooltip.ToolTipWindow`                                    A simple :class:`PopupWindow` that holds fancy tooltips.
:ref:`~wx.lib.agw.supertooltip.ToolTipWindowBase`                                Base class for the different Windows and Mac implementation.
================================================================================ ================================================================================


|


.. toctree::
   :maxdepth: 1
   :hidden:

   wx.lib.agw.supertooltip.SuperToolTip
   wx.lib.agw.supertooltip.ToolTipWindow
   wx.lib.agw.supertooltip.ToolTipWindowBase





Functions
------------

.. function:: ExtractLink(line)

   Extract the link from an hyperlink line.
   
   :param `line`: the line of text to be processed.


.. function:: GetStyleKeys()

   Returns the predefined styles keywords. 


.. function:: MakeBold(font)

   Makes a font bold. Utility method.
   
   :param `font`: the font to be made bold.