]>
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 | ||
26e335b8 RD |
35 | const int IDM_WINDOWTILE = 4001; |
36 | const int IDM_WINDOWTILEHOR = 4001; | |
37 | const int IDM_WINDOWCASCADE = 4002; | |
38 | const int IDM_WINDOWICONS = 4003; | |
39 | const int IDM_WINDOWNEXT = 4004; | |
40 | const int IDM_WINDOWTILEVERT = 4005; | |
41 | const int wxFIRST_MDI_CHILD = 4100; | |
42 | const int wxLAST_MDI_CHILD = 4600; | |
43 | ||
44 | ||
45 | ||
7bf85405 RD |
46 | class wxMDIParentFrame : public wxFrame { |
47 | public: | |
48 | wxMDIParentFrame(wxWindow *parent, | |
49 | const wxWindowID id, | |
50 | const wxString& title, | |
b68dc582 RD |
51 | const wxPoint& pos = wxDefaultPosition, |
52 | const wxSize& size = wxDefaultSize, | |
7bf85405 RD |
53 | long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
54 | const char* name = "frame"); | |
09f3d4e6 | 55 | %name(wxPreMDIParentFrame)wxMDIParentFrame(); |
7bf85405 | 56 | |
09f3d4e6 RD |
57 | bool Create(wxWindow *parent, |
58 | const wxWindowID id, | |
59 | const wxString& title, | |
60 | const wxPoint& pos = wxDefaultPosition, | |
61 | const wxSize& size = wxDefaultSize, | |
62 | long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, | |
63 | const char* name = "frame"); | |
9c039d08 | 64 | |
0122b7e3 | 65 | %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" |
17c0e08c | 66 | %pragma(python) addtomethod = "wxPreMDIParentFrame:val._setOORInfo(val)" |
0122b7e3 | 67 | |
7bf85405 RD |
68 | void ActivateNext(); |
69 | void ActivatePrevious(); | |
70 | void ArrangeIcons(); | |
71 | void Cascade(); | |
7bf85405 RD |
72 | wxMDIChildFrame* GetActiveChild(); |
73 | wxMDIClientWindow* GetClientWindow(); | |
74 | wxWindow* GetToolBar(); | |
75 | ||
76 | // TODO: This isn't handled by the standard event-table system... | |
77 | //wxMDIClientWindow* OnCreateClient(); | |
78 | ||
3ca6a5f0 | 79 | |
fb5e0af0 | 80 | #ifdef __WXMSW__ |
3ca6a5f0 BP |
81 | wxMenu* GetWindowMenu(); |
82 | void SetWindowMenu(wxMenu* menu); | |
7bf85405 | 83 | void SetToolBar(wxToolBar* toolbar); |
fb5e0af0 | 84 | #endif |
7bf85405 RD |
85 | void Tile(); |
86 | }; | |
87 | ||
88 | //--------------------------------------------------------------------------- | |
89 | ||
90 | class wxMDIChildFrame : public wxFrame { | |
91 | public: | |
92 | wxMDIChildFrame(wxMDIParentFrame* parent, | |
93 | const wxWindowID id, | |
94 | const wxString& title, | |
b68dc582 RD |
95 | const wxPoint& pos = wxDefaultPosition, |
96 | const wxSize& size = wxDefaultSize, | |
7bf85405 RD |
97 | long style = wxDEFAULT_FRAME_STYLE, |
98 | const char* name = "frame"); | |
09f3d4e6 RD |
99 | %name(wxPreMDIChildFrame)wxMDIChildFrame(); |
100 | ||
101 | bool Create(wxMDIParentFrame* parent, | |
102 | const wxWindowID id, | |
103 | const wxString& title, | |
104 | const wxPoint& pos = wxDefaultPosition, | |
105 | const wxSize& size = wxDefaultSize, | |
106 | long style = wxDEFAULT_FRAME_STYLE, | |
107 | const char* name = "frame"); | |
7bf85405 | 108 | |
0122b7e3 | 109 | %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" |
17c0e08c | 110 | %pragma(python) addtomethod = "wxPreMDIChildFrame:val._setOORInfo(val)" |
9c039d08 | 111 | |
7bf85405 | 112 | void Activate(); |
ab9bc19b | 113 | void Maximize(bool maximize); |
7bf85405 | 114 | void Restore(); |
fb5e0af0 | 115 | |
7bf85405 RD |
116 | }; |
117 | ||
118 | ||
119 | //--------------------------------------------------------------------------- | |
120 | ||
121 | class wxMDIClientWindow : public wxWindow { | |
122 | public: | |
123 | wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0); | |
09f3d4e6 RD |
124 | %name(wxPreMDIClientWindow)wxMDIClientWindow(); |
125 | ||
09f3d4e6 RD |
126 | bool Create(wxMDIParentFrame* parent, long style = 0); |
127 | ||
0122b7e3 | 128 | %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" |
17c0e08c | 129 | %pragma(python) addtomethod = "wxPreMDIClientWindow:val._setOORInfo(val)" |
7bf85405 RD |
130 | }; |
131 | ||
132 | //--------------------------------------------------------------------------- |