]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/frames.i
Demo cleanup
[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>
4f3449b4 19#include <wx/tipwin.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
93 const wxIcon& GetIcon() const;
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
4f3449b4
RD
233class wxTipWindow : public wxFrame
234{
235public:
236 wxTipWindow(wxWindow *parent,
237 const wxString& text,
238 wxCoord maxLength = 100);
0122b7e3
RD
239
240 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
4f3449b4
RD
241};
242
243
244//---------------------------------------------------------------------------
245
b8b8dda7
RD
246
247
248
9c039d08 249