1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
13 // #pragma implementation
18 #define _MAXPATHLEN 500
20 // Used for X resources
23 #include <X11/Xutil.h>
24 #include <X11/Xresource.h>
26 wxList
wxResourceCache(wxKEY_STRING
);
27 XrmDatabase wxResourceDatabase
;
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 // Don't allow event propagation during drag
43 bool g_blockEventsOnDrag
= FALSE
;
45 // Message Strings for Internationalization
46 char **wx_msg_str
= (char**)NULL
;
48 // Custom OS version, as optionally placed in wx.ini/.wxrc
49 // Currently this can be Win95, Windows, Win32s, WinNT.
50 // For some systems, you can't tell until run-time what services you
51 // have. See wxGetOsVersion, which uses this string if present.
52 char *wxOsVersion
= NULL
;
54 // For printing several pages
56 wxPrintPaperDatabase
* wxThePrintPaperDatabase
= NULL
;
59 wxBrushList
*wxTheBrushList
= NULL
;
60 wxPenList
*wxThePenList
= NULL
;
61 wxFontList
*wxTheFontList
= NULL
;
62 wxColourDatabase
*wxTheColourDatabase
= NULL
;
63 wxBitmapList
*wxTheBitmapList
= NULL
;
67 wxFontNameDirectory wxTheFontNameDirectory
;
70 wxFont
*wxNORMAL_FONT
;
72 wxFont
*wxITALIC_FONT
;
80 wxPen
*wxTRANSPARENT_PEN
;
81 wxPen
*wxBLACK_DASHED_PEN
;
83 wxPen
*wxMEDIUM_GREY_PEN
;
84 wxPen
*wxLIGHT_GREY_PEN
;
86 wxBrush
*wxBLUE_BRUSH
;
87 wxBrush
*wxGREEN_BRUSH
;
88 wxBrush
*wxWHITE_BRUSH
;
89 wxBrush
*wxBLACK_BRUSH
;
90 wxBrush
*wxTRANSPARENT_BRUSH
;
91 wxBrush
*wxCYAN_BRUSH
;
93 wxBrush
*wxGREY_BRUSH
;
94 wxBrush
*wxMEDIUM_GREY_BRUSH
;
95 wxBrush
*wxLIGHT_GREY_BRUSH
;
99 wxColour
*wxGREY
; // Robert Roebling
104 wxColour
*wxLIGHT_GREY
;
106 wxCursor
*wxSTANDARD_CURSOR
= NULL
;
107 wxCursor
*wxHOURGLASS_CURSOR
= NULL
;
108 wxCursor
*wxCROSS_CURSOR
= NULL
;
111 wxBitmap wxNullBitmap
;
113 wxCursor wxNullCursor
;
117 wxColour wxNullColour
;
118 wxPalette wxNullPalette
;
120 // Default window names
121 const char *wxButtonNameStr
= "button";
122 const char *wxCanvasNameStr
= "canvas";
123 const char *wxCheckBoxNameStr
= "check";
124 const char *wxChoiceNameStr
= "choice";
125 const char *wxComboBoxNameStr
= "comboBox";
126 const char *wxDialogNameStr
= "dialog";
127 const char *wxFrameNameStr
= "frame";
128 const char *wxGaugeNameStr
= "gauge";
129 const char *wxStaticBoxNameStr
= "groupBox";
130 const char *wxListBoxNameStr
= "listBox";
131 const char *wxStaticTextNameStr
= "message";
132 const char *wxStaticBitmapNameStr
= "message";
133 const char *wxMultiTextNameStr
= "multitext";
134 const char *wxPanelNameStr
= "panel";
135 const char *wxRadioBoxNameStr
= "radioBox";
136 const char *wxRadioButtonNameStr
= "radioButton";
137 const char *wxBitmapRadioButtonNameStr
= "radioButton";
138 const char *wxScrollBarNameStr
= "scrollBar";
139 const char *wxSliderNameStr
= "slider";
140 const char *wxStaticNameStr
= "static";
141 const char *wxTextCtrlWindowNameStr
= "textWindow";
142 const char *wxTextCtrlNameStr
= "text";
143 const char *wxVirtListBoxNameStr
= "virtListBox";
144 const char *wxButtonBarNameStr
= "buttonbar";
145 const char *wxEnhDialogNameStr
= "Shell";
146 const char *wxToolBarNameStr
= "toolbar";
147 const char *wxStatusLineNameStr
= "status_line";
148 const char *wxEmptyString
= "";
149 const char *wxGetTextFromUserPromptStr
= "Input Text";
150 const char *wxMessageBoxCaptionStr
= "Message";
151 const char *wxFileSelectorPromptStr
= "Select a file";
152 const char *wxFileSelectorDefaultWildcardStr
= "*.*";
153 const char *wxInternalErrorStr
= "wxWindows Internal Error";
154 const char *wxFatalErrorStr
= "wxWindows Fatal Error";
157 const char *wxFloatToStringStr
= "%.2f";
158 const char *wxDoubleToStringStr
= "%.2f";
161 const char *wxUserResourceStr
= "TEXT";
165 #if USE_SHARED_LIBRARY
167 * For wxWindows to be made into a dynamic library (e.g. Sun),
168 * all IMPLEMENT_... macros must be in one place.
169 * But normally, the definitions are in the appropriate places.
172 // Hand-coded IMPLEMENT... macro for wxObject (define static data)
173 wxClassInfo
wxObject::classwxObject("wxObject", NULL
, NULL
, sizeof(wxObject
), NULL
);
174 wxClassInfo
*wxClassInfo::first
= NULL
;
176 #include "wx/button.h"
177 #include "wx/bmpbuttn.h"
178 IMPLEMENT_DYNAMIC_CLASS(wxButton
, wxControl
)
179 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
, wxButton
)
181 #include "wx/checkbox.h"
182 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox
, wxControl
)
183 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox
, wxCheckBox
)
185 #include "wx/choice.h"
186 IMPLEMENT_DYNAMIC_CLASS(wxChoice
, wxControl
)
189 #include "wx/clipbrd.h"
190 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
191 IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient
, wxObject
)
195 #include "wx/combobox.h"
196 IMPLEMENT_DYNAMIC_CLASS(wxComboBox
, wxControl
)
200 #include "wx/dcmemory.h"
201 #include "wx/dcclient.h"
202 #include "wx/dcscreen.h"
203 IMPLEMENT_ABSTRACT_CLASS(wxDC
, wxObject
)
204 IMPLEMENT_DYNAMIC_CLASS(wxClientDC
, wxDC
)
205 IMPLEMENT_DYNAMIC_CLASS(wxWindowDC
, wxDC
)
206 IMPLEMENT_DYNAMIC_CLASS(wxPaintDC
, wxDC
)
207 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
, wxDC
)
208 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC
, wxWindowDC
)
211 #include "wx/dcprint.h"
212 IMPLEMENT_CLASS(wxPrinterDC
, wxDC
)
215 #include "wx/dialog.h"
216 IMPLEMENT_DYNAMIC_CLASS(wxDialog
, wxWindow
)
218 #include "wx/frame.h"
219 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxWindow
)
222 IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame
, wxFrame
)
223 IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame
, wxFrame
)
224 IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow
, wxWindow
)
226 #include "wx/cmndata.h"
227 IMPLEMENT_DYNAMIC_CLASS(wxColourData
, wxObject
)
228 IMPLEMENT_DYNAMIC_CLASS(wxFontData
, wxObject
)
229 IMPLEMENT_DYNAMIC_CLASS(wxPrintData
, wxObject
)
231 #include "wx/colordlg.h"
232 #include "wx/fontdlg.h"
234 #if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
235 #include "wx/generic/colordlg.h"
236 #include "wx/generic/fontdlg.h"
237 IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog
, wxDialog
)
238 IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog
, wxDialog
)
241 // X defines wxColourDialog to be wxGenericColourDialog
243 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
244 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog
, wxDialog
)
247 #include "wx/gdicmn.h"
249 #include "wx/brush.h"
251 #include "wx/palette.h"
253 #include "wx/cursor.h"
255 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
256 IMPLEMENT_CLASS(wxColourDatabase
, wxList
)
257 IMPLEMENT_DYNAMIC_CLASS(wxFontList
, wxList
)
258 IMPLEMENT_DYNAMIC_CLASS(wxPenList
, wxList
)
259 IMPLEMENT_DYNAMIC_CLASS(wxBrushList
, wxList
)
260 IMPLEMENT_DYNAMIC_CLASS(wxBitmapList
, wxList
)
263 IMPLEMENT_DYNAMIC_CLASS(wxPoint
, wxObject
)
264 IMPLEMENT_DYNAMIC_CLASS(wxIntPoint
, wxObject
)
267 #if defined(wx_x) || (defined(wx_msw) && USE_PORTABLE_FONTS_IN_MSW)
268 IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory
, wxObject
)
272 IMPLEMENT_DYNAMIC_CLASS(wxHashTable
, wxObject
)
275 IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance
, wxClient
)
276 IMPLEMENT_CLASS(wxHelpConnection
, wxConnection
)
279 IMPLEMENT_DYNAMIC_CLASS(wxNode
, wxObject
)
280 IMPLEMENT_DYNAMIC_CLASS(wxList
, wxObject
)
281 IMPLEMENT_DYNAMIC_CLASS(wxStringList
, wxList
)
283 #if USE_PRINTING_ARCHITECTURE
284 #include "wx/print.h"
285 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
286 IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase
, wxObject
)
287 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter
, wxPrinterBase
)
288 IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter
, wxPrinterBase
)
289 IMPLEMENT_ABSTRACT_CLASS(wxPrintout
, wxObject
)
290 IMPLEMENT_CLASS(wxPreviewCanvas
, wxWindow
)
291 IMPLEMENT_CLASS(wxPreviewControlBar
, wxWindow
)
292 IMPLEMENT_CLASS(wxPreviewFrame
, wxFrame
)
293 IMPLEMENT_CLASS(wxPrintPreviewBase
, wxObject
)
294 IMPLEMENT_CLASS(wxPostScriptPrintPreview
, wxPrintPreviewBase
)
295 IMPLEMENT_CLASS(wxWindowsPrintPreview
, wxPrintPreviewBase
)
296 IMPLEMENT_CLASS(wxGenericPrintDialog
, wxDialog
)
297 IMPLEMENT_CLASS(wxGenericPrintSetupDialog
, wxDialog
)
301 #include "wx/postscrp.h"
302 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC
, wxDC
)
303 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData
, wxObject
)
304 IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData
, wxObject
)
305 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType
, wxObject
)
306 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase
, wxList
)
310 #include "wx/resource.h"
311 IMPLEMENT_DYNAMIC_CLASS(wxItemResource
, wxObject
)
312 IMPLEMENT_DYNAMIC_CLASS(wxResourceTable
, wxHashTable
)
315 #include "wx/event.h"
316 IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler
, wxObject
)
317 IMPLEMENT_ABSTRACT_CLASS(wxEvent
, wxObject
)
318 IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent
, wxEvent
)
319 IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent
, wxCommandEvent
)
320 IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent
, wxEvent
)
321 IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent
, wxEvent
)
322 IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent
, wxEvent
)
323 IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent
, wxEvent
)
324 IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent
, wxEvent
)
325 IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent
, wxEvent
)
326 IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent
, wxEvent
)
327 IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent
, wxEvent
)
328 IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent
, wxEvent
)
329 IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent
, wxEvent
)
330 IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent
, wxEvent
)
331 IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent
, wxEvent
)
332 IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent
, wxEvent
)
333 IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent
, wxEvent
)
334 IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent
, wxEvent
)
335 IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent
, wxEvent
)
336 IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent
, wxEvent
)
338 #include "wx/utils.h"
339 IMPLEMENT_DYNAMIC_CLASS(wxPathList
, wxList
)
341 IMPLEMENT_DYNAMIC_CLASS(wxRect
, wxObject
)
343 #include "wx/process.h"
344 IMPLEMENT_DYNAMIC_CLASS(wxProcess
, wxEvtHandler
)
348 IMPLEMENT_DYNAMIC_CLASS(wxDate
, wxObject
)
351 #if USE_DOC_VIEW_ARCHITECTURE
352 #include "wx/docview.h"
353 //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
354 IMPLEMENT_ABSTRACT_CLASS(wxDocument
, wxEvtHandler
)
355 IMPLEMENT_ABSTRACT_CLASS(wxView
, wxEvtHandler
)
356 IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate
, wxObject
)
357 IMPLEMENT_DYNAMIC_CLASS(wxDocManager
, wxEvtHandler
)
358 IMPLEMENT_CLASS(wxDocChildFrame
, wxFrame
)
359 IMPLEMENT_CLASS(wxDocParentFrame
, wxFrame
)
360 #if USE_PRINTING_ARCHITECTURE
361 IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout
, wxPrintout
)
363 IMPLEMENT_CLASS(wxCommand
, wxObject
)
364 IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor
, wxObject
)
365 IMPLEMENT_DYNAMIC_CLASS(wxFileHistory
, wxObject
)
369 #include "wx/layout.h"
370 IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint
, wxObject
)
371 IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints
, wxObject
)
372 IMPLEMENT_DYNAMIC_CLASS(wxSizer
, wxObject
)
373 IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer
, wxSizer
)
377 #include "wx/tbarbase.h"
378 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool
, wxObject
)
379 IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase
, wxControl
)
381 #include "wx/tbarsmpl.h"
382 IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple
, wxToolBarBase
)
385 #include "wx/tbarmsw.h"
386 IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW
, wxToolBarBase
)
388 #include "wx/tbar95.h"
389 IMPLEMENT_DYNAMIC_CLASS(wxToolBar95
, wxToolBarBase
)
394 #include "wx/statusbr.h"
396 IMPLEMENT_DYNAMIC_CLASS(wxStatusBar
, wxWindow
)
398 BEGIN_EVENT_TABLE(wxStatusBar
, wxWindow
)
399 EVT_PAINT(wxStatusBar::OnPaint
)
400 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged
)
405 IMPLEMENT_DYNAMIC_CLASS(wxTime
, wxObject
)
408 #if !USE_GNU_WXSTRING
409 #include "wx/string.h"
410 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
414 IMPLEMENT_DYNAMIC_CLASS(wxXColormap
, wxObject
)
415 IMPLEMENT_DYNAMIC_CLASS(wxXFont
, wxObject
)
416 IMPLEMENT_DYNAMIC_CLASS(wxXCursor
, wxObject
)
418 IMPLEMENT_DYNAMIC_CLASS(wxFont
, wxGDIObject
)
419 IMPLEMENT_DYNAMIC_CLASS(wxPalette
, wxGDIObject
)
420 IMPLEMENT_DYNAMIC_CLASS(wxPen
, wxGDIObject
)
421 IMPLEMENT_DYNAMIC_CLASS(wxBrush
, wxGDIObject
)
422 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxBitmap
)
423 IMPLEMENT_DYNAMIC_CLASS(wxCursor
, wxBitmap
)
424 IMPLEMENT_DYNAMIC_CLASS(wxBitmap
, wxGDIObject
)
425 IMPLEMENT_DYNAMIC_CLASS(wxMask
, wxObject
)
427 // This will presumably be implemented on other platforms too
429 IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler
, wxObject
)
430 IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler
, wxBitmapHandler
)
431 IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler
, wxBitmapHandler
)
432 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler
, wxBitmapHandler
)
433 IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler
, wxBitmapHandler
)
434 IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler
, wxBitmapHandler
)
435 IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler
, wxBitmapHandler
)
438 #include "wx/statbox.h"
439 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
443 IMPLEMENT_ABSTRACT_CLASS(wxDDEObject
, wxObject
)
444 IMPLEMENT_DYNAMIC_CLASS(wxDDEServer
, wxDDEObject
)
445 IMPLEMENT_DYNAMIC_CLASS(wxDDEClient
, wxDDEObject
)
446 IMPLEMENT_CLASS(wxDDEConnection
, wxObject
)
449 IMPLEMENT_ABSTRACT_CLASS(wxControl
, wxWindow
)
451 #include "wx/listbox.h"
452 IMPLEMENT_DYNAMIC_CLASS(wxListBox
, wxControl
)
454 IMPLEMENT_DYNAMIC_CLASS(wxApp
, wxEvtHandler
)
457 IMPLEMENT_DYNAMIC_CLASS(wxMenu
, wxWindow
)
458 IMPLEMENT_DYNAMIC_CLASS(wxMenuItem
, wxObject
)
459 IMPLEMENT_DYNAMIC_CLASS(wxMenuBar
, wxWindow
)
461 #include "wx/stattext.h"
462 #include "wx/statbmp.h"
463 IMPLEMENT_DYNAMIC_CLASS(wxStaticText
, wxControl
)
464 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap
, wxControl
)
467 #include "wx/metafile.h"
468 IMPLEMENT_DYNAMIC_CLASS(wxMetaFile
, wxObject
)
469 IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC
, wxDC
)
472 #include "wx/radiobox.h"
473 #include "wx/radiobut.h"
474 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
476 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton
, wxControl
)
477 // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
479 #include "wx/scrolbar.h"
480 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
482 #if WXWIN_COMPATIBILITY
483 BEGIN_EVENT_TABLE(wxScrollBar
, wxControl
)
484 EVT_SCROLL(wxScrollBar::OnScroll
)
488 #include "wx/slider.h"
489 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
491 #if WXWIN_COMPATIBILITY
492 BEGIN_EVENT_TABLE(wxSlider
, wxControl
)
493 EVT_SCROLL(wxSlider::OnScroll
)
497 #include "wx/timer.h"
498 IMPLEMENT_ABSTRACT_CLASS(wxTimer
, wxObject
)
500 #include "wx/textctrl.h"
501 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl
, wxControl
)
503 #include "wx/window.h"
504 IMPLEMENT_DYNAMIC_CLASS(wxWindow
, wxEvtHandler
)
506 #include "wx/scrolwin.h"
507 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow
, wxWindow
)
509 #include "wx/panel.h"
510 IMPLEMENT_DYNAMIC_CLASS(wxPanel
, wxWindow
)
512 #include "wx/msgbxdlg.h"
513 #include "wx/textdlg.h"
514 #include "wx/filedlg.h"
515 #include "wx/dirdlg.h"
516 #include "wx/choicdlg.h"
518 #if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
519 #include "wx/generic/msgdlgg.h"
520 IMPLEMENT_CLASS(wxGenericMessageDialog
, wxDialog
)
523 IMPLEMENT_CLASS(wxTextEntryDialog
, wxDialog
)
524 IMPLEMENT_CLASS(wxSingleChoiceDialog
, wxDialog
)
525 IMPLEMENT_CLASS(wxFileDialog
, wxDialog
)
526 IMPLEMENT_CLASS(wxDirDialog
, wxDialog
)
529 IMPLEMENT_CLASS(wxMessageDialog
)
534 #include "../../contrib/xmgauge/gauge.h"
536 #include "wx_gauge.h"
537 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
541 IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid
, wxPanel
)
543 ///// Event tables (also must be in one, statically-linked file for shared libraries)
545 // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here
546 const wxEventTable
*wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable
; }
548 const wxEventTable
wxEvtHandler::sm_eventTable
=
549 { NULL
, &wxEvtHandler::sm_eventTableEntries
[0] };
551 const wxEventTableEntry
wxEvtHandler::sm_eventTableEntries
[] = { { 0, 0, 0, NULL
} };
553 BEGIN_EVENT_TABLE(wxFrame
, wxWindow
)
554 EVT_ACTIVATE(wxFrame::OnActivate
)
555 EVT_SIZE(wxFrame::OnSize
)
556 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight
)
557 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged
)
558 EVT_IDLE(wxFrame::OnIdle
)
559 EVT_CLOSE(wxFrame::OnCloseWindow
)
562 BEGIN_EVENT_TABLE(wxDialog
, wxPanel
)
563 EVT_BUTTON(wxID_OK
, wxDialog::OnOK
)
564 EVT_BUTTON(wxID_APPLY
, wxDialog::OnApply
)
565 EVT_BUTTON(wxID_CANCEL
, wxDialog::OnCancel
)
566 EVT_CHAR_HOOK(wxDialog::OnCharHook
)
567 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged
)
568 EVT_CLOSE(wxDialog::OnCloseWindow
)
571 BEGIN_EVENT_TABLE(wxWindow
, wxEvtHandler
)
572 EVT_CHAR(wxWindow::OnChar
)
573 EVT_SIZE(wxWindow::Size
)
574 EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground
)
575 EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged
)
576 EVT_INIT_DIALOG(wxWindow::OnInitDialog
)
577 EVT_IDLE(wxWindow::OnIdle
)
580 BEGIN_EVENT_TABLE(wxScrolledWindow
, wxWindow
)
581 EVT_SCROLL(wxScrolledWindow::OnScroll
)
582 EVT_SIZE(wxScrolledWindow::OnSize
)
585 BEGIN_EVENT_TABLE(wxPanel
, wxWindow
)
586 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged
)
589 BEGIN_EVENT_TABLE(wxTextCtrl
, wxControl
)
590 EVT_CHAR(wxTextCtrl::OnChar
)
591 EVT_DROP_FILES(wxTextCtrl::OnDropFiles
)
592 EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground
)
596 BEGIN_EVENT_TABLE(wxMDIParentWindow
, wxFrame
)
597 EVT_SIZE(wxMDIParentWindow::OnSize
)
598 EVT_ACTIVATE(wxMDIParentWindow::OnActivate
)
599 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged
)
602 BEGIN_EVENT_TABLE(wxMDIClientWindow
, wxWindow
)
603 EVT_SCROLL(wxMDIClientWindow::OnScroll
)
607 BEGIN_EVENT_TABLE(wxToolBarBase
, wxControl
)
608 EVT_SCROLL(wxToolBarBase::OnScroll
)
609 EVT_SIZE(wxToolBarBase::OnSize
)
610 EVT_IDLE(wxToolBarBase::OnIdle
)
613 BEGIN_EVENT_TABLE(wxToolBarSimple
, wxToolBarBase
)
614 EVT_SIZE(wxToolBarSimple::OnSize
)
615 EVT_PAINT(wxToolBarSimple::OnPaint
)
616 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus
)
617 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent
)
621 BEGIN_EVENT_TABLE(wxToolBarMSW
, wxToolBarBase
)
622 EVT_SIZE(wxToolBarMSW::OnSize
)
623 EVT_PAINT(wxToolBarMSW::OnPaint
)
624 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent
)
627 BEGIN_EVENT_TABLE(wxToolBar95
, wxToolBarBase
)
628 EVT_SIZE(wxToolBar95::OnSize
)
629 EVT_PAINT(wxToolBar95::OnPaint
)
630 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus
)
631 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent
)
632 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged
)
636 BEGIN_EVENT_TABLE(wxGenericGrid
, wxPanel
)
637 EVT_SIZE(wxGenericGrid::OnSize
)
638 EVT_PAINT(wxGenericGrid::OnPaint
)
639 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent
)
640 EVT_TEXT(wxGRID_TEXT_CTRL
, wxGenericGrid::OnText
)
641 EVT_COMMAND_SCROLL(wxGRID_HSCROLL
, wxGenericGrid::OnGridScroll
)
642 EVT_COMMAND_SCROLL(wxGRID_VSCROLL
, wxGenericGrid::OnGridScroll
)
645 BEGIN_EVENT_TABLE(wxControl
, wxWindow
)
646 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground
)
649 #if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
650 BEGIN_EVENT_TABLE(wxGenericMessageDialog
, wxDialog
)
651 EVT_BUTTON(wxID_YES
, wxGenericMessageDialog::OnYes
)
652 EVT_BUTTON(wxID_NO
, wxGenericMessageDialog::OnNo
)
653 EVT_BUTTON(wxID_CANCEL
, wxGenericMessageDialog::OnCancel
)
656 BEGIN_EVENT_TABLE(wxGenericColourDialog
, wxDialog
)
657 EVT_BUTTON(wxID_ADD_CUSTOM
, wxGenericColourDialog::OnAddCustom
)
658 EVT_SLIDER(wxID_RED_SLIDER
, wxGenericColourDialog::OnRedSlider
)
659 EVT_SLIDER(wxID_GREEN_SLIDER
, wxGenericColourDialog::OnGreenSlider
)
660 EVT_SLIDER(wxID_BLUE_SLIDER
, wxGenericColourDialog::OnBlueSlider
)
661 EVT_PAINT(wxGenericColourDialog::OnPaint
)
662 EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent
)
665 BEGIN_EVENT_TABLE(wxGenericFontDialog
, wxDialog
)
666 EVT_CHECKBOX(wxID_FONT_UNDERLINE
, wxGenericFontDialog::OnChangeFont
)
667 EVT_CHOICE(wxID_FONT_STYLE
, wxGenericFontDialog::OnChangeFont
)
668 EVT_CHOICE(wxID_FONT_WEIGHT
, wxGenericFontDialog::OnChangeFont
)
669 EVT_CHOICE(wxID_FONT_FAMILY
, wxGenericFontDialog::OnChangeFont
)
670 EVT_CHOICE(wxID_FONT_COLOUR
, wxGenericFontDialog::OnChangeFont
)
671 EVT_CHOICE(wxID_FONT_SIZE
, wxGenericFontDialog::OnChangeFont
)
672 EVT_PAINT(wxGenericFontDialog::OnPaint
)
675 BEGIN_EVENT_TABLE(wxGenericPrintDialog
, wxDialog
)
676 EVT_BUTTON(wxID_OK
, wxGenericPrintDialog::OnOK
)
677 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPrintDialog::OnSetup
)
678 EVT_RADIOBOX(wxPRINTID_RANGE
, wxGenericPrintDialog::OnRange
)
683 BEGIN_EVENT_TABLE(wxTextEntryDialog
, wxDialog
)
684 EVT_BUTTON(wxID_OK
, wxTextEntryDialog::OnOK
)
687 BEGIN_EVENT_TABLE(wxSingleChoiceDialog
, wxDialog
)
688 EVT_BUTTON(wxID_OK
, wxSingleChoiceDialog::OnOK
)
691 #include "wx/prntbase.h"
693 BEGIN_EVENT_TABLE(wxPrintAbortDialog
, wxDialog
)
694 EVT_BUTTON(wxID_CANCEL
, wxPrintAbortDialog::OnCancel
)
697 BEGIN_EVENT_TABLE(wxPreviewControlBar
, wxWindow
)
698 EVT_BUTTON(wxID_PREVIEW_CLOSE
, wxPreviewControlBar::OnClose
)
699 EVT_BUTTON(wxID_PREVIEW_PRINT
, wxPreviewControlBar::OnPrint
)
700 EVT_BUTTON(wxID_PREVIEW_PREVIOUS
, wxPreviewControlBar::OnPrevious
)
701 EVT_BUTTON(wxID_PREVIEW_NEXT
, wxPreviewControlBar::OnNext
)
702 EVT_CHOICE(wxID_PREVIEW_ZOOM
, wxPreviewControlBar::OnZoom
)
708 const wxSize
wxDefaultSize(-1, -1);
709 const wxPoint
wxDefaultPosition(-1, -1);