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