diff --git a/docs/sphinx/itemToModuleMap.json b/docs/sphinx/itemToModuleMap.json index b51765b2..7a92323a 100644 --- a/docs/sphinx/itemToModuleMap.json +++ b/docs/sphinx/itemToModuleMap.json @@ -106,6 +106,23 @@ "ART_TOOLBAR":"wx.", "ART_UNDO":"wx.", "ART_WARNING":"wx.", +"AUI_DOCK_BOTTOM":"wx.aui.", +"AUI_DOCK_CENTER":"wx.aui.", +"AUI_DOCK_CENTRE":"wx.aui.", +"AUI_DOCK_LEFT":"wx.aui.", +"AUI_DOCK_NONE":"wx.aui.", +"AUI_DOCK_RIGHT":"wx.aui.", +"AUI_DOCK_TOP":"wx.aui.", +"AUI_MGR_ALLOW_ACTIVE_PANE":"wx.aui.", +"AUI_MGR_ALLOW_FLOATING":"wx.aui.", +"AUI_MGR_DEFAULT":"wx.aui.", +"AUI_MGR_HINT_FADE":"wx.aui.", +"AUI_MGR_LIVE_RESIZE":"wx.aui.", +"AUI_MGR_NO_VENETIAN_BLINDS_FADE":"wx.aui.", +"AUI_MGR_RECTANGLE_HINT":"wx.aui.", +"AUI_MGR_TRANSPARENT_DRAG":"wx.aui.", +"AUI_MGR_TRANSPARENT_HINT":"wx.aui.", +"AUI_MGR_VENETIAN_BLINDS_HINT":"wx.aui.", "Abort":"wx.", "AboutBox":"wx.adv.", "AboutDialogInfo":"wx.adv.", @@ -139,6 +156,11 @@ "AsIs":"wx.", "AssertHandler_t":"wx.", "AttrKind":"wx.grid.GridCellAttr.", +"AuiManager":"wx.aui.", +"AuiManagerDock":"wx.aui.", +"AuiManagerEvent":"wx.aui.", +"AuiManagerOption":"wx.aui.", +"AuiPaneInfo":"wx.aui.", "AutoBufferedPaintDC":"wx.", "AutoBufferedPaintDCFactory":"wx.", "BACKINGSTORE":"wx.", @@ -6121,6 +6143,13 @@ "wxEVT_ACTIVATE":"wx.", "wxEVT_ACTIVATE_APP":"wx.", "wxEVT_ANY":"wx.", +"wxEVT_AUI_FIND_MANAGER":"wx.aui.", +"wxEVT_AUI_PANE_ACTIVATED":"wx.aui.", +"wxEVT_AUI_PANE_BUTTON":"wx.aui.", +"wxEVT_AUI_PANE_CLOSE":"wx.aui.", +"wxEVT_AUI_PANE_MAXIMIZE":"wx.aui.", +"wxEVT_AUI_PANE_RESTORE":"wx.aui.", +"wxEVT_AUI_RENDER":"wx.aui.", "wxEVT_AUX1_DCLICK":"wx.", "wxEVT_AUX1_DOWN":"wx.", "wxEVT_AUX1_UP":"wx.", diff --git a/etg/_aui.py b/etg/_aui.py new file mode 100644 index 00000000..6ffea6c9 --- /dev/null +++ b/etg/_aui.py @@ -0,0 +1,67 @@ +#--------------------------------------------------------------------------- +# Name: etg/_aui.py +# Author: Robin Dunn +# +# Created: 25-Oct-2016 +# Copyright: (c) 2016 by Total Control Software +# License: wxWindows License +#--------------------------------------------------------------------------- + +import etgtools +import etgtools.tweaker_tools as tools + +PACKAGE = "wx" +MODULE = "_aui" +NAME = "_aui" # 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 = [ ] + + +# The list of other ETG scripts and back-end generator modules that are +# included as part of this module. These should all be items that are put in +# the wxWidgets "aui" library in a multi-lib build. +INCLUDES = [ 'auiframemanager', + ] + + +# Separate the list into those that are generated from ETG scripts and the +# rest. These lists can be used from the build scripts to get a list of +# sources and/or additional dependencies when building this extension module. +ETGFILES = ['etg/%s.py' % NAME] + tools.getEtgFiles(INCLUDES) +DEPENDS = tools.getNonEtgFiles(INCLUDES) +OTHERDEPS = [ ] + + +#--------------------------------------------------------------------------- + +def run(): + # Parse the XML file(s) building a collection of Extractor objects + module = etgtools.ModuleDef(PACKAGE, MODULE, NAME, DOCSTRING) + etgtools.parseDoxyXML(module, ITEMS) + module.check4unittest = False + + #----------------------------------------------------------------- + # Tweak the parsed meta objects in the module object as needed for + # customizing the generated code and docstrings. + + module.addHeaderCode('#include ') + module.addImport('_core') + module.addPyCode("import wx", order=10) + + module.addHeaderCode('#include ') + + module.addInclude(INCLUDES) + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + run() diff --git a/etg/auiframemanager.py b/etg/auiframemanager.py new file mode 100644 index 00000000..9e5d61fe --- /dev/null +++ b/etg/auiframemanager.py @@ -0,0 +1,99 @@ +#--------------------------------------------------------------------------- +# Name: etg/auiframemanager.py +# Author: Robin Dunn +# +# Created: 25-Oct-2016 +# Copyright: (c) 2016 by Total Control Software +# License: wxWindows License +#--------------------------------------------------------------------------- + +import etgtools +import etgtools.tweaker_tools as tools + +PACKAGE = "wx" +MODULE = "_aui" +NAME = "auiframemanager" # 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 = [ 'wxAuiManager', + 'wxAuiPaneInfo', + 'wxAuiManagerEvent', + ] + +#--------------------------------------------------------------------------- + +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('wxAuiManager') + assert isinstance(c, etgtools.ClassDef) + c.find('ProcessDockResult').ignore(False) + + c = module.find('wxAuiPaneInfo') + module.addItem( + tools.wxArrayWrapperTemplate( + 'wxAuiPaneInfoArray', 'wxAuiPaneInfo', module)) + + + c = module.find('wxAuiManagerEvent') + tools.fixEventClass(c) + + c.addPyCode("""\ + EVT_AUI_PANE_BUTTON = wx.PyEventBinder( wxEVT_AUI_PANE_BUTTON ) + EVT_AUI_PANE_CLOSE = wx.PyEventBinder( wxEVT_AUI_PANE_CLOSE ) + EVT_AUI_PANE_MAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANE_MAXIMIZE ) + EVT_AUI_PANE_RESTORE = wx.PyEventBinder( wxEVT_AUI_PANE_RESTORE ) + EVT_AUI_PANE_ACTIVATED = wx.PyEventBinder( wxEVT_AUI_PANE_ACTIVATED ) + EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER ) + EVT_AUI_FIND_MANAGER = wx.PyEventBinder( wxEVT_AUI_FIND_MANAGER ) + """) + + + module.insertItem(0, etgtools.WigCode("""\ + // forward declarations + class wxAuiDockUIPart; + class wxAuiPaneButton; + class wxAuiDockInfo; + class wxAuiDockArt; + """)) + + + module.addItem( + tools.wxArrayWrapperTemplate( + 'wxAuiDockInfoArray', 'wxAuiDockInfo', module)) + + module.addItem( + tools.wxArrayWrapperTemplate( + 'wxAuiDockUIPartArray', 'wxAuiDockUIPart', module)) + + module.addItem( + tools.wxArrayWrapperTemplate( + 'wxAuiPaneButtonArray', 'wxAuiPaneButton', module)) + + # module.addItem( + # tools.wxArrayWrapperTemplate( + # 'wxAuiPaneInfoPtrArray', 'wxAuiPaneInfo*', module)) + # + # module.addItem( + # tools.wxArrayWrapperTemplate( + # 'wxAuiDockInfoPtrArray', 'wxAuiDockInfo*', module)) + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/ext/wxWidgets b/ext/wxWidgets index 80e2614b..e9c8338c 160000 --- a/ext/wxWidgets +++ b/ext/wxWidgets @@ -1 +1 @@ -Subproject commit 80e2614bacca94571716bcb0e2c35412425f67ce +Subproject commit e9c8338c8528311eee73c38201e9de6dd41b3fb3 diff --git a/sphinxtools/constants.py b/sphinxtools/constants.py index bf0e3a7b..27f59b11 100644 --- a/sphinxtools/constants.py +++ b/sphinxtools/constants.py @@ -85,6 +85,7 @@ MODULENAME_REPLACE = {'_core' : 'wx.', '_msw' : 'wx.msw.', '_ribbon' : 'wx.ribbon.', '_propgrid': 'wx.propgrid.', + '_aui' : 'wx.aui.', } diff --git a/unittests/test_auiframemanager.py b/unittests/test_auiframemanager.py new file mode 100644 index 00000000..29d2dcdb --- /dev/null +++ b/unittests/test_auiframemanager.py @@ -0,0 +1,16 @@ +import unittest +from unittests import wtc +import wx + +#--------------------------------------------------------------------------- + +class auiframemanager_Tests(wtc.WidgetTestCase): + + # TODO: Remove this test and add real ones. + def test_auiframemanager1(self): + self.fail("Unit tests for auiframemanager not implemented yet.") + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main() diff --git a/wscript b/wscript index ca588eee..acffca73 100644 --- a/wscript +++ b/wscript @@ -142,6 +142,9 @@ def configure(conf): _copyEnvGroup(conf.env, '_WX', '_WXPROPGRID') conf.env.LIB_WXPROPGRID += cfg.makeLibName('propgrid') + _copyEnvGroup(conf.env, '_WX', '_WXAUI') + conf.env.LIB_WXPAUI += cfg.makeLibName('aui') + # ** Add code for new modules here (and below for non-MSW) # tweak the PYEXT compile and link flags if making a --debug build @@ -236,6 +239,10 @@ def configure(conf): args='--cxxflags --libs propgrid,core' + rpath, uselib_store='WXPROPGRID', mandatory=True) + conf.check_cfg(path=conf.options.wx_config, package='', + args='--cxxflags --libs aui,core' + rpath, + uselib_store='WXAUI', mandatory=True) + # ** Add code for new modules here @@ -528,7 +535,9 @@ def build(bld): makeETGRule(bld, 'etg/_media.py', '_media', 'WXMEDIA') makeETGRule(bld, 'etg/_ribbon.py', '_ribbon', 'WXRIBBON') makeETGRule(bld, 'etg/_propgrid.py', '_propgrid', 'WXPROPGRID') + makeETGRule(bld, 'etg/_aui.py', '_aui', 'WXAUI') + # Modules that are platform-specific if isDarwin: makeETGRule(bld, 'etg/_webkit.py', '_webkit', 'WXWEBKIT') if isWindows: