AGW Logo

svn SVN Revision 69086 For balloontip

This file contains the SVN revision history for balloontip, at revision 69086.

Available information include commit date, the name of the committer, the file size, the SVN log messages and a diff from the previous version (if available).


file_info File Information

  • Commit Date: 17-Oct-2008 19:15:31 UTC
  • Committer: AG
  • File Size: 35053 byte(s)

svn_log Log Messages

The following log message was entered by the committer:

  • Fixed bug #13437 for SuperToolTip;
  • Fixed bug #13477 for UltimateListCtrl.

svn_diff Diff To Previous Version (68881)

Version SVN diff:

--- wxPython/3rdParty/AGW/agw/balloontip.py 2011/08/25 16:40:17     68881
+++ wxPython/3rdParty/AGW/agw/balloontip.py 2011/09/14 19:39:08     69086
@@ -489,7 +489,7 @@

class BalloonTip(object):
"""
-    BalloonTip is a class that allows you to display tooltips in a balloon style
+    L{BalloonTip} is a class that allows you to display tooltips in a balloon style
window.

This is the main class implementation.
@@ -501,11 +501,12 @@

:param `topicon`: an icon that will be displayed on the top-left part of the
L{BalloonTip} frame. If set to ``None``, no icon will be displayed;
-        :param `toptitle`: a title that will be displayed on the top part of the
+        :type `topicon`: `wx.Bitmap` or ``None``
+        :param string `toptitle`: a title that will be displayed on the top part of the
L{BalloonTip} frame. If set to an empty string, no title will be displayed;
-        :param `message`: the tip message that will be displayed. It can not be set to
+        :param string `message`: the tip message that will be displayed. It can not be set to
an empty string;
-        :param `shape`: the L{BalloonTip} shape. It can be one of the following:
+        :param integer `shape`: the L{BalloonTip} shape. It can be one of the following:

======================= ========= ====================================
Shape Flag              Hex Value  Description
@@ -514,7 +515,7 @@
``BT_RECTANGLE``         0x2      L{BalloonTip} will have a rectangular shape.
======================= ========= ====================================

-        :param `tipstyle`: the L{BalloonTip} destruction behavior. It can be one of:
+        :param integer `tipstyle`: the L{BalloonTip} destruction behavior. It can be one of:

======================= ========= ====================================
Tip Flag                Hex Value  Description
@@ -524,6 +525,12 @@
``BT_BUTTON``                 0x5 L{BalloonTip} will be destroyed when the user click on the close button.
======================= ========= ====================================

+        :raise: `Exception` in the following cases:
+
+         - The `message` parameter is an empty string;
+         - The `shape` parameter has an invalid value (i.e., it's not one of ``BT_ROUNDED``, ``BT_RECTANGLE``);
+         - The `tipstyle` parameter has an invalid value (i.e., it's not one of ``BT_LEAVE``, ``BT_CLICK``, ``BT_BUTTON``).
+
"""

self._shape = shape
@@ -565,7 +572,7 @@
"""
Sets the target control/window for the L{BalloonTip}.

-        :param `widget`: an instance of `wx.Window`.
+        :param `widget`: any subclass of `wx.Window`.
"""

self._widget = widget
@@ -582,7 +589,13 @@


def GetTarget(self):
-        """ Returns the target window for the L{BalloonTip}."""
+        """
+        Returns the target window for the L{BalloonTip}.
+
+        :return: An instance of `wx.Window`.
+
+        :raise: `Exception` if the L{SetTarget} method has not previously called.
+        """

if not hasattr(self, "_widget"):
raise Exception("\nERROR: BalloonTip Target Has Not Been Set")
@@ -594,7 +607,9 @@
"""
Sets the delay time after which the L{BalloonTip} is created.

-        :param `delay`: the number of milliseconds after which L{BalloonTip} is created.
+        :param integer `delay`: the number of milliseconds after which L{BalloonTip} is created.
+
+        :raise: `Exception` if `delay` is less than ``1`` milliseconds.
"""

if delay < 1:
@@ -604,7 +619,11 @@


def GetStartDelay(self):
-        """ Returns the delay time after which the L{BalloonTip} is created."""
+        """
+        Returns the delay time after which the L{BalloonTip} is created.
+
+        :return: the delay time, in milliseconds.
+        """

return self._startdelaytime

@@ -613,7 +632,9 @@
"""
Sets the delay time after which the BalloonTip is destroyed.

-        :param `delay`: the number of milliseconds after which L{BalloonTip} is destroyed.
+        :param integer `delay`: the number of milliseconds after which L{BalloonTip} is destroyed.
+
+        :raise: `Exception` if `delay` is less than ``1`` milliseconds.
"""

if delay < 1:
@@ -623,7 +644,11 @@


def GetEndDelay(self):
-        """ Returns the delay time after which the L{BalloonTip} is destroyed."""
+        """
+        Returns the delay time after which the L{BalloonTip} is destroyed.
+
+        :return: the delay time, in milliseconds.
+        """

return self._enddelaytime

@@ -711,6 +736,8 @@
This prevents the annoying behavior of L{BalloonTip} to display when the
user does something else inside the window. The L{BalloonTip} window is
displayed only when the mouse does *not* move for the start delay time.
+
+        :param `event`: a `wx.MouseEvent` event to be processed.
"""

if hasattr(self, "BalloonFrame"):
@@ -780,7 +807,10 @@
"""
Sets the L{BalloonTip} frame shape.

