1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions of various window classes
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include <wx/minifram.h>
19 #include <wx/splash.h>
22 //----------------------------------------------------------------------
25 %include my_typemaps.i
27 // Import some definitions of other classes, etc.
34 %pragma(python) code = "import wx"
36 //----------------------------------------------------------------------
39 wxFULLSCREEN_NOMENUBAR,
40 wxFULLSCREEN_NOTOOLBAR,
41 wxFULLSCREEN_NOSTATUSBAR,
42 wxFULLSCREEN_NOBORDER,
43 wxFULLSCREEN_NOCAPTION,
50 //----------------------------------------------------------------------
53 class wxTopLevelWindow : public wxWindow
57 wxTopLevelWindow(wxWindow *parent,
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();
66 bool Create(wxWindow *parent,
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");
74 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
75 %pragma(python) addtomethod = "wxPreTopLevelWindow:val._setOORInfo(val)"
77 // maximize = TRUE => maximize, otherwise - restore
78 virtual void Maximize(bool maximize = TRUE);
80 // undo Maximize() or Iconize()
81 virtual void Restore();
83 // iconize = TRUE => iconize, otherwise - restore
84 virtual void Iconize(bool iconize = TRUE);
86 // return TRUE if the frame is maximized
87 virtual bool IsMaximized() const;
89 // return TRUE if the frame is iconized
90 virtual bool IsIconized() const;
93 wxIcon GetIcon() const;
96 virtual void SetIcon(const wxIcon& icon);
99 // maximize the window to cover entire screen
100 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
102 // return TRUE if the frame is in fullscreen mode
103 virtual bool IsFullScreen() const;
105 virtual void SetTitle(const wxString& title);
106 virtual wxString GetTitle() const;
109 //----------------------------------------------------------------------
112 class wxFrame : public wxTopLevelWindow {
114 wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
115 const wxPoint& pos = wxDefaultPosition,
116 const wxSize& size = wxDefaultSize,
117 long style = wxDEFAULT_FRAME_STYLE,
118 char* name = "frame");
119 %name(wxPreFrame)wxFrame();
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");
127 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
128 %pragma(python) addtomethod = "wxPreFrame:val._setOORInfo(val)"
130 wxPoint GetClientAreaOrigin();
132 void SetMenuBar(wxMenuBar *menubar);
133 wxMenuBar *GetMenuBar();
136 // call this to simulate a menu command
137 bool Command(int id);
139 // process menu command: returns TRUE if processed
140 bool ProcessCommand(int id);
142 // create the main status bar
143 wxStatusBar* CreateStatusBar(int number = 1,
144 long style = wxST_SIZEGRIP,
146 char* name = "statusBar");
148 // get the main status bar
149 wxStatusBar *GetStatusBar();
151 // sets the main status bar
152 void SetStatusBar(wxStatusBar *statBar);
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
159 // create main toolbar
160 virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
162 const char* name = "toolBar");
164 // get/set the main toolbar
165 virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
166 virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
170 //---------------------------------------------------------------------------
172 class wxDialog : public wxTopLevelWindow {
174 wxDialog(wxWindow* parent,
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();
183 bool Create(wxWindow* parent,
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");
191 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
192 %pragma(python) addtomethod = "wxPreDialog:val._setOORInfo(val)"
194 void Centre(int direction = wxBOTH);
195 void EndModal(int retCode);
196 void SetModal(bool flag);
201 void SetReturnCode(int retCode);
203 wxSizer* CreateTextSizer( const wxString &message );
204 wxSizer* CreateButtonSizer( long flags );
209 //---------------------------------------------------------------------------
211 class wxMiniFrame : public wxFrame {
213 wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
214 const wxPoint& pos = wxDefaultPosition,
215 const wxSize& size = wxDefaultSize,
216 long style = wxDEFAULT_FRAME_STYLE,
217 char* name = "frame");
218 %name(wxPreMiniFrame)wxMiniFrame();
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");
226 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
227 %pragma(python) addtomethod = "wxPreMiniFrame:val._setOORInfo(val)"
231 //---------------------------------------------------------------------------
234 wxSPLASH_CENTRE_ON_PARENT,
235 wxSPLASH_CENTRE_ON_SCREEN,
242 class wxSplashScreenWindow: public wxWindow
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);
251 void SetBitmap(const wxBitmap& bitmap);
252 wxBitmap& GetBitmap();
256 class wxSplashScreen : public wxFrame {
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);
264 long GetSplashStyle() const;
265 wxSplashScreenWindow* GetSplashWindow() const;
266 int GetTimeout() const;
270 //---------------------------------------------------------------------------