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 wxResourceCache
*wxTheResourceCache
= (wxResourceCache
*) NULL
;
27 XrmDatabase wxResourceDatabase
;
29 // Useful buffer, initialized in wxCommonInit
30 char *wxBuffer
= (char *) 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
= (wxCursor
*) 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
= (char *) NULL
;
54 // For printing several pages
56 wxPrintPaperDatabase
* wxThePrintPaperDatabase
= (wxPrintPaperDatabase
*) NULL
;
59 wxBrushList
*wxTheBrushList
= (wxBrushList
*) NULL
;
60 wxPenList
*wxThePenList
= (wxPenList
*) NULL
;
61 wxFontList
*wxTheFontList
= (wxFontList
*) NULL
;
62 wxColourDatabase
*wxTheColourDatabase
= (wxColourDatabase
*) NULL
;
63 wxBitmapList
*wxTheBitmapList
= (wxBitmapList
*) 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
= (wxCursor
*) NULL
;
107 wxCursor
*wxHOURGLASS_CURSOR
= (wxCursor
*) NULL
;
108 wxCursor
*wxCROSS_CURSOR
= (wxCursor
*) 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((char *) "wxObject", (char *) NULL
, (char *) NULL
, (int ) sizeof(wxObject
), (wxObjectConstructorFn
) NULL
);
174 wxClassInfo
*wxClassInfo::first
= (wxClassInfo
*) NULL
;
175 wxHashTable
wxClassInfo::classTable(wxKEY_STRING
);
177 #include "wx/button.h"
178 #include "wx/bmpbuttn.h"
179 IMPLEMENT_DYNAMIC_CLASS(wxButton
, wxControl
)
180 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
, wxButton
)
182 #include "wx/checkbox.h"
183 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox
, wxControl
)
184 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox
, wxCheckBox
)
186 #include "wx/choice.h"
187 IMPLEMENT_DYNAMIC_CLASS(wxChoice
, wxControl
)
190 #include "wx/clipbrd.h"
191 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
192 IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient
, wxObject
)
196 #include "wx/combobox.h"
197 IMPLEMENT_DYNAMIC_CLASS(wxComboBox
, wxControl
)
201 #include "wx/dcmemory.h"
202 #include "wx/dcclient.h"
203 #include "wx/dcscreen.h"
204 IMPLEMENT_ABSTRACT_CLASS(wxDC
, wxObject
)
205 IMPLEMENT_DYNAMIC_CLASS(wxClientDC
, wxDC
)
206 IMPLEMENT_DYNAMIC_CLASS(wxWindowDC
, wxDC
)
207 IMPLEMENT_DYNAMIC_CLASS(wxPaintDC
, wxDC
)
208 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
, wxDC
)
209 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC
, wxWindowDC
)
212 #include "wx/dcprint.h"
213 IMPLEMENT_CLASS(wxPrinterDC
, wxDC
)
216 #include "wx/dialog.h"
217 IMPLEMENT_DYNAMIC_CLASS(wxDialog
, wxWindow
)
219 #include "wx/frame.h"
220 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxWindow
)
223 IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame
, wxFrame
)
224 IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame
, wxFrame
)
225 IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow
, wxWindow
)
227 #include "wx/cmndata.h"
228 IMPLEMENT_DYNAMIC_CLASS(wxColourData
, wxObject
)
229 IMPLEMENT_DYNAMIC_CLASS(wxFontData
, wxObject
)
230 IMPLEMENT_DYNAMIC_CLASS(wxPrintData
, wxObject
)
232 #include "wx/colordlg.h"
233 #include "wx/fontdlg.h"
235 #if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
236 #include "wx/generic/colordlg.h"
237 #include "wx/generic/fontdlg.h"
238 IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog
, wxDialog
)
239 IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog
, wxDialog
)
242 // X defines wxColourDialog to be wxGenericColourDialog
244 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
245 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog
, wxDialog
)
248 #include "wx/gdicmn.h"
250 #include "wx/brush.h"
252 #include "wx/palette.h"
254 #include "wx/cursor.h"
256 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
257 IMPLEMENT_CLASS(wxColourDatabase
, wxList
)
258 IMPLEMENT_DYNAMIC_CLASS(wxFontList
, wxList
)
259 IMPLEMENT_DYNAMIC_CLASS(wxPenList
, wxList
)
260 IMPLEMENT_DYNAMIC_CLASS(wxBrushList
, wxList
)
261 IMPLEMENT_DYNAMIC_CLASS(wxBitmapList
, wxList
)
265 IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject)
266 IMPLEMENT_DYNAMIC_CLASS(wxIntPoint, wxObject)
270 #if defined(wx_x) || (defined(wx_msw) && USE_PORTABLE_FONTS_IN_MSW)
271 IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory
, wxObject
)
275 IMPLEMENT_DYNAMIC_CLASS(wxHashTable
, wxObject
)
278 IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance
, wxClient
)
279 IMPLEMENT_CLASS(wxHelpConnection
, wxConnection
)
282 IMPLEMENT_DYNAMIC_CLASS(wxNode
, wxObject
)
283 IMPLEMENT_DYNAMIC_CLASS(wxList
, wxObject
)
284 IMPLEMENT_DYNAMIC_CLASS(wxStringList
, wxList
)
286 #if USE_PRINTING_ARCHITECTURE
287 #include "wx/print.h"
288 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
289 IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase
, wxObject
)
290 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter
, wxPrinterBase
)
291 IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter
, wxPrinterBase
)
292 IMPLEMENT_ABSTRACT_CLASS(wxPrintout
, wxObject
)
293 IMPLEMENT_CLASS(wxPreviewCanvas
, wxWindow
)
294 IMPLEMENT_CLASS(wxPreviewControlBar
, wxWindow
)
295 IMPLEMENT_CLASS(wxPreviewFrame
, wxFrame
)
296 IMPLEMENT_CLASS(wxPrintPreviewBase
, wxObject
)
297 IMPLEMENT_CLASS(wxPostScriptPrintPreview
, wxPrintPreviewBase
)
298 IMPLEMENT_CLASS(wxWindowsPrintPreview
, wxPrintPreviewBase
)
299 IMPLEMENT_CLASS(wxGenericPrintDialog
, wxDialog
)
300 IMPLEMENT_CLASS(wxGenericPrintSetupDialog
, wxDialog
)
304 #include "wx/postscrp.h"
305 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC
, wxDC
)
306 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData
, wxObject
)
307 IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData
, wxObject
)
308 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType
, wxObject
)
309 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase
, wxList
)
313 #include "wx/resource.h"
314 IMPLEMENT_DYNAMIC_CLASS(wxItemResource
, wxObject
)
315 IMPLEMENT_DYNAMIC_CLASS(wxResourceTable
, wxHashTable
)
318 #include "wx/event.h"
319 IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler
, wxObject
)
320 IMPLEMENT_ABSTRACT_CLASS(wxEvent
, wxObject
)
321 IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent
, wxEvent
)
322 IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent
, wxCommandEvent
)
323 IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent
, wxEvent
)
324 IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent
, wxEvent
)
325 IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent
, wxEvent
)
326 IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent
, wxEvent
)
327 IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent
, wxEvent
)
328 IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent
, wxEvent
)
329 IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent
, wxEvent
)
330 IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent
, wxEvent
)
331 IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent
, wxEvent
)
332 IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent
, wxEvent
)
333 IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent
, wxEvent
)
334 IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent
, wxEvent
)
335 IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent
, wxEvent
)
336 IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent
, wxEvent
)
337 IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent
, wxEvent
)
338 IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent
, wxEvent
)
339 IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent
, wxEvent
)
341 #include "wx/utils.h"
342 IMPLEMENT_DYNAMIC_CLASS(wxPathList
, wxList
)
344 // IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject)
346 #include "wx/process.h"
347 IMPLEMENT_DYNAMIC_CLASS(wxProcess
, wxEvtHandler
)
351 IMPLEMENT_DYNAMIC_CLASS(wxDate
, wxObject
)
354 #if USE_DOC_VIEW_ARCHITECTURE
355 #include "wx/docview.h"
356 //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
357 IMPLEMENT_ABSTRACT_CLASS(wxDocument
, wxEvtHandler
)
358 IMPLEMENT_ABSTRACT_CLASS(wxView
, wxEvtHandler
)
359 IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate
, wxObject
)
360 IMPLEMENT_DYNAMIC_CLASS(wxDocManager
, wxEvtHandler
)
361 IMPLEMENT_CLASS(wxDocChildFrame
, wxFrame
)
362 IMPLEMENT_CLASS(wxDocParentFrame
, wxFrame
)
363 #if USE_PRINTING_ARCHITECTURE
364 IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout
, wxPrintout
)
366 IMPLEMENT_CLASS(wxCommand
, wxObject
)
367 IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor
, wxObject
)
368 IMPLEMENT_DYNAMIC_CLASS(wxFileHistory
, wxObject
)
372 #include "wx/layout.h"
373 IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint
, wxObject
)
374 IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints
, wxObject
)
375 IMPLEMENT_DYNAMIC_CLASS(wxSizer
, wxObject
)
376 IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer
, wxSizer
)
380 #include "wx/tbarbase.h"
381 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool
, wxObject
)
382 IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase
, wxControl
)
384 #include "wx/tbarsmpl.h"
385 IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple
, wxToolBarBase
)
388 #include "wx/tbarmsw.h"
389 IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW
, wxToolBarBase
)
391 #include "wx/tbar95.h"
392 IMPLEMENT_DYNAMIC_CLASS(wxToolBar95
, wxToolBarBase
)
397 #include "wx/statusbr.h"
399 IMPLEMENT_DYNAMIC_CLASS(wxStatusBar
, wxWindow
)
401 BEGIN_EVENT_TABLE(wxStatusBar
, wxWindow
)
402 EVT_PAINT(wxStatusBar::OnPaint
)
403 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged
)
408 IMPLEMENT_DYNAMIC_CLASS(wxTime
, wxObject
)
411 #if !USE_GNU_WXSTRING
412 #include "wx/string.h"
413 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
417 IMPLEMENT_DYNAMIC_CLASS(wxXColormap
, wxObject
)
418 IMPLEMENT_DYNAMIC_CLASS(wxXFont
, wxObject
)
419 IMPLEMENT_DYNAMIC_CLASS(wxXCursor
, wxObject
)
421 IMPLEMENT_DYNAMIC_CLASS(wxFont
, wxGDIObject
)
422 IMPLEMENT_DYNAMIC_CLASS(wxPalette
, wxGDIObject
)
423 IMPLEMENT_DYNAMIC_CLASS(wxPen
, wxGDIObject
)
424 IMPLEMENT_DYNAMIC_CLASS(wxBrush
, wxGDIObject
)
425 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxBitmap
)
426 IMPLEMENT_DYNAMIC_CLASS(wxCursor
, wxBitmap
)
427 IMPLEMENT_DYNAMIC_CLASS(wxBitmap
, wxGDIObject
)
428 IMPLEMENT_DYNAMIC_CLASS(wxMask
, wxObject
)
430 // This will presumably be implemented on other platforms too
432 IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler
, wxObject
)
433 IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler
, wxBitmapHandler
)
434 IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler
, wxBitmapHandler
)
435 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler
, wxBitmapHandler
)
436 IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler
, wxBitmapHandler
)
437 IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler
, wxBitmapHandler
)
438 IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler
, wxBitmapHandler
)
441 #include "wx/statbox.h"
442 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
446 IMPLEMENT_ABSTRACT_CLASS(wxDDEObject
, wxObject
)
447 IMPLEMENT_DYNAMIC_CLASS(wxDDEServer
, wxDDEObject
)
448 IMPLEMENT_DYNAMIC_CLASS(wxDDEClient
, wxDDEObject
)
449 IMPLEMENT_CLASS(wxDDEConnection
, wxObject
)
452 IMPLEMENT_ABSTRACT_CLASS(wxControl
, wxWindow
)
454 #include "wx/listbox.h"
455 IMPLEMENT_DYNAMIC_CLASS(wxListBox
, wxControl
)
457 IMPLEMENT_DYNAMIC_CLASS(wxApp
, wxEvtHandler
)
460 IMPLEMENT_DYNAMIC_CLASS(wxMenu
, wxWindow
)
461 IMPLEMENT_DYNAMIC_CLASS(wxMenuItem
, wxObject
)
462 IMPLEMENT_DYNAMIC_CLASS(wxMenuBar
, wxWindow
)
464 #include "wx/stattext.h"
465 #include "wx/statbmp.h"
466 IMPLEMENT_DYNAMIC_CLASS(wxStaticText
, wxControl
)
467 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap
, wxControl
)
470 #include "wx/metafile.h"
471 IMPLEMENT_DYNAMIC_CLASS(wxMetaFile
, wxObject
)
472 IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC
, wxDC
)
475 #include "wx/radiobox.h"
476 #include "wx/radiobut.h"
477 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
479 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton
, wxControl
)
480 // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
482 #include "wx/scrolbar.h"
483 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
485 #if WXWIN_COMPATIBILITY
486 BEGIN_EVENT_TABLE(wxScrollBar
, wxControl
)
487 EVT_SCROLL(wxScrollBar::OnScroll
)
491 #include "wx/slider.h"
492 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
494 #if WXWIN_COMPATIBILITY
495 BEGIN_EVENT_TABLE(wxSlider
, wxControl
)
496 EVT_SCROLL(wxSlider::OnScroll
)
500 #include "wx/timer.h"
501 IMPLEMENT_ABSTRACT_CLASS(wxTimer
, wxObject
)
503 #include "wx/textctrl.h"
504 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl
, wxControl
)
506 #include "wx/window.h"
507 IMPLEMENT_DYNAMIC_CLASS(wxWindow
, wxEvtHandler
)
509 #include "wx/scrolwin.h"
510 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow
, wxWindow
)
512 #include "wx/panel.h"
513 IMPLEMENT_DYNAMIC_CLASS(wxPanel
, wxWindow
)
515 #include "wx/msgbxdlg.h"
516 #include "wx/textdlg.h"
517 #include "wx/filedlg.h"
518 #include "wx/dirdlg.h"
519 #include "wx/choicdlg.h"
521 #if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
522 #include "wx/generic/msgdlgg.h"
523 IMPLEMENT_CLASS(wxGenericMessageDialog
, wxDialog
)
526 IMPLEMENT_CLASS(wxTextEntryDialog
, wxDialog
)
527 IMPLEMENT_CLASS(wxSingleChoiceDialog
, wxDialog
)
528 IMPLEMENT_CLASS(wxFileDialog
, wxDialog
)
529 IMPLEMENT_CLASS(wxDirDialog
, wxDialog
)
532 IMPLEMENT_CLASS(wxMessageDialog
)
537 #include "../../contrib/xmgauge/gauge.h"
539 #include "wx_gauge.h"
540 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
544 IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid
, wxPanel
)
546 ///// Event tables (also must be in one, statically-linked file for shared libraries)
548 // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here
549 const wxEventTable
*wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable
; }
551 const wxEventTable
wxEvtHandler::sm_eventTable
=
552 { NULL
, &wxEvtHandler::sm_eventTableEntries
[0] };
554 const wxEventTableEntry
wxEvtHandler::sm_eventTableEntries
[] = { { 0, 0, 0,
563 BEGIN_EVENT_TABLE(wxFrame
, wxWindow
)
564 EVT_SIZE(wxFrame::OnSize
)
565 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight
)
566 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged
)
567 EVT_IDLE(wxFrame::OnIdle
)
568 EVT_CLOSE(wxFrame::OnCloseWindow
)
571 BEGIN_EVENT_TABLE(wxDialog
, wxPanel
)
572 EVT_BUTTON(wxID_OK
, wxDialog::OnOK
)
573 EVT_BUTTON(wxID_APPLY
, wxDialog::OnApply
)
574 EVT_BUTTON(wxID_CANCEL
, wxDialog::OnCancel
)
575 EVT_CHAR_HOOK(wxDialog::OnCharHook
)
576 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged
)
577 EVT_CLOSE(wxDialog::OnCloseWindow
)
580 BEGIN_EVENT_TABLE(wxWindow
, wxEvtHandler
)
581 EVT_CHAR(wxWindow::OnChar
)
582 EVT_SIZE(wxWindow::Size
)
583 EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground
)
584 EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged
)
585 EVT_INIT_DIALOG(wxWindow::OnInitDialog
)
586 EVT_IDLE(wxWindow::OnIdle
)
589 BEGIN_EVENT_TABLE(wxScrolledWindow
, wxWindow
)
590 EVT_SCROLL(wxScrolledWindow::OnScroll
)
591 EVT_SIZE(wxScrolledWindow::OnSize
)
594 BEGIN_EVENT_TABLE(wxPanel
, wxWindow
)
595 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged
)
598 BEGIN_EVENT_TABLE(wxTextCtrl
, wxControl
)
599 EVT_CHAR(wxTextCtrl::OnChar
)
600 EVT_DROP_FILES(wxTextCtrl::OnDropFiles
)
601 EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground
)
605 BEGIN_EVENT_TABLE(wxMDIParentWindow
, wxFrame
)
606 EVT_SIZE(wxMDIParentWindow::OnSize
)
607 EVT_ACTIVATE(wxMDIParentWindow::OnActivate
)
608 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged
)
611 BEGIN_EVENT_TABLE(wxMDIClientWindow
, wxWindow
)
612 EVT_SCROLL(wxMDIClientWindow::OnScroll
)
616 BEGIN_EVENT_TABLE(wxToolBarBase
, wxControl
)
617 EVT_SCROLL(wxToolBarBase::OnScroll
)
618 EVT_SIZE(wxToolBarBase::OnSize
)
619 EVT_IDLE(wxToolBarBase::OnIdle
)
622 BEGIN_EVENT_TABLE(wxToolBarSimple
, wxToolBarBase
)
623 EVT_SIZE(wxToolBarSimple::OnSize
)
624 EVT_PAINT(wxToolBarSimple::OnPaint
)
625 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus
)
626 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent
)
630 BEGIN_EVENT_TABLE(wxToolBarMSW
, wxToolBarBase
)
631 EVT_SIZE(wxToolBarMSW::OnSize
)
632 EVT_PAINT(wxToolBarMSW::OnPaint
)
633 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent
)
636 BEGIN_EVENT_TABLE(wxToolBar95
, wxToolBarBase
)
637 EVT_SIZE(wxToolBar95::OnSize
)
638 EVT_PAINT(wxToolBar95::OnPaint
)
639 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus
)
640 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent
)
641 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged
)
645 BEGIN_EVENT_TABLE(wxGenericGrid
, wxPanel
)
646 EVT_SIZE(wxGenericGrid::OnSize
)
647 EVT_PAINT(wxGenericGrid::OnPaint
)
648 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent
)
649 EVT_TEXT(wxGRID_TEXT_CTRL
, wxGenericGrid::OnText
)
650 EVT_COMMAND_SCROLL(wxGRID_HSCROLL
, wxGenericGrid::OnGridScroll
)
651 EVT_COMMAND_SCROLL(wxGRID_VSCROLL
, wxGenericGrid::OnGridScroll
)
654 BEGIN_EVENT_TABLE(wxControl
, wxWindow
)
655 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground
)
658 #if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
659 BEGIN_EVENT_TABLE(wxGenericMessageDialog
, wxDialog
)
660 EVT_BUTTON(wxID_YES
, wxGenericMessageDialog::OnYes
)
661 EVT_BUTTON(wxID_NO
, wxGenericMessageDialog::OnNo
)
662 EVT_BUTTON(wxID_CANCEL
, wxGenericMessageDialog::OnCancel
)
665 BEGIN_EVENT_TABLE(wxGenericColourDialog
, wxDialog
)
666 EVT_BUTTON(wxID_ADD_CUSTOM
, wxGenericColourDialog::OnAddCustom
)
667 EVT_SLIDER(wxID_RED_SLIDER
, wxGenericColourDialog::OnRedSlider
)
668 EVT_SLIDER(wxID_GREEN_SLIDER
, wxGenericColourDialog::OnGreenSlider
)
669 EVT_SLIDER(wxID_BLUE_SLIDER
, wxGenericColourDialog::OnBlueSlider
)
670 EVT_PAINT(wxGenericColourDialog::OnPaint
)
671 EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent
)
674 BEGIN_EVENT_TABLE(wxGenericFontDialog
, wxDialog
)
675 EVT_CHECKBOX(wxID_FONT_UNDERLINE
, wxGenericFontDialog::OnChangeFont
)
676 EVT_CHOICE(wxID_FONT_STYLE
, wxGenericFontDialog::OnChangeFont
)
677 EVT_CHOICE(wxID_FONT_WEIGHT
, wxGenericFontDialog::OnChangeFont
)
678 EVT_CHOICE(wxID_FONT_FAMILY
, wxGenericFontDialog::OnChangeFont
)
679 EVT_CHOICE(wxID_FONT_COLOUR
, wxGenericFontDialog::OnChangeFont
)
680 EVT_CHOICE(wxID_FONT_SIZE
, wxGenericFontDialog::OnChangeFont
)
681 EVT_PAINT(wxGenericFontDialog::OnPaint
)
684 BEGIN_EVENT_TABLE(wxGenericPrintDialog
, wxDialog
)
685 EVT_BUTTON(wxID_OK
, wxGenericPrintDialog::OnOK
)
686 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPrintDialog::OnSetup
)
687 EVT_RADIOBOX(wxPRINTID_RANGE
, wxGenericPrintDialog::OnRange
)
692 BEGIN_EVENT_TABLE(wxTextEntryDialog
, wxDialog
)
693 EVT_BUTTON(wxID_OK
, wxTextEntryDialog::OnOK
)
696 BEGIN_EVENT_TABLE(wxSingleChoiceDialog
, wxDialog
)
697 EVT_BUTTON(wxID_OK
, wxSingleChoiceDialog::OnOK
)
700 #include "wx/prntbase.h"
702 BEGIN_EVENT_TABLE(wxPrintAbortDialog
, wxDialog
)
703 EVT_BUTTON(wxID_CANCEL
, wxPrintAbortDialog::OnCancel
)
706 BEGIN_EVENT_TABLE(wxPreviewControlBar
, wxWindow
)
707 EVT_BUTTON(wxID_PREVIEW_CLOSE
, wxPreviewControlBar::OnClose
)
708 EVT_BUTTON(wxID_PREVIEW_PRINT
, wxPreviewControlBar::OnPrint
)
709 EVT_BUTTON(wxID_PREVIEW_PREVIOUS
, wxPreviewControlBar::OnPrevious
)
710 EVT_BUTTON(wxID_PREVIEW_NEXT
, wxPreviewControlBar::OnNext
)
711 EVT_CHOICE(wxID_PREVIEW_ZOOM
, wxPreviewControlBar::OnZoom
)
717 const wxSize
wxDefaultSize(-1, -1);
718 const wxPoint
wxDefaultPosition(-1, -1);