]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mdi.i
Reorganized listctrl demo a bit so I can test a bug report
[wxWidgets.git] / wxPython / src / mdi.i
index 6fc5ed554a94fe48c8abc4631cd30c7d6e2220a7..7c17fcea7183ebcb60ec77d2d72292528466a8ee 100644 (file)
 
 //----------------------------------------------------------------------
 
+%{
+    // Put some wx default wxChar* values into wxStrings.
+    DECLARE_DEF_STRING(FrameNameStr);
+%}
+
+//----------------------------------------------------------------------
+
+const int IDM_WINDOWTILE  = 4001;
+const int IDM_WINDOWTILEHOR  = 4001;
+const int IDM_WINDOWCASCADE = 4002;
+const int IDM_WINDOWICONS = 4003;
+const int IDM_WINDOWNEXT = 4004;
+const int IDM_WINDOWTILEVERT = 4005;
+const int wxFIRST_MDI_CHILD = 4100;
+const int wxLAST_MDI_CHILD = 4600;
+
+
+
 class wxMDIParentFrame : public wxFrame {
 public:
     wxMDIParentFrame(wxWindow *parent,
                      const wxWindowID id,
                      const wxString& title,
-                     const wxPoint& pos = wxPyDefaultPosition,
-                     const wxSize& size = wxPyDefaultSize,
+                     const wxPoint& pos = wxDefaultPosition,
+                     const wxSize& size = wxDefaultSize,
                      long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
-                     const char* name = "frame");
+                     const wxString& name = wxPyFrameNameStr);
+    %name(wxPreMDIParentFrame)wxMDIParentFrame();
 
-    %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)"
+    bool Create(wxWindow *parent,
+                     const wxWindowID id,
+                     const wxString& title,
+                     const wxPoint& pos = wxDefaultPosition,
+                     const wxSize& size = wxDefaultSize,
+                     long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
+                     const wxString& name = wxPyFrameNameStr);
+
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+    %pragma(python) addtomethod = "wxPreMDIParentFrame:val._setOORInfo(val)"
 
     void ActivateNext();
     void ActivatePrevious();
@@ -55,7 +83,10 @@ public:
     // TODO:  This isn't handled by the standard event-table system...
     //wxMDIClientWindow* OnCreateClient();
 
+
 #ifdef __WXMSW__
+    wxMenu* GetWindowMenu();
+    void SetWindowMenu(wxMenu* menu);
     void SetToolBar(wxToolBar* toolbar);
 #endif
     void Tile();
@@ -68,12 +99,22 @@ public:
     wxMDIChildFrame(wxMDIParentFrame* parent,
                     const wxWindowID id,
                     const wxString& title,
-                    const wxPoint& pos = wxPyDefaultPosition,
-                    const wxSize& size = wxPyDefaultSize,
+                    const wxPoint& pos = wxDefaultPosition,
+                    const wxSize& size = wxDefaultSize,
                     long style = wxDEFAULT_FRAME_STYLE,
-                    const char* name = "frame");
+                    const wxString& name = wxPyFrameNameStr);
+    %name(wxPreMDIChildFrame)wxMDIChildFrame();
 
-    %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)"
+    bool Create(wxMDIParentFrame* parent,
+                    const wxWindowID id,
+                    const wxString& title,
+                    const wxPoint& pos = wxDefaultPosition,
+                    const wxSize& size = wxDefaultSize,
+                    long style = wxDEFAULT_FRAME_STYLE,
+                    const wxString& name = wxPyFrameNameStr);
+
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+    %pragma(python) addtomethod = "wxPreMDIChildFrame:val._setOORInfo(val)"
 
     void Activate();
     void Maximize(bool maximize);
@@ -87,8 +128,12 @@ public:
 class wxMDIClientWindow : public wxWindow {
 public:
     wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
-    %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
-    %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)"
+    %name(wxPreMDIClientWindow)wxMDIClientWindow();
+
+    bool Create(wxMDIParentFrame* parent, long style = 0);
+
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+    %pragma(python) addtomethod = "wxPreMDIClientWindow:val._setOORInfo(val)"
 };
 
 //---------------------------------------------------------------------------