diff --git a/TODO.txt b/TODO.txt index 97d2d54d..a4d4adcf 100644 --- a/TODO.txt +++ b/TODO.txt @@ -103,12 +103,6 @@ WAF Build -Deprecated C++ items ---------------------- - * Does Doxygen have a standard way to mark items as deprecated - that will also be tagged as such in the XML? - - other dev stuff --------------- @@ -176,6 +170,11 @@ other dev stuff * Check wxDialog::CreateTextSizer, is it wrapped? + * Add wxCHMHelpController (MSW-only) + + + + Python 3.x diff --git a/etg/_adv.py b/etg/_adv.py index 49917871..3f123e2f 100644 --- a/etg/_adv.py +++ b/etg/_adv.py @@ -26,6 +26,7 @@ ITEMS = [ ] # the wxWidgets "adv" library in a multi-lib build. INCLUDES = [ 'aboutdlg', + 'helpext', # TODOs - # These modules are also in the C++ adv lib and so should included be here: diff --git a/etg/_core.py b/etg/_core.py index 9c411b72..02c3c7fa 100644 --- a/etg/_core.py +++ b/etg/_core.py @@ -175,6 +175,7 @@ INCLUDES = [ # core 'process', 'uiaction', 'snglinst', + 'help', 'cshelp', ] diff --git a/etg/defs.py b/etg/defs.py index 231778d6..f1cb5a94 100644 --- a/etg/defs.py +++ b/etg/defs.py @@ -71,7 +71,6 @@ def run(): class wxCaret; class wxImageHandler; class wxExecuteEnv; - class wxHelpControllerBase; """)) diff --git a/etg/help.py b/etg/help.py new file mode 100644 index 00000000..da3ceac7 --- /dev/null +++ b/etg/help.py @@ -0,0 +1,63 @@ +#--------------------------------------------------------------------------- +# Name: etg/help.py +# Author: Robin Dunn +# +# Created: 06-Apr-2012 +# Copyright: (c) 2012 by Total Control Software +# License: wxWindows License +#--------------------------------------------------------------------------- + +import etgtools +import etgtools.tweaker_tools as tools + +PACKAGE = "wx" +MODULE = "_core" +NAME = "help" # 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 = [ "wxHelpControllerBase", + "wxHelpController", + ] + +#--------------------------------------------------------------------------- + +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('wxHelpControllerBase') + assert isinstance(c, etgtools.ClassDef) + c.abstract = True + + c = module.find('wxHelpController') + c.addPrivateCopyCtor() + + # Add pure virtuals with implemenations here + c.addItem(etgtools.WigCode("""\ + virtual bool DisplayBlock(long blockNo); + virtual bool DisplayContents(); + virtual bool DisplaySection(int sectionNo); + virtual bool KeywordSearch(const wxString& keyWord, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL); + virtual bool LoadFile(const wxString& file = wxEmptyString); + virtual bool Quit(); + """)) + + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/etg/helpext.py b/etg/helpext.py new file mode 100644 index 00000000..7d31a797 --- /dev/null +++ b/etg/helpext.py @@ -0,0 +1,47 @@ +#--------------------------------------------------------------------------- +# Name: etg/helpext.py +# Author: Robin Dunn +# +# Created: 06-Apr-2012 +# Copyright: (c) 2012 by Total Control Software +# License: wxWindows License +#--------------------------------------------------------------------------- + +import etgtools +import etgtools.tweaker_tools as tools + +PACKAGE = "wx" +MODULE = "_adv" +NAME = "helpext" # 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 = [ "wxExtHelpController", + ] + +#--------------------------------------------------------------------------- + +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('wxExtHelpController') + assert isinstance(c, etgtools.ClassDef) + c.addPrivateCopyCtor() + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/unittests/test_help.py b/unittests/test_help.py new file mode 100644 index 00000000..9bdca358 --- /dev/null +++ b/unittests/test_help.py @@ -0,0 +1,16 @@ +import imp_unittest, unittest +import wtc +import wx + +#--------------------------------------------------------------------------- + +class help_Tests(wtc.WidgetTestCase): + + def test_help1(self): + hc = wx.HelpController() + + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main() diff --git a/unittests/test_helpext.py b/unittests/test_helpext.py new file mode 100644 index 00000000..ae7359bc --- /dev/null +++ b/unittests/test_helpext.py @@ -0,0 +1,16 @@ +import imp_unittest, unittest +import wtc +import wx +import wx.adv + +#--------------------------------------------------------------------------- + +class helpext_Tests(wtc.WidgetTestCase): + + def test_helpext1(self): + hc = wx.adv.ExtHelpController() + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main()