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