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