diff --git a/docs/sphinx/itemToModuleMap.json b/docs/sphinx/itemToModuleMap.json index 7a92323a..189a8c75 100644 --- a/docs/sphinx/itemToModuleMap.json +++ b/docs/sphinx/itemToModuleMap.json @@ -106,6 +106,42 @@ "ART_TOOLBAR":"wx.", "ART_UNDO":"wx.", "ART_WARNING":"wx.", +"AUI_BUTTON_CLOSE":"wx.aui.", +"AUI_BUTTON_CUSTOM1":"wx.aui.", +"AUI_BUTTON_CUSTOM2":"wx.aui.", +"AUI_BUTTON_CUSTOM3":"wx.aui.", +"AUI_BUTTON_DOWN":"wx.aui.", +"AUI_BUTTON_LEFT":"wx.aui.", +"AUI_BUTTON_MAXIMIZE_RESTORE":"wx.aui.", +"AUI_BUTTON_MINIMIZE":"wx.aui.", +"AUI_BUTTON_OPTIONS":"wx.aui.", +"AUI_BUTTON_PIN":"wx.aui.", +"AUI_BUTTON_RIGHT":"wx.aui.", +"AUI_BUTTON_STATE_CHECKED":"wx.aui.", +"AUI_BUTTON_STATE_DISABLED":"wx.aui.", +"AUI_BUTTON_STATE_HIDDEN":"wx.aui.", +"AUI_BUTTON_STATE_HOVER":"wx.aui.", +"AUI_BUTTON_STATE_NORMAL":"wx.aui.", +"AUI_BUTTON_STATE_PRESSED":"wx.aui.", +"AUI_BUTTON_UP":"wx.aui.", +"AUI_BUTTON_WINDOWLIST":"wx.aui.", +"AUI_DOCKART_ACTIVE_CAPTION_COLOUR":"wx.aui.", +"AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR":"wx.aui.", +"AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR":"wx.aui.", +"AUI_DOCKART_BACKGROUND_COLOUR":"wx.aui.", +"AUI_DOCKART_BORDER_COLOUR":"wx.aui.", +"AUI_DOCKART_CAPTION_FONT":"wx.aui.", +"AUI_DOCKART_CAPTION_SIZE":"wx.aui.", +"AUI_DOCKART_GRADIENT_TYPE":"wx.aui.", +"AUI_DOCKART_GRIPPER_COLOUR":"wx.aui.", +"AUI_DOCKART_GRIPPER_SIZE":"wx.aui.", +"AUI_DOCKART_INACTIVE_CAPTION_COLOUR":"wx.aui.", +"AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR":"wx.aui.", +"AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR":"wx.aui.", +"AUI_DOCKART_PANE_BORDER_SIZE":"wx.aui.", +"AUI_DOCKART_PANE_BUTTON_SIZE":"wx.aui.", +"AUI_DOCKART_SASH_COLOUR":"wx.aui.", +"AUI_DOCKART_SASH_SIZE":"wx.aui.", "AUI_DOCK_BOTTOM":"wx.aui.", "AUI_DOCK_CENTER":"wx.aui.", "AUI_DOCK_CENTRE":"wx.aui.", @@ -113,6 +149,9 @@ "AUI_DOCK_NONE":"wx.aui.", "AUI_DOCK_RIGHT":"wx.aui.", "AUI_DOCK_TOP":"wx.aui.", +"AUI_GRADIENT_HORIZONTAL":"wx.aui.", +"AUI_GRADIENT_NONE":"wx.aui.", +"AUI_GRADIENT_VERTICAL":"wx.aui.", "AUI_MGR_ALLOW_ACTIVE_PANE":"wx.aui.", "AUI_MGR_ALLOW_FLOATING":"wx.aui.", "AUI_MGR_DEFAULT":"wx.aui.", @@ -123,6 +162,40 @@ "AUI_MGR_TRANSPARENT_DRAG":"wx.aui.", "AUI_MGR_TRANSPARENT_HINT":"wx.aui.", "AUI_MGR_VENETIAN_BLINDS_HINT":"wx.aui.", +"AUI_NB_BOTTOM":"wx.aui.", +"AUI_NB_CLOSE_BUTTON":"wx.aui.", +"AUI_NB_CLOSE_ON_ACTIVE_TAB":"wx.aui.", +"AUI_NB_CLOSE_ON_ALL_TABS":"wx.aui.", +"AUI_NB_DEFAULT_STYLE":"wx.aui.", +"AUI_NB_LEFT":"wx.aui.", +"AUI_NB_MIDDLE_CLICK_CLOSE":"wx.aui.", +"AUI_NB_RIGHT":"wx.aui.", +"AUI_NB_SCROLL_BUTTONS":"wx.aui.", +"AUI_NB_TAB_EXTERNAL_MOVE":"wx.aui.", +"AUI_NB_TAB_FIXED_WIDTH":"wx.aui.", +"AUI_NB_TAB_MOVE":"wx.aui.", +"AUI_NB_TAB_SPLIT":"wx.aui.", +"AUI_NB_TOP":"wx.aui.", +"AUI_NB_WINDOWLIST_BUTTON":"wx.aui.", +"AUI_ORIENTATION_MASK":"wx.aui.", +"AUI_TBART_GRIPPER_SIZE":"wx.aui.", +"AUI_TBART_OVERFLOW_SIZE":"wx.aui.", +"AUI_TBART_SEPARATOR_SIZE":"wx.aui.", +"AUI_TBTOOL_TEXT_BOTTOM":"wx.aui.", +"AUI_TBTOOL_TEXT_LEFT":"wx.aui.", +"AUI_TBTOOL_TEXT_RIGHT":"wx.aui.", +"AUI_TBTOOL_TEXT_TOP":"wx.aui.", +"AUI_TB_DEFAULT_STYLE":"wx.aui.", +"AUI_TB_GRIPPER":"wx.aui.", +"AUI_TB_HORIZONTAL":"wx.aui.", +"AUI_TB_HORZ_LAYOUT":"wx.aui.", +"AUI_TB_HORZ_TEXT":"wx.aui.", +"AUI_TB_NO_AUTORESIZE":"wx.aui.", +"AUI_TB_NO_TOOLTIPS":"wx.aui.", +"AUI_TB_OVERFLOW":"wx.aui.", +"AUI_TB_PLAIN_BACKGROUND":"wx.aui.", +"AUI_TB_TEXT":"wx.aui.", +"AUI_TB_VERTICAL":"wx.aui.", "Abort":"wx.", "AboutBox":"wx.adv.", "AboutDialogInfo":"wx.adv.", @@ -156,11 +229,40 @@ "AsIs":"wx.", "AssertHandler_t":"wx.", "AttrKind":"wx.grid.GridCellAttr.", +"AuiButtonId":"wx.aui.", +"AuiDefaultDockArt":"wx.aui.", +"AuiDefaultTabArt":"wx.aui.", +"AuiDefaultToolBarArt":"wx.aui.", +"AuiDockArt":"wx.aui.", +"AuiDockInfo":"wx.aui.", +"AuiDockUIPart":"wx.aui.", +"AuiMDIChildFrame":"wx.aui.", +"AuiMDIClientWindow":"wx.aui.", +"AuiMDIParentFrame":"wx.aui.", "AuiManager":"wx.aui.", "AuiManagerDock":"wx.aui.", "AuiManagerEvent":"wx.aui.", "AuiManagerOption":"wx.aui.", +"AuiNotebook":"wx.aui.", +"AuiNotebookEvent":"wx.aui.", +"AuiNotebookOption":"wx.aui.", +"AuiNotebookPage":"wx.aui.", +"AuiPaneButton":"wx.aui.", +"AuiPaneButtonState":"wx.aui.", +"AuiPaneDockArtGradients":"wx.aui.", +"AuiPaneDockArtSetting":"wx.aui.", "AuiPaneInfo":"wx.aui.", +"AuiSimpleTabArt":"wx.aui.", +"AuiTabArt":"wx.aui.", +"AuiTabContainer":"wx.aui.", +"AuiTabContainerButton":"wx.aui.", +"AuiToolBar":"wx.aui.", +"AuiToolBarArt":"wx.aui.", +"AuiToolBarArtSetting":"wx.aui.", +"AuiToolBarEvent":"wx.aui.", +"AuiToolBarItem":"wx.aui.", +"AuiToolBarStyle":"wx.aui.", +"AuiToolBarToolTextOrientation":"wx.aui.", "AutoBufferedPaintDC":"wx.", "AutoBufferedPaintDCFactory":"wx.", "BACKINGSTORE":"wx.", @@ -6143,6 +6245,26 @@ "wxEVT_ACTIVATE":"wx.", "wxEVT_ACTIVATE_APP":"wx.", "wxEVT_ANY":"wx.", +"wxEVT_AUINOTEBOOK_ALLOW_DND":"wx.aui.", +"wxEVT_AUINOTEBOOK_BEGIN_DRAG":"wx.aui.", +"wxEVT_AUINOTEBOOK_BG_DCLICK":"wx.aui.", +"wxEVT_AUINOTEBOOK_BUTTON":"wx.aui.", +"wxEVT_AUINOTEBOOK_DRAG_DONE":"wx.aui.", +"wxEVT_AUINOTEBOOK_DRAG_MOTION":"wx.aui.", +"wxEVT_AUINOTEBOOK_END_DRAG":"wx.aui.", +"wxEVT_AUINOTEBOOK_PAGE_CHANGED":"wx.aui.", +"wxEVT_AUINOTEBOOK_PAGE_CHANGING":"wx.aui.", +"wxEVT_AUINOTEBOOK_PAGE_CLOSE":"wx.aui.", +"wxEVT_AUINOTEBOOK_PAGE_CLOSED":"wx.aui.", +"wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN":"wx.aui.", +"wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP":"wx.aui.", +"wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN":"wx.aui.", +"wxEVT_AUINOTEBOOK_TAB_RIGHT_UP":"wx.aui.", +"wxEVT_AUITOOLBAR_BEGIN_DRAG":"wx.aui.", +"wxEVT_AUITOOLBAR_MIDDLE_CLICK":"wx.aui.", +"wxEVT_AUITOOLBAR_OVERFLOW_CLICK":"wx.aui.", +"wxEVT_AUITOOLBAR_RIGHT_CLICK":"wx.aui.", +"wxEVT_AUITOOLBAR_TOOL_DROPDOWN":"wx.aui.", "wxEVT_AUI_FIND_MANAGER":"wx.aui.", "wxEVT_AUI_PANE_ACTIVATED":"wx.aui.", "wxEVT_AUI_PANE_BUTTON":"wx.aui.", diff --git a/etg/_aui.py b/etg/_aui.py index 6ffea6c9..75f9c17f 100644 --- a/etg/_aui.py +++ b/etg/_aui.py @@ -24,6 +24,10 @@ ITEMS = [ ] # 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', + 'auidockart', + 'auibar', + 'auibook', + 'auitabmdi', ] diff --git a/etg/auibar.py b/etg/auibar.py new file mode 100644 index 00000000..c8ebb655 --- /dev/null +++ b/etg/auibar.py @@ -0,0 +1,67 @@ +#--------------------------------------------------------------------------- +# Name: etg/auibar.py +# Author: Robin Dunn +# +# Created: 26-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 = "auibar" # 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 = [ 'wxAuiToolBarItem', + 'wxAuiToolBarArt', + 'wxAuiDefaultToolBarArt', + 'wxAuiToolBar', + 'wxAuiToolBarEvent', + ] + +#--------------------------------------------------------------------------- + +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('wxAuiToolBar') + assert isinstance(c, etgtools.ClassDef) + tools.fixWindowClass(c) + + + c = module.find('wxAuiToolBarEvent') + tools.fixEventClass(c) + + c.addPyCode("""\ + EVT_AUITOOLBAR_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_AUITOOLBAR_TOOL_DROPDOWN, 1 ) + EVT_AUITOOLBAR_OVERFLOW_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_OVERFLOW_CLICK, 1 ) + EVT_AUITOOLBAR_RIGHT_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_RIGHT_CLICK, 1 ) + EVT_AUITOOLBAR_MIDDLE_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_MIDDLE_CLICK, 1 ) + EVT_AUITOOLBAR_BEGIN_DRAG = wx.PyEventBinder( wxEVT_AUITOOLBAR_BEGIN_DRAG, 1 ) + """) + + + module.addItem(tools.wxArrayWrapperTemplate( + 'wxAuiToolBarItemArray', 'wxAuiToolBarItem', module)) + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/etg/auibook.py b/etg/auibook.py new file mode 100644 index 00000000..16b97b0a --- /dev/null +++ b/etg/auibook.py @@ -0,0 +1,89 @@ +#--------------------------------------------------------------------------- +# Name: etg/auibook.py +# Author: Robin Dunn +# +# Created: 26-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 = "auibook" # 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 = [ 'wxAuiNotebook', + 'wxAuiNotebookPage', + 'wxAuiTabContainerButton', + 'wxAuiTabContainer', + 'wxAuiTabArt', + 'wxAuiDefaultTabArt', + 'wxAuiSimpleTabArt', + 'wxAuiNotebookEvent', + ] + +#--------------------------------------------------------------------------- + +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('wxAuiNotebook') + assert isinstance(c, etgtools.ClassDef) + tools.fixWindowClass(c) + + c = module.find('wxAuiTabContainer') + tools.ignoreConstOverloads(c) + + module.addItem(tools.wxArrayWrapperTemplate( + 'wxAuiNotebookPageArray', 'wxAuiNotebookPage', module)) + + module.addItem(tools.wxArrayWrapperTemplate( + 'wxAuiTabContainerButtonArray', 'wxAuiTabContainerButton', module)) + + c = module.find('wxAuiTabArt') + c.abstract = True + + c = module.find('wxAuiNotebookEvent') + tools.fixEventClass(c) + c.addPyCode("""\ + EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSE, 1 ) + EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSED, 1 ) + EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGED, 1 ) + EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGING, 1 ) + EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BUTTON, 1 ) + EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BEGIN_DRAG, 1 ) + EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_END_DRAG, 1 ) + EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_MOTION, 1 ) + EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_AUINOTEBOOK_ALLOW_DND, 1 ) + EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_DONE, 1 ) + EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 ) + EVT_AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, 1 ) + EVT_AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 ) + EVT_AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, 1 ) + EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BG_DCLICK, 1 ) + """) + + + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/etg/auidockart.py b/etg/auidockart.py new file mode 100644 index 00000000..37a0bb23 --- /dev/null +++ b/etg/auidockart.py @@ -0,0 +1,48 @@ +#--------------------------------------------------------------------------- +# Name: etg/auidockart.py +# Author: Robin Dunn +# +# Created: 26-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 = "auidockart" # 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 = [ 'wxAuiDockArt', + 'wxAuiDefaultDockArt', + ] + +#--------------------------------------------------------------------------- + +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('wxAuiDockArt') + assert isinstance(c, etgtools.ClassDef) + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/etg/auiframemanager.py b/etg/auiframemanager.py index 9e5d61fe..80a02a8e 100644 --- a/etg/auiframemanager.py +++ b/etg/auiframemanager.py @@ -20,6 +20,9 @@ DOCSTRING = "" ITEMS = [ 'wxAuiManager', 'wxAuiPaneInfo', 'wxAuiManagerEvent', + 'wxAuiDockInfo', + 'wxAuiDockUIPart', + 'wxAuiPaneButton', ] #--------------------------------------------------------------------------- @@ -58,34 +61,20 @@ def run(): """) - module.insertItem(0, etgtools.WigCode("""\ - // forward declarations - class wxAuiDockUIPart; - class wxAuiPaneButton; - class wxAuiDockInfo; - class wxAuiDockArt; - """)) - - - module.addItem( - tools.wxArrayWrapperTemplate( + module.addItem(tools.wxArrayWrapperTemplate( 'wxAuiDockInfoArray', 'wxAuiDockInfo', module)) - module.addItem( - tools.wxArrayWrapperTemplate( + module.addItem(tools.wxArrayWrapperTemplate( 'wxAuiDockUIPartArray', 'wxAuiDockUIPart', module)) - module.addItem( - tools.wxArrayWrapperTemplate( + module.addItem(tools.wxArrayWrapperTemplate( 'wxAuiPaneButtonArray', 'wxAuiPaneButton', module)) - # module.addItem( - # tools.wxArrayWrapperTemplate( - # 'wxAuiPaneInfoPtrArray', 'wxAuiPaneInfo*', module)) - # - # module.addItem( - # tools.wxArrayWrapperTemplate( - # 'wxAuiDockInfoPtrArray', 'wxAuiDockInfo*', module)) + module.addItem(tools.wxArrayWrapperTemplate( + 'wxAuiPaneInfoPtrArray', 'wxAuiPaneInfo', module, itemIsPtr=True)) + + module.addItem(tools.wxArrayWrapperTemplate( + 'wxAuiDockInfoPtrArray', 'wxAuiDockInfo', module, itemIsPtr=True)) #----------------------------------------------------------------- diff --git a/etg/auitabmdi.py b/etg/auitabmdi.py new file mode 100644 index 00000000..ced4cf2c --- /dev/null +++ b/etg/auitabmdi.py @@ -0,0 +1,59 @@ +#--------------------------------------------------------------------------- +# Name: etg/auitabmdi.py +# Author: Robin Dunn +# +# Created: 27-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 = "auitabmdi" # 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 = [ 'wxAuiMDIParentFrame', + 'wxAuiMDIChildFrame', + 'wxAuiMDIClientWindow', + ] + +#--------------------------------------------------------------------------- + +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('wxAuiMDIParentFrame') + assert isinstance(c, etgtools.ClassDef) + tools.fixTopLevelWindowClass(c) + + + c = module.find('wxAuiMDIChildFrame') + tools.fixTopLevelWindowClass(c) + tools.fixSetStatusWidths(c.find('SetStatusWidths')) + + + c = module.find('wxAuiMDIClientWindow') + tools.fixWindowClass(c) + + + #----------------------------------------------------------------- + tools.doCommonTweaks(module) + tools.runGenerators(module) + + +#--------------------------------------------------------------------------- +if __name__ == '__main__': + run() + diff --git a/etg/frame.py b/etg/frame.py index 37378633..ce33fa01 100644 --- a/etg/frame.py +++ b/etg/frame.py @@ -40,16 +40,8 @@ def run(): # We already have a MappedType for wxArrayInt, so just tweak the # interface to use that instead of an array size and a const int pointer. - m = c.find('SetStatusWidths') - m.find('n').ignore() - m.find('widths_field').type = 'const wxArrayInt&' - m.find('widths_field').name = 'widths' - m.argsString = '(int n, const wxArrayInt& widths)' - m.setCppCode("""\ - const int* ptr = &widths->front(); - self->SetStatusWidths(widths->size(), ptr); - """) - + tools.fixSetStatusWidths(c.find('SetStatusWidths')) + c.addProperty('MenuBar GetMenuBar SetMenuBar') c.addProperty('StatusBar GetStatusBar SetStatusBar') c.addProperty('StatusBarPane GetStatusBarPane SetStatusBarPane') diff --git a/etg/statusbar.py b/etg/statusbar.py index d51db207..d94004ca 100644 --- a/etg/statusbar.py +++ b/etg/statusbar.py @@ -37,16 +37,8 @@ def run(): # We already have a MappedType for wxArrayInt, so just tweak the # interface to use that instead of an array size and a const int pointer. - m = c.find('SetStatusWidths') - m.find('n').ignore() - m.find('widths_field').type = 'const wxArrayInt&' - m.find('widths_field').name = 'widths' - m.argsString = '(int n, const wxArrayInt& widths)' - m.setCppCode("""\ - const int* ptr = &widths->front(); - self->SetStatusWidths(widths->size(), ptr); - """) - + tools.fixSetStatusWidths(c.find('SetStatusWidths')) + # Same thing for SetStatusStyles m = c.find('SetStatusStyles') m.find('n').ignore() diff --git a/etgtools/tweaker_tools.py b/etgtools/tweaker_tools.py index e31129ab..b36a0170 100644 --- a/etgtools/tweaker_tools.py +++ b/etgtools/tweaker_tools.py @@ -344,7 +344,21 @@ def fixHtmlSetFonts(klass): } self->SetFonts(*normal_face, *fixed_face, &sizes->Item(0)); """) - + + +def fixSetStatusWidths(m): + # We already have a MappedType for wxArrayInt, so just tweak the + # interface to use that instead of an array size and a const int pointer. + m.find('n').ignore() + m.find('widths_field').type = 'const wxArrayInt&' + m.find('widths_field').name = 'widths' + m.argsString = '(int n, const wxArrayInt& widths)' + m.setCppCode("""\ + const int* ptr = &widths->front(); + self->SetStatusWidths(widths->size(), ptr); + """) + + def removeVirtuals(klass): """ @@ -360,7 +374,7 @@ def removeVirtuals(klass): def addWindowVirtuals(klass): """ - Either turn the virtual flag back on or add a delcaration for the subset of + Either turn the virtual flag back on or add a declaration for the subset of the C++ virtuals in wxWindow classes that we will be supporting. """ publicWindowVirtuals = [ diff --git a/ext/wxWidgets b/ext/wxWidgets index e9c8338c..4926148e 160000 --- a/ext/wxWidgets +++ b/ext/wxWidgets @@ -1 +1 @@ -Subproject commit e9c8338c8528311eee73c38201e9de6dd41b3fb3 +Subproject commit 4926148ec91b91fce1cae75a236e6db75d8db52d diff --git a/unittests/test_auibar.py b/unittests/test_auibar.py new file mode 100644 index 00000000..793f8466 --- /dev/null +++ b/unittests/test_auibar.py @@ -0,0 +1,16 @@ +import unittest +from unittests import wtc +import wx + +#--------------------------------------------------------------------------- + +class auibar_Tests(wtc.WidgetTestCase): + + # TODO: Remove this test and add real ones. + def test_auibar1(self): + self.fail("Unit tests for auibar not implemented yet.") + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main() diff --git a/unittests/test_auibook.py b/unittests/test_auibook.py new file mode 100644 index 00000000..12c72b57 --- /dev/null +++ b/unittests/test_auibook.py @@ -0,0 +1,16 @@ +import unittest +from unittests import wtc +import wx + +#--------------------------------------------------------------------------- + +class auibook_Tests(wtc.WidgetTestCase): + + # TODO: Remove this test and add real ones. + def test_auibook1(self): + self.fail("Unit tests for auibook not implemented yet.") + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main() diff --git a/unittests/test_auidockart.py b/unittests/test_auidockart.py new file mode 100644 index 00000000..390fff77 --- /dev/null +++ b/unittests/test_auidockart.py @@ -0,0 +1,16 @@ +import unittest +from unittests import wtc +import wx + +#--------------------------------------------------------------------------- + +class auidockart_Tests(wtc.WidgetTestCase): + + # TODO: Remove this test and add real ones. + def test_auidockart1(self): + self.fail("Unit tests for auidockart not implemented yet.") + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main() diff --git a/unittests/test_auitabmdi.py b/unittests/test_auitabmdi.py new file mode 100644 index 00000000..7eac2376 --- /dev/null +++ b/unittests/test_auitabmdi.py @@ -0,0 +1,16 @@ +import unittest +from unittests import wtc +import wx + +#--------------------------------------------------------------------------- + +class auitabmdi_Tests(wtc.WidgetTestCase): + + # TODO: Remove this test and add real ones. + def test_auitabmdi1(self): + self.fail("Unit tests for auitabmdi not implemented yet.") + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main() diff --git a/wscript b/wscript index acffca73..35ee041e 100644 --- a/wscript +++ b/wscript @@ -535,7 +535,7 @@ 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') + makeETGRule(bld, 'etg/_aui.py', '_aui', 'WXAUI') # Modules that are platform-specific if isDarwin: