diff --git a/docs/sphinx/itemToModuleMap.json b/docs/sphinx/itemToModuleMap.json index e8286fdc..6966bbd6 100644 --- a/docs/sphinx/itemToModuleMap.json +++ b/docs/sphinx/itemToModuleMap.json @@ -2677,6 +2677,9 @@ "PropertyGridInterface":"wx.propgrid.", "PropertyGridIterator":"wx.propgrid.", "PropertyGridIteratorBase":"wx.propgrid.", +"PropertyGridManager":"wx.propgrid.", +"PropertyGridManagerNameStr":"wx.propgrid.", +"PropertyGridPage":"wx.propgrid.", "PropertyGridPageState":"wx.propgrid.", "PseudoDC":"wx.adv.", "PyApp":"wx.", diff --git a/etg/_propgrid.py b/etg/_propgrid.py index ccd006ec..73690bd4 100644 --- a/etg/_propgrid.py +++ b/etg/_propgrid.py @@ -30,6 +30,7 @@ INCLUDES = [ 'propgridproperty', 'propgrid', 'propgridprops', 'propgridadvprops', + 'propgridmanager', ] diff --git a/etg/propgridmanager.py b/etg/propgridmanager.py new file mode 100644 index 00000000..9bc8a3c2 --- /dev/null +++ b/etg/propgridmanager.py @@ -0,0 +1,65 @@ +#--------------------------------------------------------------------------- +# Name: etg/propgridmanager.py +# Author: Robin Dunn +# +# Created: 31-Aug-2016 +# Copyright: (c) 2016 by Total Control Software +# License: wxWindows License +#--------------------------------------------------------------------------- + +import etgtools +import etgtools.tweaker_tools as tools + +PACKAGE = "wx" +MODULE = "_propgrid" +NAME = "propgridmanager" # 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 = [ 'wxPropertyGridPage', + 'wxPropertyGridManager', + ] + +#--------------------------------------------------------------------------- + +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('wxPropertyGridPage') + assert isinstance(c, etgtools.ClassDef) + tools.ignoreConstOverloads(c) + + + module.addGlobalStr('wxPropertyGridManagerNameStr', c) + + c = module.find('wxPropertyGridManager') + tools.fixWindowClass(c, hideVirtuals=False, ignoreProtected=False) + tools.ignoreConstOverloads(c) + + + # wxPGPropArg is a typedef for "const wxPGPropArgCls&" so having the + # wrappers treat it as a normal type can be problematic. ("new cannot be + # applied to a reference type", etc.) Let's just ignore it an replace it + # everywhere for the real type. + for item in module.allItems(): + if hasattr(item, 'type') and item.type == 'wxPGPropArg': + item.type = 'const wxPGPropArgCls &' + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/ext/wxWidgets b/ext/wxWidgets index 1d5119ac..354897cd 160000 --- a/ext/wxWidgets +++ b/ext/wxWidgets @@ -1 +1 @@ -Subproject commit 1d5119acf5498ab356c0ddaea30d8b34a3722fc3 +Subproject commit 354897cd133aaa0d6317081e915644803f686580 diff --git a/unittests/test_propgridmanager.py b/unittests/test_propgridmanager.py new file mode 100644 index 00000000..f173d250 --- /dev/null +++ b/unittests/test_propgridmanager.py @@ -0,0 +1,16 @@ +import unittest +from unittests import wtc +import wx + +#--------------------------------------------------------------------------- + +class propgridmanager_Tests(wtc.WidgetTestCase): + + # TODO: Remove this test and add real ones. + def test_propgridmanager1(self): + self.fail("Unit tests for propgridmanager not implemented yet.") + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main()