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