]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/src/frames.i
Emptied patch.rsp
[wxWidgets.git] / wxPython / src / frames.i
... / ...
CommitLineData
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"
18#include <wx/minifram.h>
19%}
20
21//----------------------------------------------------------------------
22
23%include typemaps.i
24%include my_typemaps.i
25
26// Import some definitions of other classes, etc.
27%import _defs.i
28%import misc.i
29%import gdi.i
30%import windows.i
31%import stattool.i
32
33%pragma(python) code = "import wx"
34
35//----------------------------------------------------------------------
36
37enum {
38 wxFULLSCREEN_NOMENUBAR,
39 wxFULLSCREEN_NOTOOLBAR,
40 wxFULLSCREEN_NOSTATUSBAR,
41 wxFULLSCREEN_NOBORDER,
42 wxFULLSCREEN_NOCAPTION,
43 wxFULLSCREEN_ALL,
44
45 wxTOPLEVEL_EX_DIALOG,
46};
47
48
49//----------------------------------------------------------------------
50
51
52class wxTopLevelWindow : public wxWindow
53{
54public:
55 // construction
56 wxTopLevelWindow(wxWindow *parent,
57 wxWindowID id,
58 const wxString& title,
59 const wxPoint& pos = wxDefaultPosition,
60 const wxSize& size = wxDefaultSize,
61 long style = wxDEFAULT_FRAME_STYLE,
62 const char* name = "frame");
63 %name(wxPreTopLevelWindow)wxTopLevelWindow();
64
65 bool Create(wxWindow *parent,
66 wxWindowID id,
67 const wxString& title,
68 const wxPoint& pos = wxDefaultPosition,
69 const wxSize& size = wxDefaultSize,
70 long style = wxDEFAULT_FRAME_STYLE,
71 const char* name = "frame");
72
73 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
74 %pragma(python) addtomethod = "wxPreTopLevelWindow:val._setOORInfo(val)"
75
76 // maximize = TRUE => maximize, otherwise - restore
77 virtual void Maximize(bool maximize = TRUE);
78
79 // undo Maximize() or Iconize()
80 virtual void Restore();
81
82 // iconize = TRUE => iconize, otherwise - restore
83 virtual void Iconize(bool iconize = TRUE);
84
85 // return TRUE if the frame is maximized
86 virtual bool IsMaximized() const;
87
88 // return TRUE if the frame is iconized
89 virtual bool IsIconized() const;
90
91 // get the frame icon
92 wxIcon GetIcon() const;
93
94 // set the frame icon
95 virtual void SetIcon(const wxIcon& icon);
96
97
98 // maximize the window to cover entire screen
99 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
100
101 // return TRUE if the frame is in fullscreen mode
102 virtual bool IsFullScreen() const;
103
104 virtual void SetTitle(const wxString& title);
105 virtual wxString GetTitle() const;
106};
107
108//----------------------------------------------------------------------
109
110
111class wxFrame : public wxTopLevelWindow {
112public:
113 wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
114 const wxPoint& pos = wxDefaultPosition,
115 const wxSize& size = wxDefaultSize,
116 long style = wxDEFAULT_FRAME_STYLE,
117 char* name = "frame");
118 %name(wxPreFrame)wxFrame();
119
120 bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
121 const wxPoint& pos = wxDefaultPosition,
122 const wxSize& size = wxDefaultSize,
123 long style = wxDEFAULT_FRAME_STYLE,
124 char* name = "frame");
125
126 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
127 %pragma(python) addtomethod = "wxPreFrame:val._setOORInfo(val)"
128
129 wxPoint GetClientAreaOrigin();
130
131 void SetMenuBar(wxMenuBar *menubar);
132 wxMenuBar *GetMenuBar();
133
134
135 // call this to simulate a menu command
136 bool Command(int id);
137
138 // process menu command: returns TRUE if processed
139 bool ProcessCommand(int id);
140
141 // create the main status bar
142 wxStatusBar* CreateStatusBar(int number = 1,
143 long style = wxST_SIZEGRIP,
144 wxWindowID id = -1,
145 char* name = "statusBar");
146
147 // get the main status bar
148 wxStatusBar *GetStatusBar();
149
150 // sets the main status bar
151 void SetStatusBar(wxStatusBar *statBar);
152
153 // forward these to status bar
154 virtual void SetStatusText(const wxString &text, int number = 0);
155 virtual void SetStatusWidths(int LCOUNT, int* choices); // uses typemap
156
157
158 // create main toolbar
159 virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
160 wxWindowID id = -1,
161 const char* name = "toolBar");
162
163 // get/set the main toolbar
164 virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
165 virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
166
167};
168
169//---------------------------------------------------------------------------
170
171class wxDialog : public wxTopLevelWindow {
172public:
173 wxDialog(wxWindow* parent,
174 const wxWindowID id,
175 const wxString& title,
176 const wxPoint& pos = wxDefaultPosition,
177 const wxSize& size = wxDefaultSize,
178 long style = wxDEFAULT_DIALOG_STYLE,
179 const char* name = "dialogBox");
180 %name(wxPreDialog)wxDialog();
181
182 bool Create(wxWindow* parent,
183 const wxWindowID id,
184 const wxString& title,
185 const wxPoint& pos = wxDefaultPosition,
186 const wxSize& size = wxDefaultSize,
187 long style = wxDEFAULT_DIALOG_STYLE,
188 const char* name = "dialogBox");
189
190 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
191 %pragma(python) addtomethod = "wxPreDialog:val._setOORInfo(val)"
192
193 void Centre(int direction = wxBOTH);
194 void EndModal(int retCode);
195 void SetModal(bool flag);
196 bool IsModal();
197 int ShowModal();
198
199 int GetReturnCode();
200 void SetReturnCode(int retCode);
201
202 wxSizer* CreateTextSizer( const wxString &message );
203 wxSizer* CreateButtonSizer( long flags );
204
205};
206
207
208//---------------------------------------------------------------------------
209
210class wxMiniFrame : public wxFrame {
211public:
212 wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
213 const wxPoint& pos = wxDefaultPosition,
214 const wxSize& size = wxDefaultSize,
215 long style = wxDEFAULT_FRAME_STYLE,
216 char* name = "frame");
217 %name(wxPreMiniFrame)wxMiniFrame();
218
219 bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
220 const wxPoint& pos = wxDefaultPosition,
221 const wxSize& size = wxDefaultSize,
222 long style = wxDEFAULT_FRAME_STYLE,
223 char* name = "frame");
224
225 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
226 %pragma(python) addtomethod = "wxPreMiniFrame:val._setOORInfo(val)"
227};
228
229
230//---------------------------------------------------------------------------
231
232
233
234
235
236