mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-03-16 21:50:07 +01:00
Add wx.adv.NotificationMessage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -39,6 +39,7 @@ INCLUDES = [
|
||||
'animate',
|
||||
'bannerwindow',
|
||||
'editlbox',
|
||||
'notifmsg',
|
||||
|
||||
|
||||
# TODOs -
|
||||
@@ -46,7 +47,6 @@ INCLUDES = [
|
||||
#
|
||||
#'bmpcbox',
|
||||
#'laywin',
|
||||
#'notifmsg',
|
||||
#'odcombo',
|
||||
#'richtooltip',
|
||||
#'sashwin',
|
||||
|
||||
46
etg/notifmsg.py
Normal file
46
etg/notifmsg.py
Normal file
@@ -0,0 +1,46 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# Name: etg/notifmsg.py
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 21-May-2012
|
||||
# Copyright: (c) 2012 by Total Control Software
|
||||
# License: wxWindows License
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
import etgtools
|
||||
import etgtools.tweaker_tools as tools
|
||||
|
||||
PACKAGE = "wx"
|
||||
MODULE = "_adv"
|
||||
NAME = "notifmsg" # 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 = [ "wxNotificationMessage",
|
||||
]
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
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.
|
||||
|
||||
c = module.find('wxNotificationMessage')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
|
||||
20
unittests/test_notifmsg.py
Normal file
20
unittests/test_notifmsg.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
import wx.adv
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class notifmsg_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_notifmsg1(self):
|
||||
nf = wx.adv.NotificationMessage("The Title", "This is the message")
|
||||
nf.Show()
|
||||
self.waitFor(300)
|
||||
nf.Close()
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -5,16 +5,6 @@ import wx
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class timer_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def waitFor(self, milliseconds):
|
||||
intervals = milliseconds/100
|
||||
while intervals > 0:
|
||||
wx.MilliSleep(100)
|
||||
self.myYield()
|
||||
if hasattr(self, 'flag') and self.flag:
|
||||
break
|
||||
intervals -= 1
|
||||
|
||||
|
||||
def onTimerEvt(self, *evt):
|
||||
self.flag = True
|
||||
|
||||
@@ -55,6 +55,16 @@ class WidgetTestCase(unittest.TestCase):
|
||||
for w in wx.GetTopLevelWindows():
|
||||
if isinstance(w, wx.Dialog):
|
||||
w.EndModal(wx.ID_CANCEL)
|
||||
|
||||
|
||||
def waitFor(self, milliseconds):
|
||||
intervals = milliseconds/100
|
||||
while intervals > 0:
|
||||
wx.MilliSleep(100)
|
||||
self.myYield()
|
||||
if hasattr(self, 'flag') and self.flag:
|
||||
break
|
||||
intervals -= 1
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user