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