diff --git a/etg/_richtext.py b/etg/_richtext.py index 58865268..7e4bca7c 100644 --- a/etg/_richtext.py +++ b/etg/_richtext.py @@ -27,6 +27,8 @@ ITEMS = [ ] INCLUDES = [ 'richtextbuffer', 'richtextctrl', + 'richtexthtml', + 'richtextxml', ] diff --git a/etg/richtextbuffer.py b/etg/richtextbuffer.py index 97af3acc..b0fac429 100644 --- a/etg/richtextbuffer.py +++ b/etg/richtextbuffer.py @@ -81,7 +81,7 @@ def run(): module.addItem( tools.wxListWrapperTemplate('wxRichTextLineList', 'wxRichTextLine', module)) - # Can this even work? + # Can this even work? Apparently it does. module.addItem( tools.wxArrayPtrWrapperTemplate('wxRichTextObjectPtrArray', 'wxRichTextObject', module)) module.addItem( @@ -102,7 +102,6 @@ def run(): // forward declarations class wxRichTextStyleDefinition; class wxRichTextListStyleDefinition; - class wxRichTextXMLHandler; class wxRichTextStyleSheet; class wxRichTextFloatCollector; """)) diff --git a/etg/richtexthtml.py b/etg/richtexthtml.py new file mode 100644 index 00000000..ab523ca0 --- /dev/null +++ b/etg/richtexthtml.py @@ -0,0 +1,47 @@ +#--------------------------------------------------------------------------- +# Name: etg/richtexthtml.py +# Author: Robin Dunn +# +# Created: 13-May-2013 +# Copyright: (c) 2013 by Total Control Software +# License: wxWindows License +#--------------------------------------------------------------------------- + +import etgtools +import etgtools.tweaker_tools as tools + +PACKAGE = "wx" +MODULE = "_richtext" +NAME = "richtexthtml" # 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 = [ "wxRichTextHTMLHandler", + + ] + +#--------------------------------------------------------------------------- + +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('wxRichTextHTMLHandler') + #assert isinstance(c, etgtools.ClassDef) + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/etg/richtextxml.py b/etg/richtextxml.py new file mode 100644 index 00000000..c88a0ebd --- /dev/null +++ b/etg/richtextxml.py @@ -0,0 +1,47 @@ +#--------------------------------------------------------------------------- +# Name: etg/richtextxml.py +# Author: Robin Dunn +# +# Created: 13-May-2013 +# Copyright: (c) 2013 by Total Control Software +# License: wxWindows License +#--------------------------------------------------------------------------- + +import etgtools +import etgtools.tweaker_tools as tools + +PACKAGE = "wx" +MODULE = "_richtext" +NAME = "richtextxml" # 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 = [ "wxRichTextXMLHandler", + + ] + +#--------------------------------------------------------------------------- + +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('wxRichTextXMLHandler') + #assert isinstance(c, etgtools.ClassDef) + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/unittests/test_richtexthtml.py b/unittests/test_richtexthtml.py new file mode 100644 index 00000000..7cace884 --- /dev/null +++ b/unittests/test_richtexthtml.py @@ -0,0 +1,16 @@ +import imp_unittest, unittest +import wtc +import wx + +#--------------------------------------------------------------------------- + +class richtexthtml_Tests(wtc.WidgetTestCase): + + # TODO: Remove this test and add real ones. + def test_richtexthtml1(self): + self.fail("Unit tests for richtexthtml not implemented yet.") + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main() diff --git a/unittests/test_richtextxml.py b/unittests/test_richtextxml.py new file mode 100644 index 00000000..4addbf89 --- /dev/null +++ b/unittests/test_richtextxml.py @@ -0,0 +1,16 @@ +import imp_unittest, unittest +import wtc +import wx + +#--------------------------------------------------------------------------- + +class richtextxml_Tests(wtc.WidgetTestCase): + + # TODO: Remove this test and add real ones. + def test_richtextxml1(self): + self.fail("Unit tests for richtextxml not implemented yet.") + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main()