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