]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: data.cpp | |
3 | // Purpose: Various data | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart and Markus Holzem | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifdef __GNUG__ | |
13 | #pragma implementation | |
14 | #endif | |
15 | ||
16 | // For compilers that support precompilation, includes "wx.h". | |
17 | #include "wx/wxprec.h" | |
18 | ||
19 | #ifdef __BORLANDC__ | |
20 | #pragma hdrstop | |
21 | #endif | |
22 | ||
23 | #ifndef WX_PRECOMP | |
24 | #include "wx/wx.h" | |
25 | #endif | |
26 | ||
27 | #define _MAXPATHLEN 500 | |
28 | ||
29 | // Useful buffer, initialized in wxCommonInit | |
30 | char *wxBuffer = NULL; | |
31 | ||
32 | // Windows List | |
33 | wxList wxTopLevelWindows; | |
34 | ||
35 | // List of windows pending deletion | |
36 | wxList wxPendingDelete; | |
37 | ||
38 | // Current cursor, in order to hang on to | |
39 | // cursor handle when setting the cursor globally | |
40 | wxCursor *g_globalCursor = NULL; | |
41 | ||
42 | // Message Strings for Internationalization | |
43 | char **wx_msg_str = (char**)NULL; | |
44 | ||
45 | // Custom OS version, as optionally placed in wx.ini/.wxrc | |
46 | // Currently this can be Win95, Windows, Win32s, WinNT. | |
47 | // For some systems, you can't tell until run-time what services you | |
48 | // have. See wxGetOsVersion, which uses this string if present. | |
49 | char *wxOsVersion = NULL; | |
50 | ||
51 | int wxPageNumber; | |
52 | ||
53 | // GDI Object Lists | |
54 | wxBrushList *wxTheBrushList = NULL; | |
55 | wxPenList *wxThePenList = NULL; | |
56 | wxFontList *wxTheFontList = NULL; | |
57 | wxBitmapList *wxTheBitmapList = NULL; | |
58 | ||
59 | wxColourDatabase *wxTheColourDatabase = NULL; | |
60 | ||
61 | // Stock objects | |
62 | wxFont *wxNORMAL_FONT; | |
63 | wxFont *wxSMALL_FONT; | |
64 | wxFont *wxITALIC_FONT; | |
65 | wxFont *wxSWISS_FONT; | |
66 | wxPen *wxRED_PEN; | |
67 | ||
68 | wxPen *wxCYAN_PEN; | |
69 | wxPen *wxGREEN_PEN; | |
70 | wxPen *wxBLACK_PEN; | |
71 | wxPen *wxWHITE_PEN; | |
72 | wxPen *wxTRANSPARENT_PEN; | |
73 | wxPen *wxBLACK_DASHED_PEN; | |
74 | wxPen *wxGREY_PEN; | |
75 | wxPen *wxMEDIUM_GREY_PEN; | |
76 | wxPen *wxLIGHT_GREY_PEN; | |
77 | ||
78 | wxBrush *wxBLUE_BRUSH; | |
79 | wxBrush *wxGREEN_BRUSH; | |
80 | wxBrush *wxWHITE_BRUSH; | |
81 | wxBrush *wxBLACK_BRUSH; | |
82 | wxBrush *wxTRANSPARENT_BRUSH; | |
83 | wxBrush *wxCYAN_BRUSH; | |
84 | wxBrush *wxRED_BRUSH; | |
85 | wxBrush *wxGREY_BRUSH; | |
86 | wxBrush *wxMEDIUM_GREY_BRUSH; | |
87 | wxBrush *wxLIGHT_GREY_BRUSH; | |
88 | ||
89 | wxColour *wxBLACK; | |
90 | wxColour *wxWHITE; | |
91 | wxColour *wxRED; | |
92 | wxColour *wxBLUE; | |
93 | wxColour *wxGREEN; | |
94 | wxColour *wxCYAN; | |
95 | wxColour *wxLIGHT_GREY; | |
96 | ||
97 | wxCursor *wxSTANDARD_CURSOR = NULL; | |
98 | wxCursor *wxHOURGLASS_CURSOR = NULL; | |
99 | wxCursor *wxCROSS_CURSOR = NULL; | |
100 | ||
101 | // 'Null' objects | |
57a7b7c1 | 102 | wxAcceleratorTable wxNullAcceleratorTable; |
2bda0e17 KB |
103 | wxBitmap wxNullBitmap; |
104 | wxIcon wxNullIcon; | |
105 | wxCursor wxNullCursor; | |
106 | wxPen wxNullPen; | |
107 | wxBrush wxNullBrush; | |
108 | wxPalette wxNullPalette; | |
109 | wxFont wxNullFont; | |
110 | wxColour wxNullColour; | |
111 | ||
112 | // Default window names | |
113 | const char *wxButtonNameStr = "button"; | |
114 | const char *wxCanvasNameStr = "canvas"; | |
115 | const char *wxCheckBoxNameStr = "check"; | |
116 | const char *wxChoiceNameStr = "choice"; | |
117 | const char *wxComboBoxNameStr = "comboBox"; | |
118 | const char *wxDialogNameStr = "dialog"; | |
119 | const char *wxFrameNameStr = "frame"; | |
120 | const char *wxGaugeNameStr = "gauge"; | |
121 | const char *wxStaticBoxNameStr = "groupBox"; | |
122 | const char *wxListBoxNameStr = "listBox"; | |
123 | const char *wxStaticTextNameStr = "message"; | |
124 | const char *wxStaticBitmapNameStr = "message"; | |
125 | const char *wxMultiTextNameStr = "multitext"; | |
126 | const char *wxPanelNameStr = "panel"; | |
127 | const char *wxRadioBoxNameStr = "radioBox"; | |
128 | const char *wxRadioButtonNameStr = "radioButton"; | |
129 | const char *wxBitmapRadioButtonNameStr = "radioButton"; | |
130 | const char *wxScrollBarNameStr = "scrollBar"; | |
131 | const char *wxSliderNameStr = "slider"; | |
132 | const char *wxStaticNameStr = "static"; | |
133 | const char *wxTextCtrlWindowNameStr = "textWindow"; | |
134 | const char *wxTextCtrlNameStr = "text"; | |
135 | const char *wxVirtListBoxNameStr = "virtListBox"; | |
136 | const char *wxButtonBarNameStr = "buttonbar"; | |
137 | const char *wxEnhDialogNameStr = "Shell"; | |
138 | const char *wxToolBarNameStr = "toolbar"; | |
139 | const char *wxStatusLineNameStr = "status_line"; | |
140 | const char *wxEmptyString = ""; | |
141 | const char *wxGetTextFromUserPromptStr = "Input Text"; | |
142 | const char *wxMessageBoxCaptionStr = "Message"; | |
143 | const char *wxFileSelectorPromptStr = "Select a file"; | |
144 | const char *wxFileSelectorDefaultWildcardStr = "*.*"; | |
145 | const char *wxInternalErrorStr = "wxWindows Internal Error"; | |
146 | const char *wxFatalErrorStr = "wxWindows Fatal Error"; | |
147 | ||
148 | // See wx/utils.h | |
149 | const char *wxFloatToStringStr = "%.2f"; | |
150 | const char *wxDoubleToStringStr = "%.2f"; | |
151 | ||
2049ba38 | 152 | #ifdef __WXMSW__ |
2bda0e17 KB |
153 | const char *wxUserResourceStr = "TEXT"; |
154 | #endif | |
155 | ||
26a87b69 JS |
156 | #if USE_POSTSCRIPT |
157 | wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; | |
158 | #endif | |
2bda0e17 KB |
159 | |
160 | #if USE_SHARED_LIBRARY | |
161 | /* | |
162 | * For wxWindows to be made into a dynamic library (e.g. Sun), | |
163 | * all IMPLEMENT_... macros must be in one place. | |
164 | * But normally, the definitions are in the appropriate places. | |
165 | */ | |
166 | ||
167 | // Hand-coded IMPLEMENT... macro for wxObject (define static data) | |
168 | wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL); | |
169 | wxClassInfo *wxClassInfo::first = NULL; | |
f4a8c29f | 170 | wxClassInfo wxClassInfo::classTable(wxKEY_STRING); |
2bda0e17 KB |
171 | |
172 | #include "wx/button.h" | |
173 | #include "wx/bmpbuttn.h" | |
174 | IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) | |
175 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) | |
176 | ||
177 | #include "wx/checkbox.h" | |
178 | IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) | |
179 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) | |
180 | ||
181 | #include "wx/choice.h" | |
182 | IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) | |
183 | ||
184 | #if USE_CLIPBOARD | |
185 | #include "wx/clipbrd.h" | |
186 | IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) | |
187 | IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject) | |
188 | #endif | |
189 | ||
190 | #if USE_COMBOBOX | |
191 | #include "wx/combobox.h" | |
192 | IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) | |
193 | #endif | |
194 | ||
195 | #include "wx/dc.h" | |
196 | #include "wx/dcmemory.h" | |
197 | #include "wx/dcclient.h" | |
198 | #include "wx/dcscreen.h" | |
199 | IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) | |
200 | IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC) | |
201 | IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) | |
202 | IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC) | |
203 | IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) | |
204 | IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) | |
205 | ||
2049ba38 | 206 | #if defined(__WXMSW__) |
2bda0e17 KB |
207 | #include "wx/dcprint.h" |
208 | IMPLEMENT_CLASS(wxPrinterDC, wxDC) | |
209 | #endif | |
210 | ||
211 | #include "wx/dialog.h" | |
212 | IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxWindow) | |
213 | ||
214 | #include "wx/frame.h" | |
215 | IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) | |
216 | ||
217 | #include "wx/mdi.h" | |
218 | IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame) | |
219 | IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame) | |
220 | IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow) | |
221 | ||
222 | #include "wx/cmndata.h" | |
223 | IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject) | |
224 | IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject) | |
225 | IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject) | |
226 | ||
227 | #include "wx/colordlg.h" | |
228 | #include "wx/fontdlg.h" | |
229 | ||
2049ba38 | 230 | #if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW |
2bda0e17 KB |
231 | #include "wx/generic/colordlg.h" |
232 | #include "wx/generic/fontdlg.h" | |
233 | IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog) | |
234 | IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog, wxDialog) | |
235 | #endif | |
236 | ||
237 | // X defines wxColourDialog to be wxGenericColourDialog | |
238 | #ifndef __X__ | |
239 | IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) | |
240 | IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) | |
241 | #endif | |
242 | ||
243 | #include "wx/gdicmn.h" | |
244 | #include "wx/pen.h" | |
245 | #include "wx/brush.h" | |
246 | #include "wx/font.h" | |
247 | #include "wx/palette.h" | |
248 | #include "wx/icon.h" | |
249 | #include "wx/cursor.h" | |
250 | ||
251 | IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) | |
252 | IMPLEMENT_CLASS(wxColourDatabase, wxList) | |
253 | IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList) | |
254 | IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList) | |
255 | IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList) | |
256 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList) | |
257 | ||
6a6c0a8b | 258 | /* |
2bda0e17 KB |
259 | #if (!USE_TYPEDEFS) |
260 | IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject) | |
261 | IMPLEMENT_DYNAMIC_CLASS(wxRealPoint, wxObject) | |
262 | #endif | |
6a6c0a8b | 263 | */ |
2bda0e17 KB |
264 | |
265 | #include "wx/hash.h" | |
266 | IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject) | |
267 | ||
268 | #include "wx/helpbase.h" | |
269 | IMPLEMENT_CLASS(wxHelpControllerBase, wxObject) | |
270 | ||
271 | #if USE_HELP | |
272 | ||
2049ba38 | 273 | #ifdef __WXMSW__ |
2bda0e17 KB |
274 | #include "wx/msw/helpwin.h" |
275 | IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase) | |
276 | #endif | |
277 | ||
278 | // Generic wxHelp controller | |
279 | IMPLEMENT_CLASS(wxXLPHelpController, wxHelpControllerBase) | |
280 | ||
2049ba38 | 281 | #ifdef __WXMSW__ |
2bda0e17 KB |
282 | IMPLEMENT_CLASS(wxXLPHelpClient, wxDDEClient) |
283 | IMPLEMENT_CLASS(wxXLPHelpConnection, wxDDEConnection) | |
284 | #else | |
285 | IMPLEMENT_CLASS(wxXLPHelpClient, wxTCPClient) | |
286 | IMPLEMENT_CLASS(wxXLPHelpConnection, wxTCPConnection) | |
287 | #endif | |
288 | ||
289 | #endif | |
290 | ||
291 | IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject) | |
292 | ||
293 | #include "wx/list.h" | |
294 | IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject) | |
295 | IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject) | |
296 | IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList) | |
297 | ||
298 | #if USE_PRINTING_ARCHITECTURE | |
299 | #include "wx/print.h" | |
300 | IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) | |
301 | IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase, wxObject) | |
302 | IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase) | |
303 | IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter, wxPrinterBase) | |
304 | IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject) | |
305 | IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow) | |
306 | IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow) | |
307 | IMPLEMENT_CLASS(wxPreviewFrame, wxFrame) | |
308 | IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject) | |
309 | IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase) | |
310 | IMPLEMENT_CLASS(wxWindowsPrintPreview, wxPrintPreviewBase) | |
311 | IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) | |
312 | IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) | |
313 | #endif | |
314 | ||
315 | #if USE_POSTSCRIPT | |
316 | #include "wx/postscrp.h" | |
317 | IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) | |
318 | IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject) | |
319 | IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject) | |
320 | IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) | |
321 | IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList) | |
322 | #endif | |
323 | ||
324 | #if USE_WX_RESOURCES | |
325 | #include "wx/resource.h" | |
326 | IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject) | |
327 | IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) | |
328 | #endif | |
329 | ||
330 | #include "wx/event.h" | |
331 | IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject) | |
332 | IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject) | |
333 | IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent) | |
334 | IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent) | |
335 | IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent) | |
336 | IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent) | |
337 | IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent, wxEvent) | |
338 | IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent, wxEvent) | |
339 | IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent, wxEvent) | |
340 | IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent, wxEvent) | |
341 | IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent, wxEvent) | |
342 | IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent, wxEvent) | |
343 | IMPLEMENT_DYNAMIC_CLASS(wxShowEvent, wxEvent) | |
344 | IMPLEMENT_DYNAMIC_CLASS(wxMaximizeEvent, wxEvent) | |
345 | IMPLEMENT_DYNAMIC_CLASS(wxIconizeEvent, wxEvent) | |
346 | IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent, wxEvent) | |
347 | IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent, wxEvent) | |
348 | IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent, wxEvent) | |
349 | IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent, wxEvent) | |
350 | IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent) | |
351 | IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent) | |
352 | IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent) | |
353 | IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent) | |
ca7731b7 | 354 | IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) |
2bda0e17 KB |
355 | |
356 | #include "wx/utils.h" | |
357 | IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList) | |
358 | ||
6a6c0a8b | 359 | // IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject) |
2bda0e17 | 360 | |
ca7731b7 GL |
361 | #include "wx/process.h" |
362 | IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) | |
363 | ||
2bda0e17 KB |
364 | #if USE_TIMEDATE |
365 | #include "wx/date.h" | |
366 | IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) | |
367 | #endif | |
368 | ||
369 | #if USE_DOC_VIEW_ARCHITECTURE | |
370 | #include "wx/docview.h" | |
371 | //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject) | |
372 | IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler) | |
373 | IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler) | |
374 | IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject) | |
375 | IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler) | |
376 | IMPLEMENT_CLASS(wxDocChildFrame, wxFrame) | |
377 | IMPLEMENT_CLASS(wxDocParentFrame, wxFrame) | |
378 | #if USE_PRINTING_ARCHITECTURE | |
379 | IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout) | |
380 | #endif | |
381 | IMPLEMENT_CLASS(wxCommand, wxObject) | |
382 | IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject) | |
383 | IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject) | |
384 | #endif | |
385 | ||
386 | #if USE_CONSTRAINTS | |
387 | #include "wx/layout.h" | |
388 | IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject) | |
389 | IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject) | |
390 | IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject) | |
391 | IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer) | |
392 | #endif | |
393 | ||
394 | #if USE_TOOLBAR | |
395 | #include "wx/tbarbase.h" | |
396 | IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject) | |
397 | IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl) | |
398 | ||
399 | #include "wx/tbarsmpl.h" | |
400 | IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase) | |
401 | ||
2049ba38 | 402 | #ifdef __WXMSW__ |
2bda0e17 KB |
403 | #include "wx/tbarmsw.h" |
404 | IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase) | |
405 | ||
406 | #include "wx/tbar95.h" | |
407 | IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase) | |
408 | #endif | |
409 | ||
410 | #endif | |
411 | ||
412 | #include "wx/statusbr.h" | |
413 | ||
414 | IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) | |
415 | ||
416 | BEGIN_EVENT_TABLE(wxStatusBar, wxWindow) | |
417 | EVT_PAINT(wxStatusBar::OnPaint) | |
418 | EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged) | |
419 | END_EVENT_TABLE() | |
420 | ||
421 | #if USE_TIMEDATE | |
422 | #include "wx/time.h" | |
423 | IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject) | |
424 | #endif | |
425 | ||
426 | #if !USE_GNU_WXSTRING | |
427 | #include "wx/string.h" | |
428 | IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject) | |
429 | #endif | |
430 | ||
2049ba38 | 431 | #ifdef __WXMOTIF__ |
2bda0e17 KB |
432 | IMPLEMENT_DYNAMIC_CLASS(wxXColormap, wxObject) |
433 | IMPLEMENT_DYNAMIC_CLASS(wxXFont, wxObject) | |
434 | IMPLEMENT_DYNAMIC_CLASS(wxXCursor, wxObject) | |
435 | #endif | |
436 | IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) | |
437 | IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) | |
438 | IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject) | |
439 | IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject) | |
440 | IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) | |
441 | IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap) | |
442 | IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) | |
443 | IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) | |
444 | ||
445 | // This will presumably be implemented on other platforms too | |
2049ba38 | 446 | #ifdef __WXMSW__ |
2bda0e17 KB |
447 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) |
448 | IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) | |
449 | IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler) | |
450 | IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) | |
451 | IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler) | |
452 | IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxBitmapHandler) | |
453 | IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler) | |
454 | #endif | |
455 | ||
456 | #include "wx/statbox.h" | |
457 | IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) | |
458 | ||
459 | #if USE_IPC | |
460 | #include "wx/dde.h" | |
461 | IMPLEMENT_CLASS(wxServerBase, wxObject) | |
462 | IMPLEMENT_CLASS(wxClientBase, wxObject) | |
463 | IMPLEMENT_CLASS(wxConnectionBase, wxObject) | |
464 | ||
465 | IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxServerBase) | |
466 | IMPLEMENT_DYNAMIC_CLASS(wxDDEClient, wxClientBase) | |
467 | IMPLEMENT_CLASS(wxDDEConnection, wxConnectionBase) | |
468 | #endif | |
469 | ||
470 | IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) | |
471 | ||
472 | #include "wx/listbox.h" | |
473 | IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) | |
474 | ||
475 | #include "wx/checklst.h" | |
476 | IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox) | |
477 | ||
478 | IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) | |
479 | ||
480 | #include "wx/menu.h" | |
481 | IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler) | |
482 | IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) | |
483 | IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler) | |
484 | ||
485 | #include "wx/stattext.h" | |
486 | #include "wx/statbmp.h" | |
487 | IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) | |
488 | IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) | |
489 | ||
490 | #if USE_METAFILE | |
491 | #include "wx/metafile.h" | |
492 | IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject) | |
493 | IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC) | |
494 | #endif | |
495 | ||
496 | #include "wx/radiobox.h" | |
497 | #include "wx/radiobut.h" | |
498 | IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) | |
499 | ||
500 | IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) | |
501 | // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton) | |
502 | ||
503 | #include "wx/scrolbar.h" | |
504 | IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) | |
505 | ||
506 | #if WXWIN_COMPATIBILITY | |
507 | BEGIN_EVENT_TABLE(wxScrollBar, wxControl) | |
508 | EVT_SCROLL(wxScrollBar::OnScroll) | |
509 | END_EVENT_TABLE() | |
510 | #endif | |
511 | ||
512 | #include "wx/slider.h" | |
513 | IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) | |
514 | ||
515 | #if WXWIN_COMPATIBILITY | |
516 | BEGIN_EVENT_TABLE(wxSlider, wxControl) | |
517 | EVT_SCROLL(wxSlider::OnScroll) | |
518 | END_EVENT_TABLE() | |
519 | #endif | |
520 | ||
521 | #include "wx/timer.h" | |
522 | IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) | |
523 | ||
524 | #include "wx/textctrl.h" | |
525 | IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) | |
526 | ||
527 | #include "wx/window.h" | |
528 | IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) | |
529 | ||
530 | #include "wx/scrolwin.h" | |
531 | IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow) | |
532 | ||
533 | #include "wx/panel.h" | |
534 | IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow) | |
535 | ||
536 | #include "wx/msgbxdlg.h" | |
537 | #include "wx/textdlg.h" | |
538 | #include "wx/filedlg.h" | |
539 | #include "wx/dirdlg.h" | |
540 | #include "wx/choicdlg.h" | |
541 | ||
2049ba38 | 542 | #if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW |
2bda0e17 KB |
543 | #include "wx/generic/msgdlgg.h" |
544 | IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) | |
545 | #endif | |
546 | ||
547 | IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) | |
548 | IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) | |
549 | IMPLEMENT_CLASS(wxFileDialog, wxDialog) | |
550 | IMPLEMENT_CLASS(wxDirDialog, wxDialog) | |
551 | ||
2049ba38 | 552 | #ifdef __WXMSW__ |
2bda0e17 KB |
553 | IMPLEMENT_CLASS(wxMessageDialog) |
554 | #endif | |
555 | ||
556 | #if USE_GAUGE | |
2049ba38 | 557 | #ifdef __WXMOTIF__ |
2bda0e17 KB |
558 | #include "../../contrib/xmgauge/gauge.h" |
559 | #endif | |
560 | #include "wx_gauge.h" | |
561 | IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) | |
562 | #endif | |
563 | ||
564 | #include "wx/grid.h" | |
565 | IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid, wxPanel) | |
566 | ||
567 | ///// Event tables (also must be in one, statically-linked file for shared libraries) | |
568 | ||
569 | // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here | |
570 | const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } | |
571 | ||
572 | const wxEventTable wxEvtHandler::sm_eventTable = | |
573 | { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; | |
574 | ||
575 | const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } }; | |
576 | ||
577 | BEGIN_EVENT_TABLE(wxFrame, wxWindow) | |
578 | EVT_ACTIVATE(wxFrame::OnActivate) | |
579 | EVT_SIZE(wxFrame::OnSize) | |
580 | EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) | |
581 | EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) | |
582 | EVT_IDLE(wxFrame::OnIdle) | |
583 | EVT_CLOSE(wxFrame::OnCloseWindow) | |
584 | END_EVENT_TABLE() | |
585 | ||
586 | BEGIN_EVENT_TABLE(wxDialog, wxPanel) | |
587 | EVT_BUTTON(wxID_OK, wxDialog::OnOK) | |
588 | EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) | |
589 | EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) | |
590 | EVT_CHAR_HOOK(wxDialog::OnCharHook) | |
591 | EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) | |
592 | EVT_CLOSE(wxDialog::OnCloseWindow) | |
593 | END_EVENT_TABLE() | |
594 | ||
595 | BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) | |
596 | EVT_CHAR(wxWindow::OnChar) | |
597 | EVT_SIZE(wxWindow::Size) | |
598 | EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground) | |
599 | EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) | |
600 | EVT_INIT_DIALOG(wxWindow::OnInitDialog) | |
601 | EVT_IDLE(wxWindow::OnIdle) | |
602 | END_EVENT_TABLE() | |
603 | ||
604 | BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow) | |
605 | EVT_SCROLL(wxScrolledWindow::OnScroll) | |
606 | EVT_SIZE(wxScrolledWindow::OnSize) | |
607 | EVT_PAINT(wxScrolledWindow::OnPaint) | |
608 | END_EVENT_TABLE() | |
609 | ||
610 | BEGIN_EVENT_TABLE(wxPanel, wxWindow) | |
611 | EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged) | |
612 | END_EVENT_TABLE() | |
613 | ||
614 | BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) | |
615 | EVT_CHAR(wxTextCtrl::OnChar) | |
616 | EVT_DROP_FILES(wxTextCtrl::OnDropFiles) | |
617 | EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) | |
618 | END_EVENT_TABLE() | |
619 | ||
2049ba38 | 620 | #ifdef __WXMSW__ |
2bda0e17 KB |
621 | BEGIN_EVENT_TABLE(wxMDIParentWindow, wxFrame) |
622 | EVT_SIZE(wxMDIParentWindow::OnSize) | |
623 | EVT_ACTIVATE(wxMDIParentWindow::OnActivate) | |
624 | EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged) | |
625 | END_EVENT_TABLE() | |
626 | ||
627 | BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow) | |
628 | EVT_SCROLL(wxMDIClientWindow::OnScroll) | |
629 | END_EVENT_TABLE() | |
630 | #endif | |
631 | ||
632 | BEGIN_EVENT_TABLE(wxToolBarBase, wxControl) | |
633 | EVT_SCROLL(wxToolBarBase::OnScroll) | |
634 | EVT_SIZE(wxToolBarBase::OnSize) | |
635 | EVT_IDLE(wxToolBarBase::OnIdle) | |
636 | END_EVENT_TABLE() | |
637 | ||
638 | BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase) | |
639 | EVT_SIZE(wxToolBarSimple::OnSize) | |
640 | EVT_PAINT(wxToolBarSimple::OnPaint) | |
641 | EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus) | |
642 | EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent) | |
643 | END_EVENT_TABLE() | |
644 | ||
2049ba38 | 645 | #ifdef __WXMSW__ |
2bda0e17 KB |
646 | BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase) |
647 | EVT_SIZE(wxToolBarMSW::OnSize) | |
648 | EVT_PAINT(wxToolBarMSW::OnPaint) | |
649 | EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent) | |
650 | END_EVENT_TABLE() | |
651 | ||
652 | BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase) | |
653 | EVT_SIZE(wxToolBar95::OnSize) | |
654 | EVT_PAINT(wxToolBar95::OnPaint) | |
655 | EVT_KILL_FOCUS(wxToolBar95::OnKillFocus) | |
656 | EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent) | |
657 | EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged) | |
658 | END_EVENT_TABLE() | |
659 | #endif | |
660 | ||
661 | BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel) | |
662 | EVT_SIZE(wxGenericGrid::OnSize) | |
663 | EVT_PAINT(wxGenericGrid::OnPaint) | |
664 | EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent) | |
665 | EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText) | |
666 | EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll) | |
667 | EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll) | |
668 | END_EVENT_TABLE() | |
669 | ||
670 | BEGIN_EVENT_TABLE(wxControl, wxWindow) | |
671 | EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground) | |
672 | END_EVENT_TABLE() | |
673 | ||
2049ba38 | 674 | #if !defined(__WXMSW__) || USE_GENERIC_DIALOGS_IN_MSW |
2bda0e17 KB |
675 | BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) |
676 | EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) | |
677 | EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) | |
678 | EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) | |
679 | END_EVENT_TABLE() | |
680 | ||
681 | BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog) | |
682 | EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom) | |
683 | EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider) | |
684 | EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider) | |
685 | EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider) | |
686 | EVT_PAINT(wxGenericColourDialog::OnPaint) | |
687 | EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent) | |
688 | END_EVENT_TABLE() | |
689 | ||
690 | BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog) | |
691 | EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont) | |
692 | EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont) | |
693 | EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont) | |
694 | EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont) | |
695 | EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont) | |
696 | EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) | |
697 | EVT_PAINT(wxGenericFontDialog::OnPaint) | |
698 | END_EVENT_TABLE() | |
699 | ||
700 | BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) | |
701 | EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) | |
702 | EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) | |
703 | EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) | |
704 | END_EVENT_TABLE() | |
705 | ||
706 | #endif | |
707 | ||
708 | BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) | |
709 | EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) | |
710 | END_EVENT_TABLE() | |
711 | ||
712 | BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) | |
713 | EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) | |
714 | END_EVENT_TABLE() | |
715 | ||
716 | #include "wx/prntbase.h" | |
717 | ||
718 | BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog) | |
719 | EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel) | |
720 | END_EVENT_TABLE() | |
721 | ||
722 | BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow) | |
723 | EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose) | |
724 | EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint) | |
725 | EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious) | |
726 | EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext) | |
727 | EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom) | |
728 | END_EVENT_TABLE() | |
729 | ||
730 | #endif | |
731 | ||
732 | ||
733 | const wxSize wxDefaultSize(-1, -1); | |
734 | const wxPoint wxDefaultPosition(-1, -1); |