1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Various data
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
27 #define _MAXPATHLEN 500
29 // Useful buffer, initialized in wxCommonInit
30 char *wxBuffer
= NULL
;
33 wxList wxTopLevelWindows
;
35 // List of windows pending deletion
36 wxList wxPendingDelete
;
38 // Current cursor, in order to hang on to
39 // cursor handle when setting the cursor globally
40 wxCursor
*g_globalCursor
= NULL
;
42 // Message Strings for Internationalization
43 char **wx_msg_str
= (char**)NULL
;
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
;
54 wxBrushList
*wxTheBrushList
= NULL
;
55 wxPenList
*wxThePenList
= NULL
;
56 wxFontList
*wxTheFontList
= NULL
;
57 wxBitmapList
*wxTheBitmapList
= NULL
;
59 wxColourDatabase
*wxTheColourDatabase
= NULL
;
62 wxFont
*wxNORMAL_FONT
;
64 wxFont
*wxITALIC_FONT
;
72 wxPen
*wxTRANSPARENT_PEN
;
73 wxPen
*wxBLACK_DASHED_PEN
;
75 wxPen
*wxMEDIUM_GREY_PEN
;
76 wxPen
*wxLIGHT_GREY_PEN
;
78 wxBrush
*wxBLUE_BRUSH
;
79 wxBrush
*wxGREEN_BRUSH
;
80 wxBrush
*wxWHITE_BRUSH
;
81 wxBrush
*wxBLACK_BRUSH
;
82 wxBrush
*wxTRANSPARENT_BRUSH
;
83 wxBrush
*wxCYAN_BRUSH
;
85 wxBrush
*wxGREY_BRUSH
;
86 wxBrush
*wxMEDIUM_GREY_BRUSH
;
87 wxBrush
*wxLIGHT_GREY_BRUSH
;
95 wxColour
*wxLIGHT_GREY
;
97 wxCursor
*wxSTANDARD_CURSOR
= NULL
;
98 wxCursor
*wxHOURGLASS_CURSOR
= NULL
;
99 wxCursor
*wxCROSS_CURSOR
= NULL
;
102 wxBitmap wxNullBitmap
;
104 wxCursor wxNullCursor
;
107 wxPalette wxNullPalette
;
109 wxColour wxNullColour
;
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";
148 const char *wxFloatToStringStr
= "%.2f";
149 const char *wxDoubleToStringStr
= "%.2f";
152 const char *wxUserResourceStr
= "TEXT";
156 wxPrintPaperDatabase
* wxThePrintPaperDatabase
= NULL
;
159 #if USE_SHARED_LIBRARY
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.
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
;
170 #include "wx/button.h"
171 #include "wx/bmpbuttn.h"
172 IMPLEMENT_DYNAMIC_CLASS(wxButton
, wxControl
)
173 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
, wxButton
)
175 #include "wx/checkbox.h"
176 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox
, wxControl
)
177 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox
, wxCheckBox
)
179 #include "wx/choice.h"
180 IMPLEMENT_DYNAMIC_CLASS(wxChoice
, wxControl
)
183 #include "wx/clipbrd.h"
184 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
185 IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient
, wxObject
)
189 #include "wx/combobox.h"
190 IMPLEMENT_DYNAMIC_CLASS(wxComboBox
, wxControl
)
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
)
204 #if defined(__WINDOWS__)
205 #include "wx/dcprint.h"
206 IMPLEMENT_CLASS(wxPrinterDC
, wxDC
)
209 #include "wx/dialog.h"
210 IMPLEMENT_DYNAMIC_CLASS(wxDialog
, wxWindow
)
212 #include "wx/frame.h"
213 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxWindow
)
216 IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame
, wxFrame
)
217 IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame
, wxFrame
)
218 IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow
, wxWindow
)
220 #include "wx/cmndata.h"
221 IMPLEMENT_DYNAMIC_CLASS(wxColourData
, wxObject
)
222 IMPLEMENT_DYNAMIC_CLASS(wxFontData
, wxObject
)
223 IMPLEMENT_DYNAMIC_CLASS(wxPrintData
, wxObject
)
225 #include "wx/colordlg.h"
226 #include "wx/fontdlg.h"
228 #if !defined(__WINDOWS__) || 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
)
235 // X defines wxColourDialog to be wxGenericColourDialog
237 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
238 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog
, wxDialog
)
241 #include "wx/gdicmn.h"
243 #include "wx/brush.h"
245 #include "wx/palette.h"
247 #include "wx/cursor.h"
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
)
257 IMPLEMENT_DYNAMIC_CLASS(wxPoint
, wxObject
)
258 IMPLEMENT_DYNAMIC_CLASS(wxRealPoint
, wxObject
)
262 IMPLEMENT_DYNAMIC_CLASS(wxHashTable
, wxObject
)
264 #include "wx/helpbase.h"
265 IMPLEMENT_CLASS(wxHelpControllerBase
, wxObject
)
270 #include "wx/msw/helpwin.h"
271 IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController
, wxHelpControllerBase
)
274 // Generic wxHelp controller
275 IMPLEMENT_CLASS(wxXLPHelpController
, wxHelpControllerBase
)
278 IMPLEMENT_CLASS(wxXLPHelpClient
, wxDDEClient
)
279 IMPLEMENT_CLASS(wxXLPHelpConnection
, wxDDEConnection
)
281 IMPLEMENT_CLASS(wxXLPHelpClient
, wxTCPClient
)
282 IMPLEMENT_CLASS(wxXLPHelpConnection
, wxTCPConnection
)
287 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
290 IMPLEMENT_DYNAMIC_CLASS(wxNode
, wxObject
)
291 IMPLEMENT_DYNAMIC_CLASS(wxList
, wxObject
)
292 IMPLEMENT_DYNAMIC_CLASS(wxStringList
, wxList
)
294 #if USE_PRINTING_ARCHITECTURE
295 #include "wx/print.h"
296 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
297 IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase
, wxObject
)
298 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter
, wxPrinterBase
)
299 IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter
, wxPrinterBase
)
300 IMPLEMENT_ABSTRACT_CLASS(wxPrintout
, wxObject
)
301 IMPLEMENT_CLASS(wxPreviewCanvas
, wxWindow
)
302 IMPLEMENT_CLASS(wxPreviewControlBar
, wxWindow
)
303 IMPLEMENT_CLASS(wxPreviewFrame
, wxFrame
)
304 IMPLEMENT_CLASS(wxPrintPreviewBase
, wxObject
)
305 IMPLEMENT_CLASS(wxPostScriptPrintPreview
, wxPrintPreviewBase
)
306 IMPLEMENT_CLASS(wxWindowsPrintPreview
, wxPrintPreviewBase
)
307 IMPLEMENT_CLASS(wxGenericPrintDialog
, wxDialog
)
308 IMPLEMENT_CLASS(wxGenericPrintSetupDialog
, wxDialog
)
312 #include "wx/postscrp.h"
313 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC
, wxDC
)
314 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData
, wxObject
)
315 IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData
, wxObject
)
316 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType
, wxObject
)
317 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase
, wxList
)
321 #include "wx/resource.h"
322 IMPLEMENT_DYNAMIC_CLASS(wxItemResource
, wxObject
)
323 IMPLEMENT_DYNAMIC_CLASS(wxResourceTable
, wxHashTable
)
326 #include "wx/event.h"
327 IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler
, wxObject
)
328 IMPLEMENT_ABSTRACT_CLASS(wxEvent
, wxObject
)
329 IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent
, wxEvent
)
330 IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent
, wxCommandEvent
)
331 IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent
, wxEvent
)
332 IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent
, wxEvent
)
333 IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent
, wxEvent
)
334 IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent
, wxEvent
)
335 IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent
, wxEvent
)
336 IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent
, wxEvent
)
337 IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent
, wxEvent
)
338 IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent
, wxEvent
)
339 IMPLEMENT_DYNAMIC_CLASS(wxShowEvent
, wxEvent
)
340 IMPLEMENT_DYNAMIC_CLASS(wxMaximizeEvent
, wxEvent
)
341 IMPLEMENT_DYNAMIC_CLASS(wxIconizeEvent
, wxEvent
)
342 IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent
, wxEvent
)
343 IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent
, wxEvent
)
344 IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent
, wxEvent
)
345 IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent
, wxEvent
)
346 IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent
, wxEvent
)
347 IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent
, wxEvent
)
348 IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent
, wxEvent
)
349 IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent
, wxEvent
)
351 #include "wx/utils.h"
352 IMPLEMENT_DYNAMIC_CLASS(wxPathList
, wxList
)
354 IMPLEMENT_DYNAMIC_CLASS(wxRect
, wxObject
)
358 IMPLEMENT_DYNAMIC_CLASS(wxDate
, wxObject
)
361 #if USE_DOC_VIEW_ARCHITECTURE
362 #include "wx/docview.h"
363 //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
364 IMPLEMENT_ABSTRACT_CLASS(wxDocument
, wxEvtHandler
)
365 IMPLEMENT_ABSTRACT_CLASS(wxView
, wxEvtHandler
)
366 IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate
, wxObject
)
367 IMPLEMENT_DYNAMIC_CLASS(wxDocManager
, wxEvtHandler
)
368 IMPLEMENT_CLASS(wxDocChildFrame
, wxFrame
)
369 IMPLEMENT_CLASS(wxDocParentFrame
, wxFrame
)
370 #if USE_PRINTING_ARCHITECTURE
371 IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout
, wxPrintout
)
373 IMPLEMENT_CLASS(wxCommand
, wxObject
)
374 IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor
, wxObject
)
375 IMPLEMENT_DYNAMIC_CLASS(wxFileHistory
, wxObject
)
379 #include "wx/layout.h"
380 IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint
, wxObject
)
381 IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints
, wxObject
)
382 IMPLEMENT_DYNAMIC_CLASS(wxSizer
, wxObject
)
383 IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer
, wxSizer
)
387 #include "wx/tbarbase.h"
388 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool
, wxObject
)
389 IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase
, wxControl
)
391 #include "wx/tbarsmpl.h"
392 IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple
, wxToolBarBase
)
395 #include "wx/tbarmsw.h"
396 IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW
, wxToolBarBase
)
398 #include "wx/tbar95.h"
399 IMPLEMENT_DYNAMIC_CLASS(wxToolBar95
, wxToolBarBase
)
404 #include "wx/statusbr.h"
406 IMPLEMENT_DYNAMIC_CLASS(wxStatusBar
, wxWindow
)
408 BEGIN_EVENT_TABLE(wxStatusBar
, wxWindow
)
409 EVT_PAINT(wxStatusBar::OnPaint
)
410 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged
)
415 IMPLEMENT_DYNAMIC_CLASS(wxTime
, wxObject
)
418 #if !USE_GNU_WXSTRING
419 #include "wx/string.h"
420 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
424 IMPLEMENT_DYNAMIC_CLASS(wxXColormap
, wxObject
)
425 IMPLEMENT_DYNAMIC_CLASS(wxXFont
, wxObject
)
426 IMPLEMENT_DYNAMIC_CLASS(wxXCursor
, wxObject
)
428 IMPLEMENT_DYNAMIC_CLASS(wxFont
, wxGDIObject
)
429 IMPLEMENT_DYNAMIC_CLASS(wxPalette
, wxGDIObject
)
430 IMPLEMENT_DYNAMIC_CLASS(wxPen
, wxGDIObject
)
431 IMPLEMENT_DYNAMIC_CLASS(wxBrush
, wxGDIObject
)
432 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxBitmap
)
433 IMPLEMENT_DYNAMIC_CLASS(wxCursor
, wxBitmap
)
434 IMPLEMENT_DYNAMIC_CLASS(wxBitmap
, wxGDIObject
)
435 IMPLEMENT_DYNAMIC_CLASS(wxMask
, wxObject
)
437 // This will presumably be implemented on other platforms too
439 IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler
, wxObject
)
440 IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler
, wxBitmapHandler
)
441 IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler
, wxBitmapHandler
)
442 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler
, wxBitmapHandler
)
443 IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler
, wxBitmapHandler
)
444 IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler
, wxBitmapHandler
)
445 IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler
, wxBitmapHandler
)
448 #include "wx/statbox.h"
449 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
453 IMPLEMENT_CLASS(wxServerBase
, wxObject
)
454 IMPLEMENT_CLASS(wxClientBase
, wxObject
)
455 IMPLEMENT_CLASS(wxConnectionBase
, wxObject
)
457 IMPLEMENT_DYNAMIC_CLASS(wxDDEServer
, wxServerBase
)
458 IMPLEMENT_DYNAMIC_CLASS(wxDDEClient
, wxClientBase
)
459 IMPLEMENT_CLASS(wxDDEConnection
, wxConnectionBase
)
462 IMPLEMENT_ABSTRACT_CLASS(wxControl
, wxWindow
)
464 #include "wx/listbox.h"
465 IMPLEMENT_DYNAMIC_CLASS(wxListBox
, wxControl
)
467 #include "wx/checklst.h"
468 IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox
, wxListBox
)
470 IMPLEMENT_DYNAMIC_CLASS(wxApp
, wxEvtHandler
)
473 IMPLEMENT_DYNAMIC_CLASS(wxMenu
, wxEvtHandler
)
474 IMPLEMENT_DYNAMIC_CLASS(wxMenuItem
, wxObject
)
475 IMPLEMENT_DYNAMIC_CLASS(wxMenuBar
, wxEvtHandler
)
477 #include "wx/stattext.h"
478 #include "wx/statbmp.h"
479 IMPLEMENT_DYNAMIC_CLASS(wxStaticText
, wxControl
)
480 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap
, wxControl
)
483 #include "wx/metafile.h"
484 IMPLEMENT_DYNAMIC_CLASS(wxMetaFile
, wxObject
)
485 IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC
, wxDC
)
488 #include "wx/radiobox.h"
489 #include "wx/radiobut.h"
490 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
492 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton
, wxControl
)
493 // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
495 #include "wx/scrolbar.h"
496 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
498 #if WXWIN_COMPATIBILITY
499 BEGIN_EVENT_TABLE(wxScrollBar
, wxControl
)
500 EVT_SCROLL(wxScrollBar::OnScroll
)
504 #include "wx/slider.h"
505 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
507 #if WXWIN_COMPATIBILITY
508 BEGIN_EVENT_TABLE(wxSlider
, wxControl
)
509 EVT_SCROLL(wxSlider::OnScroll
)
513 #include "wx/timer.h"
514 IMPLEMENT_ABSTRACT_CLASS(wxTimer
, wxObject
)
516 #include "wx/textctrl.h"
517 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl
, wxControl
)
519 #include "wx/window.h"
520 IMPLEMENT_DYNAMIC_CLASS(wxWindow
, wxEvtHandler
)
522 #include "wx/scrolwin.h"
523 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow
, wxWindow
)
525 #include "wx/panel.h"
526 IMPLEMENT_DYNAMIC_CLASS(wxPanel
, wxWindow
)
528 #include "wx/msgbxdlg.h"
529 #include "wx/textdlg.h"
530 #include "wx/filedlg.h"
531 #include "wx/dirdlg.h"
532 #include "wx/choicdlg.h"
534 #if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
535 #include "wx/generic/msgdlgg.h"
536 IMPLEMENT_CLASS(wxGenericMessageDialog
, wxDialog
)
539 IMPLEMENT_CLASS(wxTextEntryDialog
, wxDialog
)
540 IMPLEMENT_CLASS(wxSingleChoiceDialog
, wxDialog
)
541 IMPLEMENT_CLASS(wxFileDialog
, wxDialog
)
542 IMPLEMENT_CLASS(wxDirDialog
, wxDialog
)
545 IMPLEMENT_CLASS(wxMessageDialog
)
550 #include "../../contrib/xmgauge/gauge.h"
552 #include "wx_gauge.h"
553 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
557 IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid
, wxPanel
)
559 ///// Event tables (also must be in one, statically-linked file for shared libraries)
561 // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here
562 const wxEventTable
*wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable
; }
564 const wxEventTable
wxEvtHandler::sm_eventTable
=
565 { NULL
, &wxEvtHandler::sm_eventTableEntries
[0] };
567 const wxEventTableEntry
wxEvtHandler::sm_eventTableEntries
[] = { { 0, 0, 0, NULL
} };
569 BEGIN_EVENT_TABLE(wxFrame
, wxWindow
)
570 EVT_ACTIVATE(wxFrame::OnActivate
)
571 EVT_SIZE(wxFrame::OnSize
)
572 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight
)
573 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged
)
574 EVT_IDLE(wxFrame::OnIdle
)
575 EVT_CLOSE(wxFrame::OnCloseWindow
)
578 BEGIN_EVENT_TABLE(wxDialog
, wxPanel
)
579 EVT_BUTTON(wxID_OK
, wxDialog::OnOK
)
580 EVT_BUTTON(wxID_APPLY
, wxDialog::OnApply
)
581 EVT_BUTTON(wxID_CANCEL
, wxDialog::OnCancel
)
582 EVT_CHAR_HOOK(wxDialog::OnCharHook
)
583 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged
)
584 EVT_CLOSE(wxDialog::OnCloseWindow
)
587 BEGIN_EVENT_TABLE(wxWindow
, wxEvtHandler
)
588 EVT_CHAR(wxWindow::OnChar
)
589 EVT_SIZE(wxWindow::Size
)
590 EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground
)
591 EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged
)
592 EVT_INIT_DIALOG(wxWindow::OnInitDialog
)
593 EVT_IDLE(wxWindow::OnIdle
)
596 BEGIN_EVENT_TABLE(wxScrolledWindow
, wxWindow
)
597 EVT_SCROLL(wxScrolledWindow::OnScroll
)
598 EVT_SIZE(wxScrolledWindow::OnSize
)
599 EVT_PAINT(wxScrolledWindow::OnPaint
)
602 BEGIN_EVENT_TABLE(wxPanel
, wxWindow
)
603 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged
)
606 BEGIN_EVENT_TABLE(wxTextCtrl
, wxControl
)
607 EVT_CHAR(wxTextCtrl::OnChar
)
608 EVT_DROP_FILES(wxTextCtrl::OnDropFiles
)
609 EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground
)
613 BEGIN_EVENT_TABLE(wxMDIParentWindow
, wxFrame
)
614 EVT_SIZE(wxMDIParentWindow::OnSize
)
615 EVT_ACTIVATE(wxMDIParentWindow::OnActivate
)
616 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged
)
619 BEGIN_EVENT_TABLE(wxMDIClientWindow
, wxWindow
)
620 EVT_SCROLL(wxMDIClientWindow::OnScroll
)
624 BEGIN_EVENT_TABLE(wxToolBarBase
, wxControl
)
625 EVT_SCROLL(wxToolBarBase::OnScroll
)
626 EVT_SIZE(wxToolBarBase::OnSize
)
627 EVT_IDLE(wxToolBarBase::OnIdle
)
630 BEGIN_EVENT_TABLE(wxToolBarSimple
, wxToolBarBase
)
631 EVT_SIZE(wxToolBarSimple::OnSize
)
632 EVT_PAINT(wxToolBarSimple::OnPaint
)
633 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus
)
634 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent
)
638 BEGIN_EVENT_TABLE(wxToolBarMSW
, wxToolBarBase
)
639 EVT_SIZE(wxToolBarMSW::OnSize
)
640 EVT_PAINT(wxToolBarMSW::OnPaint
)
641 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent
)
644 BEGIN_EVENT_TABLE(wxToolBar95
, wxToolBarBase
)
645 EVT_SIZE(wxToolBar95::OnSize
)
646 EVT_PAINT(wxToolBar95::OnPaint
)
647 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus
)
648 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent
)
649 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged
)
653 BEGIN_EVENT_TABLE(wxGenericGrid
, wxPanel
)
654 EVT_SIZE(wxGenericGrid::OnSize
)
655 EVT_PAINT(wxGenericGrid::OnPaint
)
656 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent
)
657 EVT_TEXT(wxGRID_TEXT_CTRL
, wxGenericGrid::OnText
)
658 EVT_COMMAND_SCROLL(wxGRID_HSCROLL
, wxGenericGrid::OnGridScroll
)
659 EVT_COMMAND_SCROLL(wxGRID_VSCROLL
, wxGenericGrid::OnGridScroll
)
662 BEGIN_EVENT_TABLE(wxControl
, wxWindow
)
663 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground
)
666 #if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
667 BEGIN_EVENT_TABLE(wxGenericMessageDialog
, wxDialog
)
668 EVT_BUTTON(wxID_YES
, wxGenericMessageDialog::OnYes
)
669 EVT_BUTTON(wxID_NO
, wxGenericMessageDialog::OnNo
)
670 EVT_BUTTON(wxID_CANCEL
, wxGenericMessageDialog::OnCancel
)
673 BEGIN_EVENT_TABLE(wxGenericColourDialog
, wxDialog
)
674 EVT_BUTTON(wxID_ADD_CUSTOM
, wxGenericColourDialog::OnAddCustom
)
675 EVT_SLIDER(wxID_RED_SLIDER
, wxGenericColourDialog::OnRedSlider
)
676 EVT_SLIDER(wxID_GREEN_SLIDER
, wxGenericColourDialog::OnGreenSlider
)
677 EVT_SLIDER(wxID_BLUE_SLIDER
, wxGenericColourDialog::OnBlueSlider
)
678 EVT_PAINT(wxGenericColourDialog::OnPaint
)
679 EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent
)
682 BEGIN_EVENT_TABLE(wxGenericFontDialog
, wxDialog
)
683 EVT_CHECKBOX(wxID_FONT_UNDERLINE
, wxGenericFontDialog::OnChangeFont
)
684 EVT_CHOICE(wxID_FONT_STYLE
, wxGenericFontDialog::OnChangeFont
)
685 EVT_CHOICE(wxID_FONT_WEIGHT
, wxGenericFontDialog::OnChangeFont
)
686 EVT_CHOICE(wxID_FONT_FAMILY
, wxGenericFontDialog::OnChangeFont
)
687 EVT_CHOICE(wxID_FONT_COLOUR
, wxGenericFontDialog::OnChangeFont
)
688 EVT_CHOICE(wxID_FONT_SIZE
, wxGenericFontDialog::OnChangeFont
)
689 EVT_PAINT(wxGenericFontDialog::OnPaint
)
692 BEGIN_EVENT_TABLE(wxGenericPrintDialog
, wxDialog
)
693 EVT_BUTTON(wxID_OK
, wxGenericPrintDialog::OnOK
)
694 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPrintDialog::OnSetup
)
695 EVT_RADIOBOX(wxPRINTID_RANGE
, wxGenericPrintDialog::OnRange
)
700 BEGIN_EVENT_TABLE(wxTextEntryDialog
, wxDialog
)
701 EVT_BUTTON(wxID_OK
, wxTextEntryDialog::OnOK
)
704 BEGIN_EVENT_TABLE(wxSingleChoiceDialog
, wxDialog
)
705 EVT_BUTTON(wxID_OK
, wxSingleChoiceDialog::OnOK
)
708 #include "wx/prntbase.h"
710 BEGIN_EVENT_TABLE(wxPrintAbortDialog
, wxDialog
)
711 EVT_BUTTON(wxID_CANCEL
, wxPrintAbortDialog::OnCancel
)
714 BEGIN_EVENT_TABLE(wxPreviewControlBar
, wxWindow
)
715 EVT_BUTTON(wxID_PREVIEW_CLOSE
, wxPreviewControlBar::OnClose
)
716 EVT_BUTTON(wxID_PREVIEW_PRINT
, wxPreviewControlBar::OnPrint
)
717 EVT_BUTTON(wxID_PREVIEW_PREVIOUS
, wxPreviewControlBar::OnPrevious
)
718 EVT_BUTTON(wxID_PREVIEW_NEXT
, wxPreviewControlBar::OnNext
)
719 EVT_CHOICE(wxID_PREVIEW_ZOOM
, wxPreviewControlBar::OnZoom
)
725 const wxSize
wxDefaultSize(-1, -1);
726 const wxPoint
wxDefaultPosition(-1, -1);