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