]>
Commit | Line | Data |
---|---|---|
7bf85405 | 1 | ///////////////////////////////////////////////////////////////////////////// |
d14a1e28 RD |
2 | // Name: _mdi.i |
3 | // Purpose: SWIG interface for MDI related class definitions | |
7bf85405 RD |
4 | // |
5 | // Author: Robin Dunn | |
6 | // | |
d14a1e28 | 7 | // Created: 26-May-1998 |
7bf85405 | 8 | // RCS-ID: $Id$ |
d14a1e28 | 9 | // Copyright: (c) 2003 by Total Control Software |
7bf85405 RD |
10 | // Licence: wxWindows license |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
d14a1e28 | 13 | // Not a %module |
7bf85405 | 14 | |
03e9bead | 15 | |
d14a1e28 RD |
16 | //--------------------------------------------------------------------------- |
17 | %newgroup | |
7bf85405 | 18 | |
137b5242 | 19 | %{ |
d14a1e28 | 20 | #include <wx/mdi.h> |
137b5242 RD |
21 | %} |
22 | ||
d14a1e28 | 23 | //--------------------------------------------------------------------------- |
137b5242 | 24 | |
d14a1e28 RD |
25 | #define IDM_WINDOWTILE 4001 |
26 | #define IDM_WINDOWTILEHOR 4001 | |
27 | #define IDM_WINDOWCASCADE 4002 | |
28 | #define IDM_WINDOWICONS 4003 | |
29 | #define IDM_WINDOWNEXT 4004 | |
30 | #define IDM_WINDOWTILEVERT 4005 | |
97185340 | 31 | #define IDM_WINDOWPREV 4006 |
d14a1e28 RD |
32 | #define wxFIRST_MDI_CHILD 4100 |
33 | #define wxLAST_MDI_CHILD 4600 | |
26e335b8 RD |
34 | |
35 | ||
36 | ||
ab1f7d2a RD |
37 | MustHaveApp(wxMDIParentFrame); |
38 | ||
7bf85405 RD |
39 | class wxMDIParentFrame : public wxFrame { |
40 | public: | |
2b9048c5 RD |
41 | %pythonAppend wxMDIParentFrame "self._setOORInfo(self)" |
42 | %pythonAppend wxMDIParentFrame() "" | |
d14a1e28 | 43 | |
7bf85405 | 44 | wxMDIParentFrame(wxWindow *parent, |
d5573410 RD |
45 | const wxWindowID id=-1, |
46 | const wxString& title = wxPyEmptyString, | |
b68dc582 RD |
47 | const wxPoint& pos = wxDefaultPosition, |
48 | const wxSize& size = wxDefaultSize, | |
7bf85405 | 49 | long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
137b5242 | 50 | const wxString& name = wxPyFrameNameStr); |
1b8c7ba6 | 51 | %RenameCtor(PreMDIParentFrame, wxMDIParentFrame()); |
7bf85405 | 52 | |
09f3d4e6 | 53 | bool Create(wxWindow *parent, |
d5573410 RD |
54 | const wxWindowID id=-1, |
55 | const wxString& title = wxPyEmptyString, | |
09f3d4e6 RD |
56 | const wxPoint& pos = wxDefaultPosition, |
57 | const wxSize& size = wxDefaultSize, | |
58 | long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, | |
137b5242 | 59 | const wxString& name = wxPyFrameNameStr); |
9c039d08 | 60 | |
0122b7e3 | 61 | |
7bf85405 RD |
62 | void ActivateNext(); |
63 | void ActivatePrevious(); | |
64 | void ArrangeIcons(); | |
65 | void Cascade(); | |
7bf85405 RD |
66 | wxMDIChildFrame* GetActiveChild(); |
67 | wxMDIClientWindow* GetClientWindow(); | |
68 | wxWindow* GetToolBar(); | |
69 | ||
70 | // TODO: This isn't handled by the standard event-table system... | |
71 | //wxMDIClientWindow* OnCreateClient(); | |
72 | ||
3ca6a5f0 | 73 | |
fb5e0af0 | 74 | #ifdef __WXMSW__ |
3ca6a5f0 BP |
75 | wxMenu* GetWindowMenu(); |
76 | void SetWindowMenu(wxMenu* menu); | |
7bf85405 | 77 | void SetToolBar(wxToolBar* toolbar); |
fb5e0af0 | 78 | #endif |
3261b933 | 79 | void Tile(wxOrientation orient = wxHORIZONTAL); |
7bf85405 RD |
80 | }; |
81 | ||
82 | //--------------------------------------------------------------------------- | |
83 | ||
ab1f7d2a RD |
84 | MustHaveApp(wxMDIChildFrame); |
85 | ||
7bf85405 RD |
86 | class wxMDIChildFrame : public wxFrame { |
87 | public: | |
2b9048c5 RD |
88 | %pythonAppend wxMDIChildFrame "self._setOORInfo(self)" |
89 | %pythonAppend wxMDIChildFrame() "" | |
b39c3fa0 | 90 | %typemap(out) wxMDIChildFrame*; // turn off this typemap |
d14a1e28 | 91 | |
7bf85405 | 92 | wxMDIChildFrame(wxMDIParentFrame* parent, |
d5573410 RD |
93 | const wxWindowID id=-1, |
94 | const wxString& title = wxPyEmptyString, | |
b68dc582 RD |
95 | const wxPoint& pos = wxDefaultPosition, |
96 | const wxSize& size = wxDefaultSize, | |
7bf85405 | 97 | long style = wxDEFAULT_FRAME_STYLE, |
137b5242 | 98 | const wxString& name = wxPyFrameNameStr); |
1b8c7ba6 | 99 | %RenameCtor(PreMDIChildFrame, wxMDIChildFrame()); |
09f3d4e6 | 100 | |
b39c3fa0 RD |
101 | // Turn it back on again |
102 | %typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); } | |
103 | ||
09f3d4e6 | 104 | bool Create(wxMDIParentFrame* parent, |
d5573410 RD |
105 | const wxWindowID id=-1, |
106 | const wxString& title = wxPyEmptyString, | |
09f3d4e6 RD |
107 | const wxPoint& pos = wxDefaultPosition, |
108 | const wxSize& size = wxDefaultSize, | |
109 | long style = wxDEFAULT_FRAME_STYLE, | |
137b5242 | 110 | const wxString& name = wxPyFrameNameStr); |
7bf85405 RD |
111 | |
112 | void Activate(); | |
4e4a4ac8 | 113 | void Maximize(bool maximize=true); |
7bf85405 | 114 | void Restore(); |
fb5e0af0 | 115 | |
7bf85405 RD |
116 | }; |
117 | ||
118 | ||
119 | //--------------------------------------------------------------------------- | |
120 | ||
ab1f7d2a RD |
121 | MustHaveApp(wxMDIClientWindow); |
122 | ||
7bf85405 RD |
123 | class wxMDIClientWindow : public wxWindow { |
124 | public: | |
2b9048c5 RD |
125 | %pythonAppend wxMDIClientWindow "self._setOORInfo(self)" |
126 | %pythonAppend wxMDIClientWindow() "" | |
b39c3fa0 | 127 | %typemap(out) wxMDIClientWindow*; // turn off this typemap |
d14a1e28 | 128 | |
7bf85405 | 129 | wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0); |
1b8c7ba6 | 130 | %RenameCtor(PreMDIClientWindow, wxMDIClientWindow()); |
09f3d4e6 | 131 | |
b39c3fa0 RD |
132 | // Turn it back on again |
133 | %typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); } | |
134 | ||
09f3d4e6 | 135 | bool Create(wxMDIParentFrame* parent, long style = 0); |
7bf85405 RD |
136 | }; |
137 | ||
d14a1e28 | 138 | |
7bf85405 | 139 | //--------------------------------------------------------------------------- |