Add wx.adv.RichToolTip

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-06-07 04:34:39 +00:00
parent 1b0eaa1329
commit 1c28577aaf
3 changed files with 83 additions and 1 deletions

View File

@@ -45,12 +45,12 @@ INCLUDES = [
'laywin',
'odcombo',
'bmpcbox',
'richtooltip',
# TODOs -
# These modules are also in the C++ adv lib and so should be included here:
#
#'richtooltip',
#'timectrl',
#'treelist',
#'wizard',

49
etg/richtooltip.py Normal file
View File

@@ -0,0 +1,49 @@
#---------------------------------------------------------------------------
# Name: etg/richtooltip.py
# Author: Robin Dunn
#
# Created: 06-Jun-2012
# Copyright: (c) 2012 by Total Control Software
# License: wxWindows License
#---------------------------------------------------------------------------
import etgtools
import etgtools.tweaker_tools as tools
PACKAGE = "wx"
MODULE = "_adv"
NAME = "richtooltip" # Base name of the file to generate to for this script
DOCSTRING = ""
# The classes and/or the basename of the Doxygen XML files to be processed by
# this script.
ITEMS = [ "wxRichToolTip",
]
#---------------------------------------------------------------------------
def run():
# Parse the XML file(s) building a collection of Extractor objects
module = etgtools.ModuleDef(PACKAGE, MODULE, NAME, DOCSTRING)
etgtools.parseDoxyXML(module, ITEMS)
#-----------------------------------------------------------------
# Tweak the parsed meta objects in the module object as needed for
# customizing the generated code and docstrings.
module.addHeaderCode('#include <wx/richtooltip.h>')
c = module.find('wxRichToolTip')
assert isinstance(c, etgtools.ClassDef)
c.addPrivateCopyCtor()
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
#---------------------------------------------------------------------------
if __name__ == '__main__':
run()

View File

@@ -0,0 +1,33 @@
import imp_unittest, unittest
import wtc
import wx
import wx.adv
#---------------------------------------------------------------------------
class richtooltip_Tests(wtc.WidgetTestCase):
def test_richtooltip1(self):
wx.adv.TipKind_None
wx.adv.TipKind_TopLeft
wx.adv.TipKind_Top
wx.adv.TipKind_TopRight
wx.adv.TipKind_BottomLeft
wx.adv.TipKind_Bottom
wx.adv.TipKind_BottomRight
wx.adv.TipKind_Auto
def test_richtooltip2(self):
tt = wx.adv.RichToolTip("The Title", "The richtooltip message.")
tt.SetBackgroundColour('sky blue')
tt.SetIcon(wx.ICON_WARNING)
tt.SetTimeout(200)
tt.ShowFor(self.frame)
self.waitFor(300)
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()