diff --git a/etg/notebook.py b/etg/notebook.py index 96688c09..2a9981df 100644 --- a/etg/notebook.py +++ b/etg/notebook.py @@ -18,7 +18,7 @@ DOCSTRING = "" # The classes and/or the basename of the Doxygen XML files to be processed by # this script. ITEMS = [ 'wxNotebook' ] - + #--------------------------------------------------------------------------- def run(): @@ -29,12 +29,15 @@ def run(): #----------------------------------------------------------------- # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. + + module.addHeaderCode('#include ') c = module.find('wxNotebook') c.find('OnSelChange').ignore() tools.fixWindowClass(c) + #----------------------------------------------------------------- tools.doCommonTweaks(module) tools.addAutoProperties(module) diff --git a/unittests/test_notebook.py b/unittests/test_notebook.py new file mode 100644 index 00000000..fc2e1f97 --- /dev/null +++ b/unittests/test_notebook.py @@ -0,0 +1,47 @@ +import imp_unittest, unittest +import wtc +import wx + +#--------------------------------------------------------------------------- + +class notebook_Tests(wtc.WidgetTestCase): + + def test_notebookCtor(self): + nb = wx.Notebook(self.frame) + + def test_notebookDefaultCtor(self): + nb = wx.Notebook() + nb.Create(self.frame) + + def test_notebookStyles(self): + wx.NB_DEFAULT + wx.NB_TOP + wx.NB_BOTTOM + wx.NB_LEFT + wx.NB_RIGHT + + wx.NB_FIXEDWIDTH + wx.NB_MULTILINE + wx.NB_NOPAGETHEME + wx.NB_FLAT + + wx.NB_HITTEST_NOWHERE + wx.NB_HITTEST_ONICON + wx.NB_HITTEST_ONLABEL + wx.NB_HITTEST_ONITEM + wx.NB_HITTEST_ONPAGE + + + def test_notebookPages(self): + nb = wx.Notebook(self.frame, style=wx.NB_BOTTOM) + p1 = wx.Panel(nb) + nb.AddPage(p1, "Page1") + p2 = wx.Panel(nb) + nb.AddPage(p2, "Page2") + nb.SetSelection(0) + +#--------------------------------------------------------------------------- + + +if __name__ == '__main__': + unittest.main() diff --git a/unittests/test_panel.py b/unittests/test_panel.py new file mode 100644 index 00000000..9cd70a77 --- /dev/null +++ b/unittests/test_panel.py @@ -0,0 +1,21 @@ +import imp_unittest, unittest +import wtc +import wx + +#--------------------------------------------------------------------------- + +class panel_Tests(wtc.WidgetTestCase): + + def test_panelCtor(self): + p = wx.Panel(self.frame) + + def test_panelDefaultCtor(self): + p = wx.Panel() + p.Create(self.frame) + + +#--------------------------------------------------------------------------- + + +if __name__ == '__main__': + unittest.main()