]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/frames.i
Added missing CreateManifest() to initialisation
[wxWidgets.git] / wxPython / src / frames.i
CommitLineData
9c039d08
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: frames.i
3// Purpose: SWIG definitions of various window classes
4//
5// Author: Robin Dunn
6//
7// Created: 8/27/98
8// RCS-ID: $Id$
9// Copyright: (c) 1998 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13
14%module frames
15
16%{
17#include "helpers.h"
9c039d08 18#include <wx/minifram.h>
b5a5d647 19#include <wx/splash.h>
9c039d08
RD
20%}
21
22//----------------------------------------------------------------------
23
24%include typemaps.i
25%include my_typemaps.i
26
27// Import some definitions of other classes, etc.
28%import _defs.i
29%import misc.i
30%import gdi.i
31%import windows.i
32%import stattool.i
33
b8b8dda7 34%pragma(python) code = "import wx"
9c039d08
RD
35
36//----------------------------------------------------------------------
37
137b5242
RD
38%{
39 // Put some wx default wxChar* values into wxStrings.
40 DECLARE_DEF_STRING(FrameNameStr);
41 DECLARE_DEF_STRING(DialogNameStr);
42 DECLARE_DEF_STRING(StatusLineNameStr);
43 DECLARE_DEF_STRING(ToolBarNameStr);
44%}
45
46//----------------------------------------------------------------------
47
f6bcfd97
BP
48enum {
49 wxFULLSCREEN_NOMENUBAR,
50 wxFULLSCREEN_NOTOOLBAR,
51 wxFULLSCREEN_NOSTATUSBAR,
52 wxFULLSCREEN_NOBORDER,
53 wxFULLSCREEN_NOCAPTION,
ecc08ead
RD
54 wxFULLSCREEN_ALL,
55
56 wxTOPLEVEL_EX_DIALOG,
f6bcfd97
BP
57};
58
59
ecc08ead
RD
60//----------------------------------------------------------------------
61
62
63class wxTopLevelWindow : public wxWindow
64{
65public:
66 // construction
67 wxTopLevelWindow(wxWindow *parent,
68 wxWindowID id,
69 const wxString& title,
70 const wxPoint& pos = wxDefaultPosition,
71 const wxSize& size = wxDefaultSize,
72 long style = wxDEFAULT_FRAME_STYLE,
137b5242 73 const wxString& name = wxPyFrameNameStr);
ecc08ead
RD
74 %name(wxPreTopLevelWindow)wxTopLevelWindow();
75
76 bool Create(wxWindow *parent,
77 wxWindowID id,
78 const wxString& title,
79 const wxPoint& pos = wxDefaultPosition,
80 const wxSize& size = wxDefaultSize,
81 long style = wxDEFAULT_FRAME_STYLE,
137b5242 82 const wxString& name = wxPyFrameNameStr);
ecc08ead 83
0122b7e3 84 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
17c0e08c 85 %pragma(python) addtomethod = "wxPreTopLevelWindow:val._setOORInfo(val)"
ecc08ead
RD
86
87 // maximize = TRUE => maximize, otherwise - restore
88 virtual void Maximize(bool maximize = TRUE);
89
90 // undo Maximize() or Iconize()
91 virtual void Restore();
92
93 // iconize = TRUE => iconize, otherwise - restore
94 virtual void Iconize(bool iconize = TRUE);
95
96 // return TRUE if the frame is maximized
97 virtual bool IsMaximized() const;
98
99 // return TRUE if the frame is iconized
100 virtual bool IsIconized() const;
101
102 // get the frame icon
c5943253 103 wxIcon GetIcon() const;
ecc08ead
RD
104
105 // set the frame icon
106 virtual void SetIcon(const wxIcon& icon);
107
0e9b78ce
RD
108 // set the frame icons
109 virtual void SetIcons(const wxIconBundle& icons );
ecc08ead
RD
110
111 // maximize the window to cover entire screen
112 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
113
114 // return TRUE if the frame is in fullscreen mode
115 virtual bool IsFullScreen() const;
116
117 virtual void SetTitle(const wxString& title);
118 virtual wxString GetTitle() const;
119};
120
121//----------------------------------------------------------------------
122
123
124class wxFrame : public wxTopLevelWindow {
9c039d08
RD
125public:
126 wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
b68dc582
RD
127 const wxPoint& pos = wxDefaultPosition,
128 const wxSize& size = wxDefaultSize,
9c039d08 129 long style = wxDEFAULT_FRAME_STYLE,
137b5242 130 const wxString& name = wxPyFrameNameStr);
09f3d4e6 131 %name(wxPreFrame)wxFrame();
9c039d08 132
09f3d4e6
RD
133 bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
134 const wxPoint& pos = wxDefaultPosition,
135 const wxSize& size = wxDefaultSize,
136 long style = wxDEFAULT_FRAME_STYLE,
137b5242 137 const wxString& name = wxPyFrameNameStr);
9c039d08 138
0122b7e3 139 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
17c0e08c 140 %pragma(python) addtomethod = "wxPreFrame:val._setOORInfo(val)"
0122b7e3 141
ecc08ead
RD
142 wxPoint GetClientAreaOrigin();
143
144 void SetMenuBar(wxMenuBar *menubar);
145 wxMenuBar *GetMenuBar();
146
147
148 // call this to simulate a menu command
149 bool Command(int id);
150
151 // process menu command: returns TRUE if processed
152 bool ProcessCommand(int id);
153
154 // create the main status bar
9c039d08
RD
155 wxStatusBar* CreateStatusBar(int number = 1,
156 long style = wxST_SIZEGRIP,
157 wxWindowID id = -1,
137b5242 158 const wxString& name = wxPyStatusLineNameStr);
ecc08ead
RD
159
160 // get the main status bar
161 wxStatusBar *GetStatusBar();
162
163 // sets the main status bar
164 void SetStatusBar(wxStatusBar *statBar);
165
166 // forward these to status bar
167 virtual void SetStatusText(const wxString &text, int number = 0);
168 virtual void SetStatusWidths(int LCOUNT, int* choices); // uses typemap
169
170
171 // create main toolbar
172 virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
173 wxWindowID id = -1,
137b5242 174 const wxString& name = wxPyToolBarNameStr);
ecc08ead
RD
175
176 // get/set the main toolbar
177 virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
178 virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
179
9c039d08
RD
180};
181
ecc08ead
RD
182//---------------------------------------------------------------------------
183
184class wxDialog : public wxTopLevelWindow {
185public:
186 wxDialog(wxWindow* parent,
187 const wxWindowID id,
188 const wxString& title,
189 const wxPoint& pos = wxDefaultPosition,
190 const wxSize& size = wxDefaultSize,
191 long style = wxDEFAULT_DIALOG_STYLE,
137b5242 192 const wxString& name = wxPyDialogNameStr);
ecc08ead
RD
193 %name(wxPreDialog)wxDialog();
194
195 bool Create(wxWindow* parent,
196 const wxWindowID id,
197 const wxString& title,
198 const wxPoint& pos = wxDefaultPosition,
199 const wxSize& size = wxDefaultSize,
200 long style = wxDEFAULT_DIALOG_STYLE,
137b5242 201 const wxString& name = wxPyDialogNameStr);
ecc08ead 202
0122b7e3 203 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
17c0e08c 204 %pragma(python) addtomethod = "wxPreDialog:val._setOORInfo(val)"
0122b7e3 205
ecc08ead
RD
206 void Centre(int direction = wxBOTH);
207 void EndModal(int retCode);
208 void SetModal(bool flag);
209 bool IsModal();
210 int ShowModal();
211
212 int GetReturnCode();
213 void SetReturnCode(int retCode);
214
215 wxSizer* CreateTextSizer( const wxString &message );
216 wxSizer* CreateButtonSizer( long flags );
217
218};
219
220
9c039d08
RD
221//---------------------------------------------------------------------------
222
9c039d08
RD
223class wxMiniFrame : public wxFrame {
224public:
225 wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
b68dc582
RD
226 const wxPoint& pos = wxDefaultPosition,
227 const wxSize& size = wxDefaultSize,
9c039d08 228 long style = wxDEFAULT_FRAME_STYLE,
137b5242 229 const wxString& name = wxPyFrameNameStr);
09f3d4e6 230 %name(wxPreMiniFrame)wxMiniFrame();
9c039d08 231
09f3d4e6
RD
232 bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
233 const wxPoint& pos = wxDefaultPosition,
234 const wxSize& size = wxDefaultSize,
235 long style = wxDEFAULT_FRAME_STYLE,
137b5242 236 const wxString& name = wxPyFrameNameStr);
0122b7e3
RD
237
238 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
17c0e08c 239 %pragma(python) addtomethod = "wxPreMiniFrame:val._setOORInfo(val)"
9c039d08 240};
b8b8dda7
RD
241
242
243//---------------------------------------------------------------------------
b8b8dda7 244
b5a5d647
RD
245enum {
246 wxSPLASH_CENTRE_ON_PARENT,
247 wxSPLASH_CENTRE_ON_SCREEN,
248 wxSPLASH_NO_CENTRE,
249 wxSPLASH_TIMEOUT,
250 wxSPLASH_NO_TIMEOUT,
251};
252
253
254class wxSplashScreenWindow: public wxWindow
255{
256public:
257 wxSplashScreenWindow(const wxBitmap& bitmap,
258 wxWindow* parent, wxWindowID id,
259 const wxPoint& pos = wxDefaultPosition,
260 const wxSize& size = wxDefaultSize,
261 long style = wxNO_BORDER);
262
aacd7bb6
RD
263 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
264
b5a5d647
RD
265 void SetBitmap(const wxBitmap& bitmap);
266 wxBitmap& GetBitmap();
267};
268
269
270class wxSplashScreen : public wxFrame {
271public:
272 wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds,
273 wxWindow* parent, wxWindowID id,
274 const wxPoint& pos = wxDefaultPosition,
275 const wxSize& size = wxDefaultSize,
276 long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxFRAME_FLOAT_ON_PARENT);
277
aacd7bb6
RD
278 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
279
b5a5d647
RD
280 long GetSplashStyle() const;
281 wxSplashScreenWindow* GetSplashWindow() const;
282 int GetTimeout() const;
283};
284
285
286//---------------------------------------------------------------------------
287
4f3449b4 288
b8b8dda7
RD
289
290
291
9c039d08 292