diff --git a/TODO.txt b/TODO.txt index 30dcf605..8b73ad37 100644 --- a/TODO.txt +++ b/TODO.txt @@ -172,7 +172,6 @@ other dev stuff * all missing common dialogs * print (as in print framework classes) * mdi (die mdi! die!) - * toolbar * listctrl * treectrl * dirctrl @@ -182,7 +181,6 @@ other dev stuff * hyperlink * pickerbase, clrpicker, filepicker, fontpicker * filectrl - * infobar * commandlinkbutton * axbase (ActiveX. Need to figure out best ways to do MSW-only items...) * settings diff --git a/etg/_core.py b/etg/_core.py index 63f26951..74acd700 100644 --- a/etg/_core.py +++ b/etg/_core.py @@ -161,7 +161,7 @@ INCLUDES = [ 'defs', 'snglinst', 'scrolwin', 'vscroll', - + 'infobar', ] diff --git a/etg/infobar.py b/etg/infobar.py new file mode 100644 index 00000000..5aad9ebe --- /dev/null +++ b/etg/infobar.py @@ -0,0 +1,50 @@ +#--------------------------------------------------------------------------- +# Name: etg/infobar.py +# Author: Robin Dunn +# +# Created: 12-Mar-2012 +# Copyright: (c) 2012 by Total Control Software +# License: wxWindows License +#--------------------------------------------------------------------------- + +import etgtools +import etgtools.tweaker_tools as tools + +PACKAGE = "wx" +MODULE = "_core" +NAME = "infobar" # 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 = [ "wxInfoBar", + ] + +#--------------------------------------------------------------------------- + +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('wxInfoBar') + assert isinstance(c, etgtools.ClassDef) + tools.fixWindowClass(c) + + # turn the virtualness back on for this method + c.find('Dismiss').isVirtual = True + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/unittests/test_infobar.py b/unittests/test_infobar.py new file mode 100644 index 00000000..070bba5a --- /dev/null +++ b/unittests/test_infobar.py @@ -0,0 +1,35 @@ +import imp_unittest, unittest +import wtc +import wx + +#--------------------------------------------------------------------------- + +class infobar_Tests(wtc.WidgetTestCase): + + def test_infobarCtor(self): + ib = wx.InfoBar(self.frame) + + def test_infobarDefaultCtor(self): + ib = wx.InfoBar() + ib.Create(self.frame) + + def test_infobar1(self): + ib = wx.InfoBar(self.frame) + ib.ShowMessage("hello world") + self.myYield() + ib.Dismiss() + + def test_infobar2(self): + ib = wx.InfoBar(self.frame) + ib.AddButton(1234, "New Button") + ib.AddButton(wx.ID_SAVE) + ib.ShowMessage("hello world") + self.myYield() + ib.RemoveButton(wx.ID_SAVE) + ib.Dismiss() + +#--------------------------------------------------------------------------- + + +if __name__ == '__main__': + unittest.main()