-        :param `shape`: should be one of ``BT_ROUNDED`` or ``BT_RECTANGLE``.
+        :param integer `shape`: should be one of ``BT_ROUNDED`` or ``BT_RECTANGLE``.
+
+        :raise: `Exception` if the `shape` parameter is not a valid value
+         (i.e., it's not one of ``BT_ROUNDED``, ``BT_RECTANGLE``);
"""

if shape not in [BT_ROUNDED, BT_RECTANGLE]:
@@ -790,7 +820,11 @@


def GetBalloonShape(self):
-        """ Returns the L{BalloonTip} frame shape."""
+        """
+        Returns the L{BalloonTip} frame shape.
+
+        :return: An integer, one of ``BT_ROUNDED``, ``BT_RECTANGLE``.
+        """

return self._shape

@@ -800,6 +834,8 @@
Sets the L{BalloonTip} top-left icon.

:param `icon`: an instance of `wx.Bitmap`.
+
+        :raise: `Exception` if the `icon` bitmap is not a valid `wx.Bitmap`.
"""

if icon.Ok():
@@ -809,7 +845,11 @@


def GetBalloonIcon(self):
-        """ Returns the L{BalloonTip} top-left icon."""
+        """
+        Returns the L{BalloonTip} top-left icon.
+
+        :return: An instance of `wx.Bitmap`.
+        """

return self._topicon

@@ -818,14 +858,18 @@
"""
Sets the L{BalloonTip} top title.

-        :param `title`: a string to use as a L{BalloonTip} title.
+        :param string `title`: a string to use as a L{BalloonTip} title.
"""

self._toptitle = title


def GetBalloonTitle(self):
-        """ Returns the L{BalloonTip} top title."""
+        """
+        Returns the L{BalloonTip} top title.
+
+        :return: A string containing the top title.
+        """

return self._toptitle

@@ -834,7 +878,9 @@
"""
Sets the L{BalloonTip} tip message.

-        :param `message`: a string identifying the main message body of L{BalloonTip}.
+        :param string `message`: a string identifying the main message body of L{BalloonTip}.
+
+        :raise: `Exception` if the message is an empty string.

:note: The L{BalloonTip} message should never be empty.
"""
@@ -846,7 +892,11 @@


def GetBalloonMessage(self):
-        """ Returns the L{BalloonTip} tip message."""
+        """
+        Returns the L{BalloonTip} tip message.
+
+        :return: A string containing the main message.
+        """

return self._message

@@ -855,7 +905,7 @@
"""
Sets the L{BalloonTip} `tipstyle` parameter.

-        :param `tipstyle`: one of the following bit set:
+        :param integer `tipstyle`: one of the following bit set:

============== ========== =====================================
Tip Style      Hex Value  Description
@@ -864,6 +914,9 @@
``BT_CLICK``          0x4 L{BalloonTip} will be destroyed when the user click on L{BalloonTip}.
``BT_BUTTON``         0x5 L{BalloonTip} will be destroyed when the user click on the close button.
============== ========== =====================================
+
+        :raise: `Exception` if the `tipstyle` parameter has an invalid value
+         (i.e., it's not one of ``BT_LEAVE``, ``BT_CLICK``, ``BT_BUTTON``).
"""

if tipstyle not in [BT_LEAVE, BT_CLICK, BT_BUTTON]:
@@ -877,6 +930,8 @@
"""
Returns the L{BalloonTip} `tipstyle` parameter.

+        :return: An integer representing the style.
+
:see: L{SetBalloonTipStyle}
"""

@@ -897,7 +952,11 @@


def GetBalloonColour(self):
-        """ Returns the L{BalloonTip} background colour."""
+        """
+        Returns the L{BalloonTip} background colour.
+
+        :return: An instance of `wx.Colour`.
+        """

return self._ballooncolour

@@ -916,7 +975,11 @@


def GetTitleFont(self):
-        """ Returns the font for the top title."""
+        """
+        Returns the font for the top title.
+
+        :return: An instance of `wx.Font`.
+        """

return self._balloontitlefont

@@ -935,7 +998,11 @@


def GetMessageFont(self):
-        """ Returns the font for the tip message."""
+        """
+        Returns the font for the tip message.
+
+        :return: An instance of `wx.Font`.
+        """

return self._balloonmsgfont

@@ -954,7 +1021,11 @@


def GetTitleColour(self):
-        """ Returns the colour for the top title."""
+        """
+        Returns the colour for the top title.
+
+        :return: An instance of `wx.Colour`.
+        """

return self._balloontitlecolour

@@ -973,7 +1044,11 @@


def GetMessageColour(self):
-        """ Returns the colour for the tip message."""
+        """
+        Returns the colour for the tip message.
+
+        :return: An instance of `wx.Colour`.
+        """

return self._balloonmsgcolour

@@ -1010,7 +1085,7 @@
"""
Enable/disable globally the L{BalloonTip}.

-        :param `enable`: ``True`` to enable L{BalloonTip}, ``False`` otherwise.
+        :param bool `enable`: ``True`` to enable L{BalloonTip}, ``False`` otherwise.
"""

self._runningapp.__tooltipenabled__ = enable
Tree

Table Of Contents

Previous topic

SVN Revision 68881 For balloontip

Next topic

buttonpanel