]> git.saurik.com Git - wxWidgets.git/blame - src/msw/data.cpp
with only a little modification could be generic
[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
KB
39
40// Current cursor, in order to hang on to
41// cursor handle when setting the cursor globally
42wxCursor *g_globalCursor = NULL;
43
44// Message Strings for Internationalization
45char **wx_msg_str = (char**)NULL;
46
47// Custom OS version, as optionally placed in wx.ini/.wxrc
48// Currently this can be Win95, Windows, Win32s, WinNT.
49// For some systems, you can't tell until run-time what services you
50// have. See wxGetOsVersion, which uses this string if present.
51char *wxOsVersion = NULL;
52
53int wxPageNumber;
54
55// GDI Object Lists
56wxBrushList *wxTheBrushList = NULL;
57wxPenList *wxThePenList = NULL;
58wxFontList *wxTheFontList = NULL;
59wxBitmapList *wxTheBitmapList = NULL;
60
61wxColourDatabase *wxTheColourDatabase = NULL;
62
63// Stock objects
64wxFont *wxNORMAL_FONT;
65wxFont *wxSMALL_FONT;
66wxFont *wxITALIC_FONT;
67wxFont *wxSWISS_FONT;
68wxPen *wxRED_PEN;
69
70wxPen *wxCYAN_PEN;
71wxPen *wxGREEN_PEN;
72wxPen *wxBLACK_PEN;
73wxPen *wxWHITE_PEN;
74wxPen *wxTRANSPARENT_PEN;
75wxPen *wxBLACK_DASHED_PEN;
76wxPen *wxGREY_PEN;
77wxPen *wxMEDIUM_GREY_PEN;
78wxPen *wxLIGHT_GREY_PEN;
79
80wxBrush *wxBLUE_BRUSH;
81wxBrush *wxGREEN_BRUSH;
82wxBrush *wxWHITE_BRUSH;
83wxBrush *wxBLACK_BRUSH;
84wxBrush *wxTRANSPARENT_BRUSH;
85wxBrush *wxCYAN_BRUSH;
86wxBrush *wxRED_BRUSH;
87wxBrush *wxGREY_BRUSH;
88wxBrush *wxMEDIUM_GREY_BRUSH;
89wxBrush *wxLIGHT_GREY_BRUSH;
90
91wxColour *wxBLACK;
92wxColour *wxWHITE;
93wxColour *wxRED;
94wxColour *wxBLUE;
95wxColour *wxGREEN;
96wxColour *wxCYAN;
97wxColour *wxLIGHT_GREY;
98
99wxCursor *wxSTANDARD_CURSOR = NULL;
100wxCursor *wxHOURGLASS_CURSOR = NULL;
101wxCursor *wxCROSS_CURSOR = NULL;
102
103// 'Null' objects
57a7b7c1 104wxAcceleratorTable wxNullAcceleratorTable;
2bda0e17
KB
105wxBitmap wxNullBitmap;
106wxIcon wxNullIcon;
107wxCursor wxNullCursor;
108wxPen wxNullPen;
109wxBrush wxNullBrush;
110wxPalette wxNullPalette;
111wxFont wxNullFont;
112wxColour wxNullColour;
113
114// Default window names
223d09f6
KB
115const wxChar *wxButtonNameStr = wxT("button");
116const wxChar *wxCanvasNameStr = wxT("canvas");
117const wxChar *wxCheckBoxNameStr = wxT("check");
118const wxChar *wxChoiceNameStr = wxT("choice");
119const wxChar *wxComboBoxNameStr = wxT("comboBox");
120const wxChar *wxDialogNameStr = wxT("dialog");
121const wxChar *wxFrameNameStr = wxT("frame");
122const wxChar *wxGaugeNameStr = wxT("gauge");
123const wxChar *wxStaticBoxNameStr = wxT("groupBox");
124const wxChar *wxListBoxNameStr = wxT("listBox");
125const wxChar *wxStaticTextNameStr = wxT("message");
126const wxChar *wxStaticBitmapNameStr = wxT("message");
127const wxChar *wxMultiTextNameStr = wxT("multitext");
128const wxChar *wxPanelNameStr = wxT("panel");
129const wxChar *wxRadioBoxNameStr = wxT("radioBox");
130const wxChar *wxRadioButtonNameStr = wxT("radioButton");
131const wxChar *wxBitmapRadioButtonNameStr = wxT("radioButton");
132const wxChar *wxScrollBarNameStr = wxT("scrollBar");
133const wxChar *wxSliderNameStr = wxT("slider");
134const wxChar *wxStaticNameStr = wxT("static");
135const wxChar *wxTextCtrlWindowNameStr = wxT("textWindow");
136const wxChar *wxTextCtrlNameStr = wxT("text");
137const wxChar *wxVirtListBoxNameStr = wxT("virtListBox");
138const wxChar *wxButtonBarNameStr = wxT("buttonbar");
139const wxChar *wxEnhDialogNameStr = wxT("Shell");
140const wxChar *wxToolBarNameStr = wxT("toolbar");
141const wxChar *wxStatusLineNameStr = wxT("status_line");
142const wxChar *wxGetTextFromUserPromptStr = wxT("Input Text");
143const wxChar *wxMessageBoxCaptionStr = wxT("Message");
144const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
145const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*.*");
146const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
147const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
148const wxChar *wxTreeCtrlNameStr = wxT("treeCtrl");
149const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
150const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
2bda0e17
KB
151
152// See wx/utils.h
223d09f6
KB
153const wxChar *wxFloatToStringStr = wxT("%.2f");
154const wxChar *wxDoubleToStringStr = wxT("%.2f");
2bda0e17 155
2049ba38 156#ifdef __WXMSW__
223d09f6 157const wxChar *wxUserResourceStr = wxT("TEXT");
2bda0e17
KB
158#endif
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)
2bda0e17 200IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
e6460682
JS
201IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC)
202IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC)
2bda0e17 203IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
e6460682 204IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
2bda0e17 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
bf38cbff 316#include "wx/dcps.h"
2bda0e17
KB
317IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC)
318IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject)
319IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject)
2a47d3c1
JS
320#endif
321
2bda0e17
KB
322IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject)
323IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList)
2bda0e17 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
35a4dab7
GL
414#if wxUSE_SOCKETS
415
856d2e52
GL
416#include "wx/sckaddr.h"
417
418IMPLEMENT_DYNAMIC_CLASS(wxIPV4address, wxSockAddress)
419#ifdef ENABLE_IPV6
420IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxSockAddress)
421#endif
422#ifndef __UNIX__
423IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress)
424#endif
425
426#include "wx/socket.h"
427
428IMPLEMENT_CLASS(wxSocketBase, wxEvtHandler)
429IMPLEMENT_CLASS(wxSocketClient, wxSocketBase)
430IMPLEMENT_CLASS(wxSocketServer, wxSocketBase)
431IMPLEMENT_CLASS(wxSocketHandler, wxObject)
432IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent, wxEvent)
433
434#include "wx/url.h"
435
436IMPLEMENT_CLASS(wxProtoInfo, wxObject)
437IMPLEMENT_CLASS(wxURL, wxObject)
438
439#include "wx/protocol/http.h"
440
441IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol)
442IMPLEMENT_PROTOCOL(wxHTTP, "http", "80", TRUE)
443
444#include "wx/protocol/ftp.h"
445
446IMPLEMENT_DYNAMIC_CLASS(wxFTP, wxProtocol)
447IMPLEMENT_PROTOCOL(wxFTP, "ftp", "21", TRUE)
448
449#include "wx/protocol/sckfile.h"
450
451IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol)
452IMPLEMENT_PROTOCOL(wxFileProto, "file", NULL, FALSE)
453
454#include "wx/sckipc.h"
455
456IMPLEMENT_DYNAMIC_CLASS(wxTCPServer, wxServerBase)
457IMPLEMENT_DYNAMIC_CLASS(wxTCPClient, wxClientBase)
458IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection, wxConnectionBase)
459
35a4dab7
GL
460#endif
461
2bda0e17
KB
462#include "wx/statusbr.h"
463
464IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow)
465
466BEGIN_EVENT_TABLE(wxStatusBar, wxWindow)
e146b8c8 467 EVT_PAINT(wxStatusBar::OnPaint)
2bda0e17
KB
468 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged)
469END_EVENT_TABLE()
470
47d67540 471#if wxUSE_TIMEDATE
2bda0e17
KB
472#include "wx/time.h"
473IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject)
474#endif
475
476#if !USE_GNU_WXSTRING
477#include "wx/string.h"
478IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject)
479#endif
480
2049ba38 481#ifdef __WXMOTIF__
2bda0e17
KB
482IMPLEMENT_DYNAMIC_CLASS(wxXColormap, wxObject)
483IMPLEMENT_DYNAMIC_CLASS(wxXFont, wxObject)
484IMPLEMENT_DYNAMIC_CLASS(wxXCursor, wxObject)
485#endif
486IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
487IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
488IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
489IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
490IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
491IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap)
492IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
493IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject)
494
495// This will presumably be implemented on other platforms too
2049ba38 496#ifdef __WXMSW__
2bda0e17
KB
497IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject)
498IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler)
499IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler)
500IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler)
501IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler)
502IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxBitmapHandler)
503IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler)
504#endif
505
506#include "wx/statbox.h"
507IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
508
47d67540 509#if wxUSE_IPC
2bda0e17
KB
510#include "wx/dde.h"
511IMPLEMENT_CLASS(wxServerBase, wxObject)
512IMPLEMENT_CLASS(wxClientBase, wxObject)
513IMPLEMENT_CLASS(wxConnectionBase, wxObject)
514
515IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxServerBase)
516IMPLEMENT_DYNAMIC_CLASS(wxDDEClient, wxClientBase)
517IMPLEMENT_CLASS(wxDDEConnection, wxConnectionBase)
518#endif
519
520IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
521
522#include "wx/listbox.h"
523IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
524
525#include "wx/checklst.h"
526IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
527
528IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
529
530#include "wx/menu.h"
531IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler)
532IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
533IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler)
534
535#include "wx/stattext.h"
536#include "wx/statbmp.h"
537IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
538IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
539
47d67540 540#if wxUSE_METAFILE
2bda0e17
KB
541#include "wx/metafile.h"
542IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject)
543IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC)
544#endif
545
546#include "wx/radiobox.h"
547#include "wx/radiobut.h"
548IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
549
550IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
551// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
552
553#include "wx/scrolbar.h"
554IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
555
556#if WXWIN_COMPATIBILITY
557BEGIN_EVENT_TABLE(wxScrollBar, wxControl)
558 EVT_SCROLL(wxScrollBar::OnScroll)
559END_EVENT_TABLE()
560#endif
561
562#include "wx/slider.h"
563IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
564
565#if WXWIN_COMPATIBILITY
566BEGIN_EVENT_TABLE(wxSlider, wxControl)
567 EVT_SCROLL(wxSlider::OnScroll)
568END_EVENT_TABLE()
569#endif
570
571#include "wx/timer.h"
572IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
573
574#include "wx/textctrl.h"
575IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
576
577#include "wx/window.h"
578IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler)
579
580#include "wx/scrolwin.h"
581IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow)
582
583#include "wx/panel.h"
584IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow)
585
586#include "wx/msgbxdlg.h"
587#include "wx/textdlg.h"
588#include "wx/filedlg.h"
589#include "wx/dirdlg.h"
590#include "wx/choicdlg.h"
591
47d67540 592#if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW
2bda0e17
KB
593#include "wx/generic/msgdlgg.h"
594IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog)
595#endif
596
597IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog)
598IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog)
599IMPLEMENT_CLASS(wxFileDialog, wxDialog)
600IMPLEMENT_CLASS(wxDirDialog, wxDialog)
601
2049ba38 602#ifdef __WXMSW__
2bda0e17
KB
603IMPLEMENT_CLASS(wxMessageDialog)
604#endif
605
47d67540 606#if wxUSE_GAUGE
2049ba38 607#ifdef __WXMOTIF__
2bda0e17
KB
608#include "../../contrib/xmgauge/gauge.h"
609#endif
610#include "wx_gauge.h"
611IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
612#endif
613
614#include "wx/grid.h"
615IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid, wxPanel)
616
617///// Event tables (also must be in one, statically-linked file for shared libraries)
618
619// This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here
620const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; }
621
622const wxEventTable wxEvtHandler::sm_eventTable =
e146b8c8 623 { NULL, &wxEvtHandler::sm_eventTableEntries[0] };
2bda0e17
KB
624
625const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } };
626
627BEGIN_EVENT_TABLE(wxFrame, wxWindow)
e146b8c8
VZ
628 EVT_ACTIVATE(wxFrame::OnActivate)
629 EVT_SIZE(wxFrame::OnSize)
630 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
2bda0e17
KB
631 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
632 EVT_IDLE(wxFrame::OnIdle)
633 EVT_CLOSE(wxFrame::OnCloseWindow)
634END_EVENT_TABLE()
635
636BEGIN_EVENT_TABLE(wxDialog, wxPanel)
637 EVT_BUTTON(wxID_OK, wxDialog::OnOK)
638 EVT_BUTTON(wxID_APPLY, wxDialog::OnApply)
639 EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel)
640 EVT_CHAR_HOOK(wxDialog::OnCharHook)
641 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
642 EVT_CLOSE(wxDialog::OnCloseWindow)
643END_EVENT_TABLE()
644
645BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler)
646 EVT_CHAR(wxWindow::OnChar)
647 EVT_SIZE(wxWindow::Size)
648 EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground)
649 EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged)
650 EVT_INIT_DIALOG(wxWindow::OnInitDialog)
651 EVT_IDLE(wxWindow::OnIdle)
652END_EVENT_TABLE()
653
654BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow)
655 EVT_SCROLL(wxScrolledWindow::OnScroll)
656 EVT_SIZE(wxScrolledWindow::OnSize)
657 EVT_PAINT(wxScrolledWindow::OnPaint)
658END_EVENT_TABLE()
659
660BEGIN_EVENT_TABLE(wxPanel, wxWindow)
661 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged)
662END_EVENT_TABLE()
663
664BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
e146b8c8
VZ
665 EVT_CHAR(wxTextCtrl::OnChar)
666 EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
2bda0e17
KB
667END_EVENT_TABLE()
668
2049ba38 669#ifdef __WXMSW__
2bda0e17
KB
670BEGIN_EVENT_TABLE(wxMDIParentWindow, wxFrame)
671 EVT_SIZE(wxMDIParentWindow::OnSize)
672 EVT_ACTIVATE(wxMDIParentWindow::OnActivate)
673 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged)
674END_EVENT_TABLE()
675
676BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow)
677 EVT_SCROLL(wxMDIClientWindow::OnScroll)
678END_EVENT_TABLE()
679#endif
680
681BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
682 EVT_SCROLL(wxToolBarBase::OnScroll)
683 EVT_SIZE(wxToolBarBase::OnSize)
684 EVT_IDLE(wxToolBarBase::OnIdle)
685END_EVENT_TABLE()
686
687BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase)
e146b8c8
VZ
688 EVT_SIZE(wxToolBarSimple::OnSize)
689 EVT_PAINT(wxToolBarSimple::OnPaint)
690 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus)
691 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent)
2bda0e17
KB
692END_EVENT_TABLE()
693
2049ba38 694#ifdef __WXMSW__
2bda0e17 695BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase)
e146b8c8
VZ
696 EVT_SIZE(wxToolBarMSW::OnSize)
697 EVT_PAINT(wxToolBarMSW::OnPaint)
698 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent)
2bda0e17
KB
699END_EVENT_TABLE()
700
701BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase)
e146b8c8
VZ
702 EVT_SIZE(wxToolBar95::OnSize)
703 EVT_PAINT(wxToolBar95::OnPaint)
704 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus)
705 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent)
2bda0e17
KB
706 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged)
707END_EVENT_TABLE()
708#endif
709
710BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel)
e146b8c8
VZ
711 EVT_SIZE(wxGenericGrid::OnSize)
712 EVT_PAINT(wxGenericGrid::OnPaint)
713 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent)
2bda0e17
KB
714 EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText)
715 EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll)
716 EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll)
717END_EVENT_TABLE()
718
719BEGIN_EVENT_TABLE(wxControl, wxWindow)
720 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground)
721END_EVENT_TABLE()
722
47d67540 723#if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW
2bda0e17 724BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog)
e146b8c8
VZ
725 EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes)
726 EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo)
727 EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel)
2bda0e17
KB
728END_EVENT_TABLE()
729
730BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog)
e146b8c8
VZ
731 EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom)
732 EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider)
733 EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider)
734 EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider)
735 EVT_PAINT(wxGenericColourDialog::OnPaint)
736 EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent)
2bda0e17
KB
737END_EVENT_TABLE()
738
739BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog)
e146b8c8
VZ
740 EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont)
741 EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont)
742 EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont)
743 EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont)
744 EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont)
745 EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont)
746 EVT_PAINT(wxGenericFontDialog::OnPaint)
2bda0e17
KB
747END_EVENT_TABLE()
748
749BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog)
750 EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK)
751 EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup)
752 EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange)
753END_EVENT_TABLE()
754
755#endif
756
757BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog)
e146b8c8 758 EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK)
2bda0e17
KB
759END_EVENT_TABLE()
760
761BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog)
e146b8c8 762 EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK)
2bda0e17
KB
763END_EVENT_TABLE()
764
765#include "wx/prntbase.h"
766
767BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog)
e146b8c8 768 EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel)
2bda0e17
KB
769END_EVENT_TABLE()
770
771BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow)
e146b8c8
VZ
772 EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose)
773 EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint)
774 EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious)
775 EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext)
776 EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom)
2bda0e17
KB
777END_EVENT_TABLE()
778
779#endif
780
781
782const wxSize wxDefaultSize(-1, -1);
783const wxPoint wxDefaultPosition(-1, -1);