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