Commit | Line | Data |
---|---|---|
7bf85405 RD |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: mdi.i | |
3 | // Purpose: MDI related class definitions for wxPython | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 5/26/98 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 1998 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | ||
03e9bead RD |
14 | %module mdi |
15 | ||
16 | %{ | |
7bf85405 RD |
17 | #include "helpers.h" |
18 | %} | |
19 | ||
20 | //---------------------------------------------------------------------- | |
21 | ||
22 | %include typemaps.i | |
23 | %include my_typemaps.i | |
24 | ||
25 | // Import some definitions of other classes, etc. | |
26 | %import _defs.i | |
27 | %import misc.i | |
28 | %import windows.i | |
9c039d08 RD |
29 | %import frames.i |
30 | ||
b8b8dda7 | 31 | %pragma(python) code = "import wx" |
7bf85405 RD |
32 | |
33 | //---------------------------------------------------------------------- | |
34 | ||
35 | class wxMDIParentFrame : public wxFrame { | |
36 | public: | |
37 | wxMDIParentFrame(wxWindow *parent, | |
38 | const wxWindowID id, | |
39 | const wxString& title, | |
b68dc582 RD |
40 | const wxPoint& pos = wxDefaultPosition, |
41 | const wxSize& size = wxDefaultSize, | |
7bf85405 RD |
42 | long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
43 | const char* name = "frame"); | |
09f3d4e6 | 44 | %name(wxPreMDIParentFrame)wxMDIParentFrame(); |
7bf85405 | 45 | |
09f3d4e6 RD |
46 | bool Create(wxWindow *parent, |
47 | const wxWindowID id, | |
48 | const wxString& title, | |
49 | const wxPoint& pos = wxDefaultPosition, | |
50 | const wxSize& size = wxDefaultSize, | |
51 | long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, | |
52 | const char* name = "frame"); | |
9c039d08 | 53 | |
7bf85405 RD |
54 | void ActivateNext(); |
55 | void ActivatePrevious(); | |
56 | void ArrangeIcons(); | |
57 | void Cascade(); | |
7bf85405 RD |
58 | wxMDIChildFrame* GetActiveChild(); |
59 | wxMDIClientWindow* GetClientWindow(); | |
60 | wxWindow* GetToolBar(); | |
61 | ||
62 | // TODO: This isn't handled by the standard event-table system... | |
63 | //wxMDIClientWindow* OnCreateClient(); | |
64 | ||
3ca6a5f0 | 65 | |
fb5e0af0 | 66 | #ifdef __WXMSW__ |
3ca6a5f0 BP |
67 | wxMenu* GetWindowMenu(); |
68 | void SetWindowMenu(wxMenu* menu); | |
7bf85405 | 69 | void SetToolBar(wxToolBar* toolbar); |
fb5e0af0 | 70 | #endif |
7bf85405 RD |
71 | void Tile(); |
72 | }; | |
73 | ||
74 | //--------------------------------------------------------------------------- | |
75 | ||
76 | class wxMDIChildFrame : public wxFrame { | |
77 | public: | |
78 | wxMDIChildFrame(wxMDIParentFrame* parent, | |
79 | const wxWindowID id, | |
80 | const wxString& title, | |
b68dc582 RD |
81 | const wxPoint& pos = wxDefaultPosition, |
82 | const wxSize& size = wxDefaultSize, | |
7bf85405 RD |
83 | long style = wxDEFAULT_FRAME_STYLE, |
84 | const char* name = "frame"); | |
09f3d4e6 RD |
85 | %name(wxPreMDIChildFrame)wxMDIChildFrame(); |
86 | ||
87 | bool Create(wxMDIParentFrame* parent, | |
88 | const wxWindowID id, | |
89 | const wxString& title, | |
90 | const wxPoint& pos = wxDefaultPosition, | |
91 | const wxSize& size = wxDefaultSize, | |
92 | long style = wxDEFAULT_FRAME_STYLE, | |
93 | const char* name = "frame"); | |
7bf85405 | 94 | |
9c039d08 | 95 | |
7bf85405 | 96 | void Activate(); |
ab9bc19b | 97 | void Maximize(bool maximize); |
7bf85405 | 98 | void Restore(); |
fb5e0af0 | 99 | |
7bf85405 RD |
100 | }; |
101 | ||
102 | ||
103 | //--------------------------------------------------------------------------- | |
104 | ||
105 | class wxMDIClientWindow : public wxWindow { | |
106 | public: | |
107 | wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0); | |
09f3d4e6 RD |
108 | %name(wxPreMDIClientWindow)wxMDIClientWindow(); |
109 | ||
110 | %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" | |
111 | %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)" | |
112 | ||
113 | bool Create(wxMDIParentFrame* parent, long style = 0); | |
114 | ||
f6bcfd97 BP |
115 | %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)" |
116 | %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)" | |
7bf85405 RD |
117 | }; |
118 | ||
119 | //--------------------------------------------------------------------------- |