From b028366c4ae19d6eff9e04949941775bbb8cbb8f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 20 Mar 2007 22:30:27 +0000 Subject: [PATCH] Fix for bug #1681189, use the right typemap for GetActiveChild, etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/aui.i | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/wxPython/src/aui.i b/wxPython/src/aui.i index 82d9dabf80..ee3dcdb88f 100755 --- a/wxPython/src/aui.i +++ b/wxPython/src/aui.i @@ -202,6 +202,11 @@ The following example shows a simple implementation that utilizes %ignore wxAuiMDIParentFrame::~wxAuiMDIParentFrame; %rename(PreAuiMDIParentFrame) wxAuiMDIParentFrame::wxAuiMDIParentFrame(); +// Ignore these for now because they need a typemap for the return value, see below. +%ignore wxAuiMDIParentFrame::GetNotebook; +%ignore wxAuiMDIParentFrame::GetActiveChild; +%ignore wxAuiMDIParentFrame::GetClientWindow; + %pythonAppend wxAuiMDIChildFrame::wxAuiMDIChildFrame "self._setOORInfo(self)"; %pythonAppend wxAuiMDIChildFrame::wxAuiMDIChildFrame() "val._setOORInfo(val)"; %ignore wxAuiMDIChildFrame::~wxAuiMDIChildFrame; @@ -213,6 +218,8 @@ The following example shows a simple implementation that utilizes %rename(PreAuiMDIClientWindow) wxAuiMDIClientWindow::wxAuiMDIClientWindow(); +%typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1, $owner); } + //--------------------------------------------------------------------------- // Get all our defs from the REAL header files. @@ -300,6 +307,36 @@ The following example shows a simple implementation that utilizes ~wxAuiPaneButton() {} } +%extend wxAuiMDIParentFrame { + %typemap(out) wxAuiNotebook* { $result = wxPyMake_wxObject($1, $owner); } + %typemap(out) wxAuiMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); } + %typemap(out) wxAuiMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); } + + %rename(GetNotebook) _GetNotebook; + %rename(GetActiveChild) _GetActiveChild; + %rename(GetClientWindow) _GetClientWindow; + + wxAuiNotebook* _GetNotebook() const + { + return self->GetNotebook(); + } + + wxAuiMDIChildFrame* _GetActiveChild() const + { + return self->GetActiveChild(); + } + + wxAuiMDIClientWindow* _GetClientWindow() const + { + return self->GetClientWindow(); + } + + %typemap(out) wxAuiNotebook*; + %typemap(out) wxAuiMDIChildFrame*; + %typemap(out) wxAuiMDIClientWindow*; +} + + //--------------------------------------------------------------------------- %{