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