1 /////////////////////////////////////////////////////////////////////////////
 
   3 // Purpose:     MDI related class definitions for wxPython
 
   9 // Copyright:   (c) 1998 by Total Control Software
 
  10 // Licence:     wxWindows license
 
  11 /////////////////////////////////////////////////////////////////////////////
 
  20 //----------------------------------------------------------------------
 
  23 %include my_typemaps.i
 
  25 // Import some definitions of other classes, etc.
 
  31 %pragma(python) code = "import wx"
 
  33 //----------------------------------------------------------------------
 
  36     // Put some wx default wxChar* values into wxStrings.
 
  37     DECLARE_DEF_STRING(FrameNameStr);
 
  40 //----------------------------------------------------------------------
 
  42 const int IDM_WINDOWTILE  = 4001;
 
  43 const int IDM_WINDOWTILEHOR  = 4001;
 
  44 const int IDM_WINDOWCASCADE = 4002;
 
  45 const int IDM_WINDOWICONS = 4003;
 
  46 const int IDM_WINDOWNEXT = 4004;
 
  47 const int IDM_WINDOWTILEVERT = 4005;
 
  48 const int wxFIRST_MDI_CHILD = 4100;
 
  49 const int wxLAST_MDI_CHILD = 4600;
 
  53 class wxMDIParentFrame : public wxFrame {
 
  55     wxMDIParentFrame(wxWindow *parent,
 
  57                      const wxString& title,
 
  58                      const wxPoint& pos = wxDefaultPosition,
 
  59                      const wxSize& size = wxDefaultSize,
 
  60                      long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
 
  61                      const wxString& name = wxPyFrameNameStr);
 
  62     %name(wxPreMDIParentFrame)wxMDIParentFrame();
 
  64     bool Create(wxWindow *parent,
 
  66                      const wxString& title,
 
  67                      const wxPoint& pos = wxDefaultPosition,
 
  68                      const wxSize& size = wxDefaultSize,
 
  69                      long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
 
  70                      const wxString& name = wxPyFrameNameStr);
 
  72     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
  73     %pragma(python) addtomethod = "wxPreMDIParentFrame:val._setOORInfo(val)"
 
  76     void ActivatePrevious();
 
  79     wxMDIChildFrame* GetActiveChild();
 
  80     wxMDIClientWindow* GetClientWindow();
 
  81     wxWindow* GetToolBar();
 
  83     // TODO:  This isn't handled by the standard event-table system...
 
  84     //wxMDIClientWindow* OnCreateClient();
 
  88     wxMenu* GetWindowMenu();
 
  89     void SetWindowMenu(wxMenu* menu);
 
  90     void SetToolBar(wxToolBar* toolbar);
 
  95 //---------------------------------------------------------------------------
 
  97 class wxMDIChildFrame : public wxFrame {
 
  99     wxMDIChildFrame(wxMDIParentFrame* parent,
 
 101                     const wxString& title,
 
 102                     const wxPoint& pos = wxDefaultPosition,
 
 103                     const wxSize& size = wxDefaultSize,
 
 104                     long style = wxDEFAULT_FRAME_STYLE,
 
 105                     const wxString& name = wxPyFrameNameStr);
 
 106     %name(wxPreMDIChildFrame)wxMDIChildFrame();
 
 108     bool Create(wxMDIParentFrame* parent,
 
 110                     const wxString& title,
 
 111                     const wxPoint& pos = wxDefaultPosition,
 
 112                     const wxSize& size = wxDefaultSize,
 
 113                     long style = wxDEFAULT_FRAME_STYLE,
 
 114                     const wxString& name = wxPyFrameNameStr);
 
 116     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
 117     %pragma(python) addtomethod = "wxPreMDIChildFrame:val._setOORInfo(val)"
 
 120     void Maximize(bool maximize);
 
 126 //---------------------------------------------------------------------------
 
 128 class wxMDIClientWindow : public wxWindow {
 
 130     wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
 
 131     %name(wxPreMDIClientWindow)wxMDIClientWindow();
 
 133     bool Create(wxMDIParentFrame* parent, long style = 0);
 
 135     %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
 136     %pragma(python) addtomethod = "wxPreMDIClientWindow:val._setOORInfo(val)"
 
 139 //---------------------------------------------------------------------------