]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/mdi.i
In GetPath(), don't append separator if there's already one at the end
[wxWidgets.git] / wxPython / src / mdi.i
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
14 %module mdi
15
16 %{
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
29 %import frames.i
30
31 %pragma(python) code = "import wx"
32
33 //----------------------------------------------------------------------
34
35 %{
36 // Put some wx default wxChar* values into wxStrings.
37 DECLARE_DEF_STRING(FrameNameStr);
38 %}
39
40 //----------------------------------------------------------------------
41
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;
50
51
52
53 class wxMDIParentFrame : public wxFrame {
54 public:
55 wxMDIParentFrame(wxWindow *parent,
56 const wxWindowID id,
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();
63
64 bool Create(wxWindow *parent,
65 const wxWindowID id,
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);
71
72 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
73 %pragma(python) addtomethod = "wxPreMDIParentFrame:val._setOORInfo(val)"
74
75 void ActivateNext();
76 void ActivatePrevious();
77 void ArrangeIcons();
78 void Cascade();
79 wxMDIChildFrame* GetActiveChild();
80 wxMDIClientWindow* GetClientWindow();
81 wxWindow* GetToolBar();
82
83 // TODO: This isn't handled by the standard event-table system...
84 //wxMDIClientWindow* OnCreateClient();
85
86
87 #ifdef __WXMSW__
88 wxMenu* GetWindowMenu();
89 void SetWindowMenu(wxMenu* menu);
90 void SetToolBar(wxToolBar* toolbar);
91 #endif
92 void Tile();
93 };
94
95 //---------------------------------------------------------------------------
96
97 class wxMDIChildFrame : public wxFrame {
98 public:
99 wxMDIChildFrame(wxMDIParentFrame* parent,
100 const wxWindowID id,
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();
107
108 bool Create(wxMDIParentFrame* parent,
109 const wxWindowID id,
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);
115
116 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
117 %pragma(python) addtomethod = "wxPreMDIChildFrame:val._setOORInfo(val)"
118
119 void Activate();
120 void Maximize(bool maximize);
121 void Restore();
122
123 };
124
125
126 //---------------------------------------------------------------------------
127
128 class wxMDIClientWindow : public wxWindow {
129 public:
130 wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
131 %name(wxPreMDIClientWindow)wxMDIClientWindow();
132
133 bool Create(wxMDIParentFrame* parent, long style = 0);
134
135 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
136 %pragma(python) addtomethod = "wxPreMDIClientWindow:val._setOORInfo(val)"
137 };
138
139 //---------------------------------------------------------------------------