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