]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_mdi.i
added a test to check how exception handling works with Win32 SEH; corrected copyright
[wxWidgets.git] / wxPython / src / _mdi.i
index daf66d111ac943669290e5eea7e7ba6b1cd6f861..1ad5530ff766c3d806971e1d04d0152099aaaab6 100644 (file)
 
 
 
+MustHaveApp(wxMDIParentFrame);
+
 class wxMDIParentFrame : public wxFrame {
 public:
     %pythonAppend wxMDIParentFrame         "self._setOORInfo(self)"
     %pythonAppend wxMDIParentFrame()       ""
 
     wxMDIParentFrame(wxWindow *parent,
-                     const wxWindowID id,
-                     const wxString& title,
+                     const wxWindowID id=-1,
+                     const wxString& title = wxPyEmptyString,
                      const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
                      long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
                      const wxString& name = wxPyFrameNameStr);
-    %name(PreMDIParentFrame)wxMDIParentFrame();
+    %RenameCtor(PreMDIParentFrame, wxMDIParentFrame());
 
     bool Create(wxWindow *parent,
-                     const wxWindowID id,
-                     const wxString& title,
+                     const wxWindowID id=-1,
+                     const wxString& title = wxPyEmptyString,
                      const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
                      long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
@@ -78,30 +80,36 @@ public:
 
 //---------------------------------------------------------------------------
 
+MustHaveApp(wxMDIChildFrame);
+
 class wxMDIChildFrame : public wxFrame {
 public:
     %pythonAppend wxMDIChildFrame         "self._setOORInfo(self)"
     %pythonAppend wxMDIChildFrame()       ""
+    %typemap(out) wxMDIChildFrame*;    // turn off this typemap
 
     wxMDIChildFrame(wxMDIParentFrame* parent,
-                    const wxWindowID id,
-                    const wxString& title,
+                    const wxWindowID id=-1,
+                    const wxString& title = wxPyEmptyString,
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
                     long style = wxDEFAULT_FRAME_STYLE,
                     const wxString& name = wxPyFrameNameStr);
-    %name(PreMDIChildFrame)wxMDIChildFrame();
+    %RenameCtor(PreMDIChildFrame, wxMDIChildFrame());
+
+    // Turn it back on again
+    %typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
 
     bool Create(wxMDIParentFrame* parent,
-                    const wxWindowID id,
-                    const wxString& title,
+                    const wxWindowID id=-1,
+                    const wxString& title = wxPyEmptyString,
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
                     long style = wxDEFAULT_FRAME_STYLE,
                     const wxString& name = wxPyFrameNameStr);
 
     void Activate();
-    void Maximize(bool maximize);
+    void Maximize(bool maximize=true);
     void Restore();
 
 };
@@ -109,13 +117,19 @@ public:
 
 //---------------------------------------------------------------------------
 
+MustHaveApp(wxMDIClientWindow);
+
 class wxMDIClientWindow : public wxWindow {
 public:
     %pythonAppend wxMDIClientWindow         "self._setOORInfo(self)"
     %pythonAppend wxMDIClientWindow()       ""
+    %typemap(out) wxMDIClientWindow*;    // turn off this typemap
 
     wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
-    %name(PreMDIClientWindow)wxMDIClientWindow();
+    %RenameCtor(PreMDIClientWindow, wxMDIClientWindow());
+
+    // Turn it back on again
+    %typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
 
     bool Create(wxMDIParentFrame* parent, long style = 0);
 };