diff --git a/TODO.txt b/TODO.txt index aefdcf90..32afbb96 100644 --- a/TODO.txt +++ b/TODO.txt @@ -145,7 +145,6 @@ other dev stuff * all missing common dialogs * print (as in print framework classes) * mdi (die mdi! die!) - * dirctrl * cshelp * dragimag * datectrl diff --git a/etg/_core.py b/etg/_core.py index 08bced7f..2cf2c962 100644 --- a/etg/_core.py +++ b/etg/_core.py @@ -150,6 +150,7 @@ INCLUDES = [ # core 'listctrl', 'treeitemdata', 'treectrl', + 'dirctrl', # toplevel and dialogs 'nonownedwnd', diff --git a/etg/dirctrl.py b/etg/dirctrl.py new file mode 100644 index 00000000..99607b21 --- /dev/null +++ b/etg/dirctrl.py @@ -0,0 +1,51 @@ +#--------------------------------------------------------------------------- +# Name: etg/dirctrl.py +# Author: Robin Dunn +# +# Created: 29-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 = "dirctrl" # 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 = [ "wxGenericDirCtrl", + "wxDirFilterListCtrl", + ] + +#--------------------------------------------------------------------------- + +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('wxGenericDirCtrl') + assert isinstance(c, etgtools.ClassDef) + tools.fixWindowClass(c) + + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/unittests/test_dirctrl.py b/unittests/test_dirctrl.py new file mode 100644 index 00000000..5a8ff11d --- /dev/null +++ b/unittests/test_dirctrl.py @@ -0,0 +1,28 @@ +import imp_unittest, unittest +import wtc +import wx + +#--------------------------------------------------------------------------- + +class dirctrl_Tests(wtc.WidgetTestCase): + + def test_dirctrlCtor(self): + d = wx.GenericDirCtrl(self.frame) + + + def test_dirctrlDefaultCtor(self): + d = wx.GenericDirCtrl() + d.Create(self.frame) + + + def test_dirctrlFlags(self): + wx.DIRCTRL_DIR_ONLY + wx.DIRCTRL_SELECT_FIRST + wx.DIRCTRL_3D_INTERNAL + wx.DIRCTRL_EDIT_LABELS + wx.DIRCTRL_MULTIPLE + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main()