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