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