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/tipwin.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");
75 // maximize = TRUE => maximize, otherwise - restore
76 virtual void Maximize(bool maximize = TRUE);
78 // undo Maximize() or Iconize()
79 virtual void Restore();
81 // iconize = TRUE => iconize, otherwise - restore
82 virtual void Iconize(bool iconize = TRUE);
84 // return TRUE if the frame is maximized
85 virtual bool IsMaximized() const;
87 // return TRUE if the frame is iconized
88 virtual bool IsIconized() const;
91 const wxIcon& GetIcon() const;
94 virtual void SetIcon(const wxIcon& icon);
97 // maximize the window to cover entire screen
98 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
100 // return TRUE if the frame is in fullscreen mode
101 virtual bool IsFullScreen() const;
103 virtual void SetTitle(const wxString& title);
104 virtual wxString GetTitle() const;
107 //----------------------------------------------------------------------
110 class wxFrame : public wxTopLevelWindow {
112 wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
113 const wxPoint& pos = wxDefaultPosition,
114 const wxSize& size = wxDefaultSize,
115 long style = wxDEFAULT_FRAME_STYLE,
116 char* name = "frame");
117 %name(wxPreFrame)wxFrame();
119 bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
120 const wxPoint& pos = wxDefaultPosition,
121 const wxSize& size = wxDefaultSize,
122 long style = wxDEFAULT_FRAME_STYLE,
123 char* name = "frame");
125 wxPoint GetClientAreaOrigin();
127 void SetMenuBar(wxMenuBar *menubar);
128 wxMenuBar *GetMenuBar();
131 // call this to simulate a menu command
132 bool Command(int id);
134 // process menu command: returns TRUE if processed
135 bool ProcessCommand(int id);
137 // create the main status bar
138 wxStatusBar* CreateStatusBar(int number = 1,
139 long style = wxST_SIZEGRIP,
141 char* name = "statusBar");
143 // get the main status bar
144 wxStatusBar *GetStatusBar();
146 // sets the main status bar
147 void SetStatusBar(wxStatusBar *statBar);
149 // forward these to status bar
150 virtual void SetStatusText(const wxString &text, int number = 0);
151 virtual void SetStatusWidths(int LCOUNT, int* choices); // uses typemap
154 // create main toolbar
155 virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
157 const char* name = "toolBar");
159 // get/set the main toolbar
160 virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
161 virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
165 //---------------------------------------------------------------------------
167 class wxDialog : public wxTopLevelWindow {
169 wxDialog(wxWindow* parent,
171 const wxString& title,
172 const wxPoint& pos = wxDefaultPosition,
173 const wxSize& size = wxDefaultSize,
174 long style = wxDEFAULT_DIALOG_STYLE,
175 const char* name = "dialogBox");
176 %name(wxPreDialog)wxDialog();
178 bool Create(wxWindow* parent,
180 const wxString& title,
181 const wxPoint& pos = wxDefaultPosition,
182 const wxSize& size = wxDefaultSize,
183 long style = wxDEFAULT_DIALOG_STYLE,
184 const char* name = "dialogBox");
186 void Centre(int direction = wxBOTH);
187 void EndModal(int retCode);
188 void SetModal(bool flag);
193 void SetReturnCode(int retCode);
195 wxSizer* CreateTextSizer( const wxString &message );
196 wxSizer* CreateButtonSizer( long flags );
201 //---------------------------------------------------------------------------
203 class wxMiniFrame : public wxFrame {
205 wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
206 const wxPoint& pos = wxDefaultPosition,
207 const wxSize& size = wxDefaultSize,
208 long style = wxDEFAULT_FRAME_STYLE,
209 char* name = "frame");
210 %name(wxPreMiniFrame)wxMiniFrame();
212 bool Create(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");
220 //---------------------------------------------------------------------------
222 class wxTipWindow : public wxFrame
225 wxTipWindow(wxWindow *parent,
226 const wxString& text,
227 wxCoord maxLength = 100);
231 //---------------------------------------------------------------------------