]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/frames.i
reverted my locale change
[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
f6bcfd97
BP
38enum {
39 wxFULLSCREEN_NOMENUBAR,
40 wxFULLSCREEN_NOTOOLBAR,
41 wxFULLSCREEN_NOSTATUSBAR,
42 wxFULLSCREEN_NOBORDER,
43 wxFULLSCREEN_NOCAPTION,
ecc08ead
RD
44 wxFULLSCREEN_ALL,
45
46 wxTOPLEVEL_EX_DIALOG,
f6bcfd97
BP
47};
48
49
ecc08ead
RD
50//----------------------------------------------------------------------
51
52
53class wxTopLevelWindow : public wxWindow
54{
55public:
56 // construction
57 wxTopLevelWindow(wxWindow *parent,
58 wxWindowID id,
59 const wxString& title,
60 const wxPoint& pos = wxDefaultPosition,
61 const wxSize& size = wxDefaultSize,
62 long style = wxDEFAULT_FRAME_STYLE,
63 const char* name = "frame");
64 %name(wxPreTopLevelWindow)wxTopLevelWindow();
65
66 bool Create(wxWindow *parent,
67 wxWindowID id,
68 const wxString& title,
69 const wxPoint& pos = wxDefaultPosition,
70 const wxSize& size = wxDefaultSize,
71 long style = wxDEFAULT_FRAME_STYLE,
72 const char* name = "frame");
73
0122b7e3 74 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
17c0e08c 75 %pragma(python) addtomethod = "wxPreTopLevelWindow:val._setOORInfo(val)"
ecc08ead
RD
76
77 // maximize = TRUE => maximize, otherwise - restore
78 virtual void Maximize(bool maximize = TRUE);
79
80 // undo Maximize() or Iconize()
81 virtual void Restore();
82
83 // iconize = TRUE => iconize, otherwise - restore
84 virtual void Iconize(bool iconize = TRUE);
85
86 // return TRUE if the frame is maximized
87 virtual bool IsMaximized() const;
88
89 // return TRUE if the frame is iconized
90 virtual bool IsIconized() const;
91
92 // get the frame icon
c5943253 93 wxIcon GetIcon() const;
ecc08ead
RD
94
95 // set the frame icon
96 virtual void SetIcon(const wxIcon& icon);
97
98
99 // maximize the window to cover entire screen
100 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
101
102 // return TRUE if the frame is in fullscreen mode
103 virtual bool IsFullScreen() const;
104
105 virtual void SetTitle(const wxString& title);
106 virtual wxString GetTitle() const;
107};
108
109//----------------------------------------------------------------------
110
111
112class wxFrame : public wxTopLevelWindow {
9c039d08
RD
113public:
114 wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
b68dc582
RD
115 const wxPoint& pos = wxDefaultPosition,
116 const wxSize& size = wxDefaultSize,
9c039d08
RD
117 long style = wxDEFAULT_FRAME_STYLE,
118 char* name = "frame");
09f3d4e6 119 %name(wxPreFrame)wxFrame();
9c039d08 120
09f3d4e6
RD
121 bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
122 const wxPoint& pos = wxDefaultPosition,
123 const wxSize& size = wxDefaultSize,
124 long style = wxDEFAULT_FRAME_STYLE,
125 char* name = "frame");
9c039d08 126
0122b7e3 127 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
17c0e08c 128 %pragma(python) addtomethod = "wxPreFrame:val._setOORInfo(val)"
0122b7e3 129
ecc08ead
RD
130 wxPoint GetClientAreaOrigin();
131
132 void SetMenuBar(wxMenuBar *menubar);
133 wxMenuBar *GetMenuBar();
134
135
136 // call this to simulate a menu command
137 bool Command(int id);
138
139 // process menu command: returns TRUE if processed
140 bool ProcessCommand(int id);
141
142 // create the main status bar
9c039d08
RD
143 wxStatusBar* CreateStatusBar(int number = 1,
144 long style = wxST_SIZEGRIP,
145 wxWindowID id = -1,
146 char* name = "statusBar");
ecc08ead
RD
147
148 // get the main status bar
149 wxStatusBar *GetStatusBar();
150
151 // sets the main status bar
152 void SetStatusBar(wxStatusBar *statBar);
153
154 // forward these to status bar
155 virtual void SetStatusText(const wxString &text, int number = 0);
156 virtual void SetStatusWidths(int LCOUNT, int* choices); // uses typemap
157
158
159 // create main toolbar
160 virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
161 wxWindowID id = -1,
162 const char* name = "toolBar");
163
164 // get/set the main toolbar
165 virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
166 virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
167
9c039d08
RD
168};
169
ecc08ead
RD
170//---------------------------------------------------------------------------
171
172class wxDialog : public wxTopLevelWindow {
173public:
174 wxDialog(wxWindow* parent,
175 const wxWindowID id,
176 const wxString& title,
177 const wxPoint& pos = wxDefaultPosition,
178 const wxSize& size = wxDefaultSize,
179 long style = wxDEFAULT_DIALOG_STYLE,
180 const char* name = "dialogBox");
181 %name(wxPreDialog)wxDialog();
182
183 bool Create(wxWindow* parent,
184 const wxWindowID id,
185 const wxString& title,
186 const wxPoint& pos = wxDefaultPosition,
187 const wxSize& size = wxDefaultSize,
188 long style = wxDEFAULT_DIALOG_STYLE,
189 const char* name = "dialogBox");
190
0122b7e3 191 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
17c0e08c 192 %pragma(python) addtomethod = "wxPreDialog:val._setOORInfo(val)"
0122b7e3 193
ecc08ead
RD
194 void Centre(int direction = wxBOTH);
195 void EndModal(int retCode);
196 void SetModal(bool flag);
197 bool IsModal();
198 int ShowModal();
199
200 int GetReturnCode();
201 void SetReturnCode(int retCode);
202
203 wxSizer* CreateTextSizer( const wxString &message );
204 wxSizer* CreateButtonSizer( long flags );
205
206};
207
208
9c039d08
RD
209//---------------------------------------------------------------------------
210
9c039d08
RD
211class wxMiniFrame : public wxFrame {
212public:
213 wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
b68dc582
RD
214 const wxPoint& pos = wxDefaultPosition,
215 const wxSize& size = wxDefaultSize,
9c039d08
RD
216 long style = wxDEFAULT_FRAME_STYLE,
217 char* name = "frame");
09f3d4e6 218 %name(wxPreMiniFrame)wxMiniFrame();
9c039d08 219
09f3d4e6
RD
220 bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
221 const wxPoint& pos = wxDefaultPosition,
222 const wxSize& size = wxDefaultSize,
223 long style = wxDEFAULT_FRAME_STYLE,
224 char* name = "frame");
0122b7e3
RD
225
226 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
17c0e08c 227 %pragma(python) addtomethod = "wxPreMiniFrame:val._setOORInfo(val)"
9c039d08 228};
b8b8dda7
RD
229
230
231//---------------------------------------------------------------------------
b8b8dda7 232
b5a5d647
RD
233enum {
234 wxSPLASH_CENTRE_ON_PARENT,
235 wxSPLASH_CENTRE_ON_SCREEN,
236 wxSPLASH_NO_CENTRE,
237 wxSPLASH_TIMEOUT,
238 wxSPLASH_NO_TIMEOUT,
239};
240
241
242class wxSplashScreenWindow: public wxWindow
243{
244public:
245 wxSplashScreenWindow(const wxBitmap& bitmap,
246 wxWindow* parent, wxWindowID id,
247 const wxPoint& pos = wxDefaultPosition,
248 const wxSize& size = wxDefaultSize,
249 long style = wxNO_BORDER);
250
251 void SetBitmap(const wxBitmap& bitmap);
252 wxBitmap& GetBitmap();
253};
254
255
256class wxSplashScreen : public wxFrame {
257public:
258 wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds,
259 wxWindow* parent, wxWindowID id,
260 const wxPoint& pos = wxDefaultPosition,
261 const wxSize& size = wxDefaultSize,
262 long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxFRAME_FLOAT_ON_PARENT);
263
264 long GetSplashStyle() const;
265 wxSplashScreenWindow* GetSplashWindow() const;
266 int GetTimeout() const;
267};
268
269
270//---------------------------------------------------------------------------
271
4f3449b4 272
b8b8dda7
RD
273
274
275
9c039d08 276