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