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