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>
21 //----------------------------------------------------------------------
24 %include my_typemaps.i
26 // Import some definitions of other classes, etc.
33 %pragma(python) code = "import wx"
35 //----------------------------------------------------------------------
38 wxFULLSCREEN_NOMENUBAR,
39 wxFULLSCREEN_NOTOOLBAR,
40 wxFULLSCREEN_NOSTATUSBAR,
41 wxFULLSCREEN_NOBORDER,
42 wxFULLSCREEN_NOCAPTION,
49 //----------------------------------------------------------------------
52 class wxTopLevelWindow : public wxWindow
56 wxTopLevelWindow(wxWindow *parent,
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();
65 bool Create(wxWindow *parent,
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");
73 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
74 %pragma(python) addtomethod = "wxPreTopLevelWindow:val._setOORInfo(val)"
76 // maximize = TRUE => maximize, otherwise - restore
77 virtual void Maximize(bool maximize = TRUE);
79 // undo Maximize() or Iconize()
80 virtual void Restore();
82 // iconize = TRUE => iconize, otherwise - restore
83 virtual void Iconize(bool iconize = TRUE);
85 // return TRUE if the frame is maximized
86 virtual bool IsMaximized() const;
88 // return TRUE if the frame is iconized
89 virtual bool IsIconized() const;
92 wxIcon GetIcon() const;
95 virtual void SetIcon(const wxIcon& icon);
98 // maximize the window to cover entire screen
99 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
101 // return TRUE if the frame is in fullscreen mode
102 virtual bool IsFullScreen() const;
104 virtual void SetTitle(const wxString& title);
105 virtual wxString GetTitle() const;
108 //----------------------------------------------------------------------
111 class wxFrame : public wxTopLevelWindow {
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();
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");
126 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
127 %pragma(python) addtomethod = "wxPreFrame:val._setOORInfo(val)"
129 wxPoint GetClientAreaOrigin();
131 void SetMenuBar(wxMenuBar *menubar);
132 wxMenuBar *GetMenuBar();
135 // call this to simulate a menu command
136 bool Command(int id);
138 // process menu command: returns TRUE if processed
139 bool ProcessCommand(int id);
141 // create the main status bar
142 wxStatusBar* CreateStatusBar(int number = 1,
143 long style = wxST_SIZEGRIP,
145 char* name = "statusBar");
147 // get the main status bar
148 wxStatusBar *GetStatusBar();
150 // sets the main status bar
151 void SetStatusBar(wxStatusBar *statBar);
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
158 // create main toolbar
159 virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
161 const char* name = "toolBar");
163 // get/set the main toolbar
164 virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
165 virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
169 //---------------------------------------------------------------------------
171 class wxDialog : public wxTopLevelWindow {
173 wxDialog(wxWindow* parent,
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();
182 bool Create(wxWindow* parent,
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");
190 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
191 %pragma(python) addtomethod = "wxPreDialog:val._setOORInfo(val)"
193 void Centre(int direction = wxBOTH);
194 void EndModal(int retCode);
195 void SetModal(bool flag);
200 void SetReturnCode(int retCode);
202 wxSizer* CreateTextSizer( const wxString &message );
203 wxSizer* CreateButtonSizer( long flags );
208 //---------------------------------------------------------------------------
210 class wxMiniFrame : public wxFrame {
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();
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");
225 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
226 %pragma(python) addtomethod = "wxPreMiniFrame:val._setOORInfo(val)"
230 //---------------------------------------------------------------------------