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