]> git.saurik.com Git - wxWidgets.git/blame - src/msw/data.cpp
Added wxFontEnumerator class for wxMSW, and fixed text validator for French
[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");
1044a386
JS
156const wxChar *wxDirDialogNameStr = _T("wxDirCtrl");
157const wxChar *wxDirDialogDefaultFolderStr = _T("/");
2bda0e17
KB
158
159// See wx/utils.h
837e5743
OK
160const wxChar *wxFloatToStringStr = _T("%.2f");
161const wxChar *wxDoubleToStringStr = _T("%.2f");
2bda0e17 162
2049ba38 163#ifdef __WXMSW__
837e5743 164const wxChar *wxUserResourceStr = _T("TEXT");
2bda0e17
KB
165#endif
166
47d67540 167#if wxUSE_SHARED_LIBRARY
2bda0e17
KB
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)
175wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL);
176wxClassInfo *wxClassInfo::first = NULL;
f4a8c29f 177wxClassInfo wxClassInfo::classTable(wxKEY_STRING);
2bda0e17
KB
178
179#include "wx/button.h"
180#include "wx/bmpbuttn.h"
181IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
182IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
183
184#include "wx/checkbox.h"
185IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
186IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
187
188#include "wx/choice.h"
189IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
190
47d67540 191#if wxUSE_CLIPBOARD
2bda0e17
KB
192#include "wx/clipbrd.h"
193IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
194IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject)
195#endif
196
47d67540 197#if wxUSE_COMBOBOX
2bda0e17
KB
198#include "wx/combobox.h"
199IMPLEMENT_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"
206IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
2bda0e17 207IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
e6460682
JS
208IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC)
209IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC)
2bda0e17 210IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
e6460682 211IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
2bda0e17 212
2049ba38 213#if defined(__WXMSW__)
2bda0e17
KB
214#include "wx/dcprint.h"
215IMPLEMENT_CLASS(wxPrinterDC, wxDC)
216#endif
217
218#include "wx/dialog.h"
219IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxWindow)
220
221#include "wx/frame.h"
222IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
223
224#include "wx/mdi.h"
225IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame)
226IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame)
227IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow)
228
229#include "wx/cmndata.h"
230IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject)
231IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject)
232IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject)
233
234#include "wx/colordlg.h"
235#include "wx/fontdlg.h"
236
47d67540 237#if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW
2bda0e17
KB
238#include "wx/generic/colordlg.h"
239#include "wx/generic/fontdlg.h"
240IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog)
241IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog, wxDialog)
242#endif
243
244// X defines wxColourDialog to be wxGenericColourDialog
245#ifndef __X__
246IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog)
247IMPLEMENT_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
258IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
259IMPLEMENT_CLASS(wxColourDatabase, wxList)
260IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList)
261IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList)
262IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList)
263IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList)
264
6a6c0a8b 265/*
2bda0e17
KB
266#if (!USE_TYPEDEFS)
267IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject)
268IMPLEMENT_DYNAMIC_CLASS(wxRealPoint, wxObject)
269#endif
6a6c0a8b 270*/
2bda0e17
KB
271
272#include "wx/hash.h"
273IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject)
274
275#include "wx/helpbase.h"
276IMPLEMENT_CLASS(wxHelpControllerBase, wxObject)
277
47d67540 278#if wxUSE_HELP
2bda0e17 279
2049ba38 280#ifdef __WXMSW__
2bda0e17
KB
281#include "wx/msw/helpwin.h"
282IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase)
283#endif
284
285// Generic wxHelp controller
286IMPLEMENT_CLASS(wxXLPHelpController, wxHelpControllerBase)
287
2049ba38 288#ifdef __WXMSW__
2bda0e17
KB
289IMPLEMENT_CLASS(wxXLPHelpClient, wxDDEClient)
290IMPLEMENT_CLASS(wxXLPHelpConnection, wxDDEConnection)
291#else
292IMPLEMENT_CLASS(wxXLPHelpClient, wxTCPClient)
293IMPLEMENT_CLASS(wxXLPHelpConnection, wxTCPConnection)
294#endif
295
296#endif
297
298IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject)
299
300#include "wx/list.h"
301IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject)
302IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject)
303IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList)
304
47d67540 305#if wxUSE_PRINTING_ARCHITECTURE
2bda0e17
KB
306#include "wx/print.h"
307IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog)
308IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase, wxObject)
309IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase)
310IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter, wxPrinterBase)
311IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject)
312IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow)
313IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow)
314IMPLEMENT_CLASS(wxPreviewFrame, wxFrame)
315IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject)
316IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase)
317IMPLEMENT_CLASS(wxWindowsPrintPreview, wxPrintPreviewBase)
318IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog)
319IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog)
320#endif
321
47d67540 322#if wxUSE_POSTSCRIPT
bf38cbff 323#include "wx/dcps.h"
2bda0e17
KB
324IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC)
325IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject)
326IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject)
2a47d3c1
JS
327#endif
328
2bda0e17
KB
329IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject)
330IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList)
2bda0e17 331
47d67540 332#if wxUSE_WX_RESOURCES
2bda0e17
KB
333#include "wx/resource.h"
334IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject)
335IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable)
336#endif
337
338#include "wx/event.h"
339IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject)
340IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject)
341IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent)
92976ab6 342IMPLEMENT_DYNAMIC_CLASS(wxNotifyEvent, wxCommandEvent)
2bda0e17
KB
343IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent)
344IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent)
345IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent)
346IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent, wxEvent)
347IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent, wxEvent)
348IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent, wxEvent)
349IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent, wxEvent)
350IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent, wxEvent)
351IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent, wxEvent)
352IMPLEMENT_DYNAMIC_CLASS(wxShowEvent, wxEvent)
353IMPLEMENT_DYNAMIC_CLASS(wxMaximizeEvent, wxEvent)
354IMPLEMENT_DYNAMIC_CLASS(wxIconizeEvent, wxEvent)
355IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent, wxEvent)
356IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent, wxEvent)
357IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent, wxEvent)
358IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent, wxEvent)
359IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent)
360IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent)
361IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent)
362IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent)
ca7731b7 363IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent)
2bda0e17
KB
364
365#include "wx/utils.h"
366IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList)
367
6a6c0a8b 368// IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject)
2bda0e17 369
ca7731b7
GL
370#include "wx/process.h"
371IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler)
372
47d67540 373#if wxUSE_TIMEDATE
2bda0e17
KB
374#include "wx/date.h"
375IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject)
376#endif
377
47d67540 378#if wxUSE_DOC_VIEW_ARCHITECTURE
2bda0e17
KB
379#include "wx/docview.h"
380//IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
381IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler)
382IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler)
383IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject)
384IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler)
385IMPLEMENT_CLASS(wxDocChildFrame, wxFrame)
386IMPLEMENT_CLASS(wxDocParentFrame, wxFrame)
47d67540 387#if wxUSE_PRINTING_ARCHITECTURE
2bda0e17
KB
388IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout)
389#endif
390IMPLEMENT_CLASS(wxCommand, wxObject)
391IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject)
392IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject)
393#endif
394
47d67540 395#if wxUSE_CONSTRAINTS
2bda0e17
KB
396#include "wx/layout.h"
397IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject)
398IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject)
399IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject)
400IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer)
401#endif
402
47d67540 403#if wxUSE_TOOLBAR
2bda0e17
KB
404#include "wx/tbarbase.h"
405IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject)
406IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl)
407
408#include "wx/tbarsmpl.h"
409IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase)
410
2049ba38 411#ifdef __WXMSW__
2bda0e17
KB
412#include "wx/tbarmsw.h"
413IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase)
414
415#include "wx/tbar95.h"
416IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase)
417#endif
418
419#endif
420
35a4dab7
GL
421#if wxUSE_SOCKETS
422
856d2e52
GL
423#include "wx/sckaddr.h"
424
425IMPLEMENT_DYNAMIC_CLASS(wxIPV4address, wxSockAddress)
426#ifdef ENABLE_IPV6
427IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxSockAddress)
428#endif
429#ifndef __UNIX__
430IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress)
431#endif
432
433#include "wx/socket.h"
434
435IMPLEMENT_CLASS(wxSocketBase, wxEvtHandler)
436IMPLEMENT_CLASS(wxSocketClient, wxSocketBase)
437IMPLEMENT_CLASS(wxSocketServer, wxSocketBase)
438IMPLEMENT_CLASS(wxSocketHandler, wxObject)
439IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent, wxEvent)
440
441#include "wx/url.h"
442
443IMPLEMENT_CLASS(wxProtoInfo, wxObject)
444IMPLEMENT_CLASS(wxURL, wxObject)
445
446#include "wx/protocol/http.h"
447
448IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol)
449IMPLEMENT_PROTOCOL(wxHTTP, "http", "80", TRUE)
450
451#include "wx/protocol/ftp.h"
452
453IMPLEMENT_DYNAMIC_CLASS(wxFTP, wxProtocol)
454IMPLEMENT_PROTOCOL(wxFTP, "ftp", "21", TRUE)
455
456#include "wx/protocol/sckfile.h"
457
458IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol)
459IMPLEMENT_PROTOCOL(wxFileProto, "file", NULL, FALSE)
460
461#include "wx/sckipc.h"
462
463IMPLEMENT_DYNAMIC_CLASS(wxTCPServer, wxServerBase)
464IMPLEMENT_DYNAMIC_CLASS(wxTCPClient, wxClientBase)
465IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection, wxConnectionBase)
466
35a4dab7
GL
467#endif
468
2bda0e17
KB
469#include "wx/statusbr.h"
470
471IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow)
472
473BEGIN_EVENT_TABLE(wxStatusBar, wxWindow)
e146b8c8 474 EVT_PAINT(wxStatusBar::OnPaint)
2bda0e17
KB
475 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged)
476END_EVENT_TABLE()
477
47d67540 478#if wxUSE_TIMEDATE
2bda0e17
KB
479#include "wx/time.h"
480IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject)
481#endif
482
483#if !USE_GNU_WXSTRING
484#include "wx/string.h"
485IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject)
486#endif
487
2049ba38 488#ifdef __WXMOTIF__
2bda0e17
KB
489IMPLEMENT_DYNAMIC_CLASS(wxXColormap, wxObject)
490IMPLEMENT_DYNAMIC_CLASS(wxXFont, wxObject)
491IMPLEMENT_DYNAMIC_CLASS(wxXCursor, wxObject)
492#endif
493IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
494IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
495IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
496IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
497IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
498IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap)
499IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
500IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject)
501
502// This will presumably be implemented on other platforms too
2049ba38 503#ifdef __WXMSW__
2bda0e17
KB
504IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject)
505IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler)
506IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler)
507IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler)
508IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler)
509IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxBitmapHandler)
510IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler)
511#endif
512
513#include "wx/statbox.h"
514IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
515
47d67540 516#if wxUSE_IPC
2bda0e17
KB
517#include "wx/dde.h"
518IMPLEMENT_CLASS(wxServerBase, wxObject)
519IMPLEMENT_CLASS(wxClientBase, wxObject)
520IMPLEMENT_CLASS(wxConnectionBase, wxObject)
521
522IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxServerBase)
523IMPLEMENT_DYNAMIC_CLASS(wxDDEClient, wxClientBase)
524IMPLEMENT_CLASS(wxDDEConnection, wxConnectionBase)
525#endif
526
527IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
528
529#include "wx/listbox.h"
530IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
531
532#include "wx/checklst.h"
533IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
534
535IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
536
537#include "wx/menu.h"
538IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler)
539IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
540IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler)
541
542#include "wx/stattext.h"
543#include "wx/statbmp.h"
544IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
545IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
546
47d67540 547#if wxUSE_METAFILE
2bda0e17
KB
548#include "wx/metafile.h"
549IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject)
550IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC)
551#endif
552
553#include "wx/radiobox.h"
554#include "wx/radiobut.h"
555IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
556
557IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
558// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
559
560#include "wx/scrolbar.h"
561IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
562
563#if WXWIN_COMPATIBILITY
564BEGIN_EVENT_TABLE(wxScrollBar, wxControl)
565 EVT_SCROLL(wxScrollBar::OnScroll)
566END_EVENT_TABLE()
567#endif
568
569#include "wx/slider.h"
570IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
571
572#if WXWIN_COMPATIBILITY
573BEGIN_EVENT_TABLE(wxSlider, wxControl)
574 EVT_SCROLL(wxSlider::OnScroll)
575END_EVENT_TABLE()
576#endif
577
578#include "wx/timer.h"
579IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
580
581#include "wx/textctrl.h"
582IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
583
584#include "wx/window.h"
585IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler)
586
587#include "wx/scrolwin.h"
588IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow)
589
590#include "wx/panel.h"
591IMPLEMENT_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
47d67540 599#if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW
2bda0e17
KB
600#include "wx/generic/msgdlgg.h"
601IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog)
602#endif
603
604IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog)
605IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog)
606IMPLEMENT_CLASS(wxFileDialog, wxDialog)
607IMPLEMENT_CLASS(wxDirDialog, wxDialog)
608
2049ba38 609#ifdef __WXMSW__
2bda0e17
KB
610IMPLEMENT_CLASS(wxMessageDialog)
611#endif
612
47d67540 613#if wxUSE_GAUGE
2049ba38 614#ifdef __WXMOTIF__
2bda0e17
KB
615#include "../../contrib/xmgauge/gauge.h"
616#endif
617#include "wx_gauge.h"
618IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
619#endif
620
621#include "wx/grid.h"
622IMPLEMENT_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
627const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; }
628
629const wxEventTable wxEvtHandler::sm_eventTable =
e146b8c8 630 { NULL, &wxEvtHandler::sm_eventTableEntries[0] };
2bda0e17
KB
631
632const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } };
633
634BEGIN_EVENT_TABLE(wxFrame, wxWindow)
e146b8c8
VZ
635 EVT_ACTIVATE(wxFrame::OnActivate)
636 EVT_SIZE(wxFrame::OnSize)
637 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
2bda0e17
KB
638 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
639 EVT_IDLE(wxFrame::OnIdle)
640 EVT_CLOSE(wxFrame::OnCloseWindow)
641END_EVENT_TABLE()
642
643BEGIN_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)
650END_EVENT_TABLE()
651
652BEGIN_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)
659END_EVENT_TABLE()
660
661BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow)
662 EVT_SCROLL(wxScrolledWindow::OnScroll)
663 EVT_SIZE(wxScrolledWindow::OnSize)
664 EVT_PAINT(wxScrolledWindow::OnPaint)
665END_EVENT_TABLE()
666
667BEGIN_EVENT_TABLE(wxPanel, wxWindow)
668 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged)
669END_EVENT_TABLE()
670
671BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
e146b8c8
VZ
672 EVT_CHAR(wxTextCtrl::OnChar)
673 EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
2bda0e17
KB
674END_EVENT_TABLE()
675
2049ba38 676#ifdef __WXMSW__
2bda0e17
KB
677BEGIN_EVENT_TABLE(wxMDIParentWindow, wxFrame)
678 EVT_SIZE(wxMDIParentWindow::OnSize)
679 EVT_ACTIVATE(wxMDIParentWindow::OnActivate)
680 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged)
681END_EVENT_TABLE()
682
683BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow)
684 EVT_SCROLL(wxMDIClientWindow::OnScroll)
685END_EVENT_TABLE()
686#endif
687
688BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
689 EVT_SCROLL(wxToolBarBase::OnScroll)
690 EVT_SIZE(wxToolBarBase::OnSize)
691 EVT_IDLE(wxToolBarBase::OnIdle)
692END_EVENT_TABLE()
693
694BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase)
e146b8c8
VZ
695 EVT_SIZE(wxToolBarSimple::OnSize)
696 EVT_PAINT(wxToolBarSimple::OnPaint)
697 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus)
698 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent)
2bda0e17
KB
699END_EVENT_TABLE()
700
2049ba38 701#ifdef __WXMSW__
2bda0e17 702BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase)
e146b8c8
VZ
703 EVT_SIZE(wxToolBarMSW::OnSize)
704 EVT_PAINT(wxToolBarMSW::OnPaint)
705 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent)
2bda0e17
KB
706END_EVENT_TABLE()
707
708BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase)
e146b8c8
VZ
709 EVT_SIZE(wxToolBar95::OnSize)
710 EVT_PAINT(wxToolBar95::OnPaint)
711 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus)
712 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent)
2bda0e17
KB
713 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged)
714END_EVENT_TABLE()
715#endif
716
717BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel)
e146b8c8
VZ
718 EVT_SIZE(wxGenericGrid::OnSize)
719 EVT_PAINT(wxGenericGrid::OnPaint)
720 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent)
2bda0e17
KB
721 EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText)
722 EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll)
723 EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll)
724END_EVENT_TABLE()
725
726BEGIN_EVENT_TABLE(wxControl, wxWindow)
727 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground)
728END_EVENT_TABLE()
729
47d67540 730#if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW
2bda0e17 731BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog)
e146b8c8
VZ
732 EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes)
733 EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo)
734 EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel)
2bda0e17
KB
735END_EVENT_TABLE()
736
737BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog)
e146b8c8
VZ
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)
2bda0e17
KB
744END_EVENT_TABLE()
745
746BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog)
e146b8c8
VZ
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)
2bda0e17
KB
754END_EVENT_TABLE()
755
756BEGIN_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)
760END_EVENT_TABLE()
761
762#endif
763
764BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog)
e146b8c8 765 EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK)
2bda0e17
KB
766END_EVENT_TABLE()
767
768BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog)
e146b8c8 769 EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK)
2bda0e17
KB
770END_EVENT_TABLE()
771
772#include "wx/prntbase.h"
773
774BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog)
e146b8c8 775 EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel)
2bda0e17
KB
776END_EVENT_TABLE()
777
778BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow)
e146b8c8
VZ
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)
2bda0e17
KB
784END_EVENT_TABLE()
785
786#endif
787
788
789const wxSize wxDefaultSize(-1, -1);
790const wxPoint wxDefaultPosition(-1, -1);