diff --git a/etg/_core.py b/etg/_core.py index f9df8576..b4728ba7 100644 --- a/etg/_core.py +++ b/etg/_core.py @@ -89,6 +89,7 @@ INCLUDES = [ # core 'accel', 'log', 'dataobj', + 'dnd', 'config', 'variant', 'tracker', diff --git a/etg/dnd.py b/etg/dnd.py new file mode 100644 index 00000000..7d8fda64 --- /dev/null +++ b/etg/dnd.py @@ -0,0 +1,57 @@ +#--------------------------------------------------------------------------- +# Name: etg/dnd.py +# Author: Robin Dunn +# +# Created: 29-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 = "dnd" # 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 = [ "interface_2wx_2dnd_8h.xml", + #"wxDropTarget", + #"wxTextDropTarget", + #"wxFileDropTarget", + #"wxDropSource", + ] + +#--------------------------------------------------------------------------- + +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. + + module.addHeaderCode('#include ') + + #c = module.find('wxDropSource') + #assert isinstance(c, etgtools.ClassDef) + + #for m in c.find('wxDropSource').all(): + # if 'wxIcon' in m.argsString: + # m.ignore() + + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/unittests/test_dnd.py b/unittests/test_dnd.py new file mode 100644 index 00000000..40d75da6 --- /dev/null +++ b/unittests/test_dnd.py @@ -0,0 +1,16 @@ +import imp_unittest, unittest +import wtc +import wx + +#--------------------------------------------------------------------------- + +class dnd_Tests(wtc.WidgetTestCase): + + # TODO: Remove this test and add real ones. + def test_dnd1(self): + self.fail("Unit tests for dnd not implemented yet.") + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main()