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