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