1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
13 // #pragma implementation
17 #include "wx/object.h"
18 #include "wx/window.h"
21 #include "wx/postscrp.h"
23 #define _MAXPATHLEN 500
25 // Used for X resources
28 #include <X11/Xutil.h>
29 #include <X11/Xresource.h>
31 wxResourceCache
*wxTheResourceCache
= (wxResourceCache
*) NULL
;
32 XrmDatabase wxResourceDatabase
;
34 // Useful buffer, initialized in wxCommonInit
35 char *wxBuffer
= (char *) NULL
;
38 wxList wxTopLevelWindows
;
40 // List of windows pending deletion
41 wxList wxPendingDelete
;
43 // Current cursor, in order to hang on to
44 // cursor handle when setting the cursor globally
45 wxCursor
*g_globalCursor
= (wxCursor
*) NULL
;
47 // Don't allow event propagation during drag
48 bool g_blockEventsOnDrag
= FALSE
;
50 // Message Strings for Internationalization
51 char **wx_msg_str
= (char**)NULL
;
53 // Custom OS version, as optionally placed in wx.ini/.wxrc
54 // Currently this can be Win95, Windows, Win32s, WinNT.
55 // For some systems, you can't tell until run-time what services you
56 // have. See wxGetOsVersion, which uses this string if present.
57 char *wxOsVersion
= (char *) NULL
;
59 // For printing several pages
61 wxPrintPaperDatabase
* wxThePrintPaperDatabase
= (wxPrintPaperDatabase
*) NULL
;
64 wxBrushList
*wxTheBrushList
= (wxBrushList
*) NULL
;
65 wxPenList
*wxThePenList
= (wxPenList
*) NULL
;
66 wxFontList
*wxTheFontList
= (wxFontList
*) NULL
;
67 wxColourDatabase
*wxTheColourDatabase
= (wxColourDatabase
*) NULL
;
68 wxBitmapList
*wxTheBitmapList
= (wxBitmapList
*) NULL
;
72 wxFontNameDirectory
*wxTheFontNameDirectory
;
75 wxFont
*wxNORMAL_FONT
;
77 wxFont
*wxITALIC_FONT
;
85 wxPen
*wxTRANSPARENT_PEN
;
86 wxPen
*wxBLACK_DASHED_PEN
;
88 wxPen
*wxMEDIUM_GREY_PEN
;
89 wxPen
*wxLIGHT_GREY_PEN
;
91 wxBrush
*wxBLUE_BRUSH
;
92 wxBrush
*wxGREEN_BRUSH
;
93 wxBrush
*wxWHITE_BRUSH
;
94 wxBrush
*wxBLACK_BRUSH
;
95 wxBrush
*wxTRANSPARENT_BRUSH
;
96 wxBrush
*wxCYAN_BRUSH
;
98 wxBrush
*wxGREY_BRUSH
;
99 wxBrush
*wxMEDIUM_GREY_BRUSH
;
100 wxBrush
*wxLIGHT_GREY_BRUSH
;
104 wxColour
*wxGREY
; // Robert Roebling
109 wxColour
*wxLIGHT_GREY
;
111 wxCursor
*wxSTANDARD_CURSOR
= (wxCursor
*) NULL
;
112 wxCursor
*wxHOURGLASS_CURSOR
= (wxCursor
*) NULL
;
113 wxCursor
*wxCROSS_CURSOR
= (wxCursor
*) NULL
;
116 wxAcceleratorTable wxNullAcceleratorTable
;
117 wxBitmap wxNullBitmap
;
119 wxCursor wxNullCursor
;
123 wxColour wxNullColour
;
124 wxPalette wxNullPalette
;
126 // Default window names
127 const char *wxButtonNameStr
= "button";
128 const char *wxCanvasNameStr
= "canvas";
129 const char *wxCheckBoxNameStr
= "check";
130 const char *wxChoiceNameStr
= "choice";
131 const char *wxComboBoxNameStr
= "comboBox";
132 const char *wxDialogNameStr
= "dialog";
133 const char *wxFrameNameStr
= "frame";
134 const char *wxGaugeNameStr
= "gauge";
135 const char *wxStaticBoxNameStr
= "groupBox";
136 const char *wxListBoxNameStr
= "listBox";
137 const char *wxStaticTextNameStr
= "message";
138 const char *wxStaticBitmapNameStr
= "message";
139 const char *wxMultiTextNameStr
= "multitext";
140 const char *wxPanelNameStr
= "panel";
141 const char *wxRadioBoxNameStr
= "radioBox";
142 const char *wxRadioButtonNameStr
= "radioButton";
143 const char *wxBitmapRadioButtonNameStr
= "radioButton";
144 const char *wxScrollBarNameStr
= "scrollBar";
145 const char *wxSliderNameStr
= "slider";
146 const char *wxStaticNameStr
= "static";
147 const char *wxTextCtrlWindowNameStr
= "textWindow";
148 const char *wxTextCtrlNameStr
= "text";
149 const char *wxVirtListBoxNameStr
= "virtListBox";
150 const char *wxButtonBarNameStr
= "buttonbar";
151 const char *wxEnhDialogNameStr
= "Shell";
152 const char *wxToolBarNameStr
= "toolbar";
153 const char *wxStatusLineNameStr
= "status_line";
154 const char *wxEmptyString
= "";
155 const char *wxGetTextFromUserPromptStr
= "Input Text";
156 const char *wxMessageBoxCaptionStr
= "Message";
157 const char *wxFileSelectorPromptStr
= "Select a file";
158 const char *wxFileSelectorDefaultWildcardStr
= "*.*";
159 const char *wxInternalErrorStr
= "wxWindows Internal Error";
160 const char *wxFatalErrorStr
= "wxWindows Fatal Error";
163 const char *wxFloatToStringStr
= "%.2f";
164 const char *wxDoubleToStringStr
= "%.2f";
167 const char *wxUserResourceStr
= "TEXT";
171 #if USE_SHARED_LIBRARY
173 * For wxWindows to be made into a dynamic library (e.g. Sun),
174 * all IMPLEMENT_... macros must be in one place.
175 * But normally, the definitions are in the appropriate places.
178 // Hand-coded IMPLEMENT... macro for wxObject (define static data)
179 wxClassInfo
wxObject::classwxObject((char *) "wxObject", (char *) NULL
, (char *) NULL
, (int ) sizeof(wxObject
), (wxObjectConstructorFn
) NULL
);
180 wxClassInfo
*wxClassInfo::first
= (wxClassInfo
*) NULL
;
181 wxHashTable
wxClassInfo::classTable(wxKEY_STRING
);
183 #include "wx/button.h"
184 #include "wx/bmpbuttn.h"
185 IMPLEMENT_DYNAMIC_CLASS(wxButton
, wxControl
)
186 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
, wxButton
)
188 #include "wx/checkbox.h"
189 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox
, wxControl
)
190 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox
, wxCheckBox
)
192 #include "wx/choice.h"
193 IMPLEMENT_DYNAMIC_CLASS(wxChoice
, wxControl
)
196 #include "wx/clipbrd.h"
197 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
198 IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient
, wxObject
)
202 #include "wx/combobox.h"
203 IMPLEMENT_DYNAMIC_CLASS(wxComboBox
, wxControl
)
207 #include "wx/dcmemory.h"
208 #include "wx/dcclient.h"
209 #include "wx/dcscreen.h"
210 IMPLEMENT_ABSTRACT_CLASS(wxDC
, wxObject
)
211 IMPLEMENT_DYNAMIC_CLASS(wxClientDC
, wxDC
)
212 IMPLEMENT_DYNAMIC_CLASS(wxWindowDC
, wxDC
)
213 IMPLEMENT_DYNAMIC_CLASS(wxPaintDC
, wxDC
)
214 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
, wxDC
)
215 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC
, wxWindowDC
)
218 #include "wx/dcprint.h"
219 IMPLEMENT_CLASS(wxPrinterDC
, wxDC
)
222 #include "wx/dialog.h"
223 IMPLEMENT_DYNAMIC_CLASS(wxDialog
, wxWindow
)
225 #include "wx/frame.h"
226 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxWindow
)
229 IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame
, wxFrame
)
230 IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame
, wxFrame
)
231 IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow
, wxWindow
)
233 #include "wx/cmndata.h"
234 IMPLEMENT_DYNAMIC_CLASS(wxColourData
, wxObject
)
235 IMPLEMENT_DYNAMIC_CLASS(wxFontData
, wxObject
)
236 IMPLEMENT_DYNAMIC_CLASS(wxPrintData
, wxObject
)
238 #include "wx/colordlg.h"
239 #include "wx/fontdlg.h"
241 #if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
242 #include "wx/generic/colordlg.h"
243 #include "wx/generic/fontdlg.h"
244 IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog
, wxDialog
)
245 IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog
, wxDialog
)
248 // X defines wxColourDialog to be wxGenericColourDialog
250 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
251 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog
, wxDialog
)
254 #include "wx/gdicmn.h"
256 #include "wx/brush.h"
258 #include "wx/palette.h"
260 #include "wx/cursor.h"
262 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
263 IMPLEMENT_CLASS(wxColourDatabase
, wxList
)
264 IMPLEMENT_DYNAMIC_CLASS(wxFontList
, wxList
)
265 IMPLEMENT_DYNAMIC_CLASS(wxPenList
, wxList
)
266 IMPLEMENT_DYNAMIC_CLASS(wxBrushList
, wxList
)
267 IMPLEMENT_DYNAMIC_CLASS(wxBitmapList
, wxList
)
271 IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject)
272 IMPLEMENT_DYNAMIC_CLASS(wxIntPoint, wxObject)
276 #if defined(wx_x) || (defined(wx_msw) && USE_PORTABLE_FONTS_IN_MSW)
277 IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory
, wxObject
)
281 IMPLEMENT_DYNAMIC_CLASS(wxHashTable
, wxObject
)
284 IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance
, wxClient
)
285 IMPLEMENT_CLASS(wxHelpConnection
, wxConnection
)
288 IMPLEMENT_DYNAMIC_CLASS(wxNode
, wxObject
)
289 IMPLEMENT_DYNAMIC_CLASS(wxList
, wxObject
)
290 IMPLEMENT_DYNAMIC_CLASS(wxStringList
, wxList
)
292 #if USE_PRINTING_ARCHITECTURE
293 #include "wx/print.h"
294 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
295 IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase
, wxObject
)
296 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter
, wxPrinterBase
)
297 IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter
, wxPrinterBase
)
298 IMPLEMENT_ABSTRACT_CLASS(wxPrintout
, wxObject
)
299 IMPLEMENT_CLASS(wxPreviewCanvas
, wxWindow
)
300 IMPLEMENT_CLASS(wxPreviewControlBar
, wxWindow
)
301 IMPLEMENT_CLASS(wxPreviewFrame
, wxFrame
)
302 IMPLEMENT_CLASS(wxPrintPreviewBase
, wxObject
)
303 IMPLEMENT_CLASS(wxPostScriptPrintPreview
, wxPrintPreviewBase
)
304 IMPLEMENT_CLASS(wxWindowsPrintPreview
, wxPrintPreviewBase
)
305 IMPLEMENT_CLASS(wxGenericPrintDialog
, wxDialog
)
306 IMPLEMENT_CLASS(wxGenericPrintSetupDialog
, wxDialog
)
310 #include "wx/postscrp.h"
311 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC
, wxDC
)
312 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData
, wxObject
)
313 IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData
, wxObject
)
314 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType
, wxObject
)
315 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase
, wxList
)
319 #include "wx/resource.h"
320 IMPLEMENT_DYNAMIC_CLASS(wxItemResource
, wxObject
)
321 IMPLEMENT_DYNAMIC_CLASS(wxResourceTable
, wxHashTable
)
324 #include "wx/event.h"
325 IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler
, wxObject
)
326 IMPLEMENT_ABSTRACT_CLASS(wxEvent
, wxObject
)
327 IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent
, wxEvent
)
328 IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent
, wxCommandEvent
)
329 IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent
, wxEvent
)
330 IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent
, wxEvent
)
331 IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent
, wxEvent
)
332 IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent
, wxEvent
)
333 IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent
, wxEvent
)
334 IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent
, wxEvent
)
335 IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent
, wxEvent
)
336 IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent
, wxEvent
)
337 IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent
, wxEvent
)
338 IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent
, wxEvent
)
339 IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent
, wxEvent
)
340 IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent
, wxEvent
)
341 IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent
, wxEvent
)
342 IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent
, wxEvent
)
343 IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent
, wxEvent
)
344 IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent
, wxEvent
)
345 IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent
, wxEvent
)
347 #include "wx/utils.h"
348 IMPLEMENT_DYNAMIC_CLASS(wxPathList
, wxList
)
350 // IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject)
352 #include "wx/process.h"
353 IMPLEMENT_DYNAMIC_CLASS(wxProcess
, wxEvtHandler
)
357 IMPLEMENT_DYNAMIC_CLASS(wxDate
, wxObject
)
360 #if USE_DOC_VIEW_ARCHITECTURE
361 #include "wx/docview.h"
362 //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
363 IMPLEMENT_ABSTRACT_CLASS(wxDocument
, wxEvtHandler
)
364 IMPLEMENT_ABSTRACT_CLASS(wxView
, wxEvtHandler
)
365 IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate
, wxObject
)
366 IMPLEMENT_DYNAMIC_CLASS(wxDocManager
, wxEvtHandler
)
367 IMPLEMENT_CLASS(wxDocChildFrame
, wxFrame
)
368 IMPLEMENT_CLASS(wxDocParentFrame
, wxFrame
)
369 #if USE_PRINTING_ARCHITECTURE
370 IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout
, wxPrintout
)
372 IMPLEMENT_CLASS(wxCommand
, wxObject
)
373 IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor
, wxObject
)
374 IMPLEMENT_DYNAMIC_CLASS(wxFileHistory
, wxObject
)
378 #include "wx/layout.h"
379 IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint
, wxObject
)
380 IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints
, wxObject
)
381 IMPLEMENT_DYNAMIC_CLASS(wxSizer
, wxObject
)
382 IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer
, wxSizer
)
386 #include "wx/tbarbase.h"
387 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool
, wxObject
)
388 IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase
, wxControl
)
390 #include "wx/tbarsmpl.h"
391 IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple
, wxToolBarBase
)
394 #include "wx/tbarmsw.h"
395 IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW
, wxToolBarBase
)
397 #include "wx/tbar95.h"
398 IMPLEMENT_DYNAMIC_CLASS(wxToolBar95
, wxToolBarBase
)
403 #include "wx/statusbr.h"
405 IMPLEMENT_DYNAMIC_CLASS(wxStatusBar
, wxWindow
)
407 BEGIN_EVENT_TABLE(wxStatusBar
, wxWindow
)
408 EVT_PAINT(wxStatusBar::OnPaint
)
409 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged
)
414 IMPLEMENT_DYNAMIC_CLASS(wxTime
, wxObject
)
417 #if !USE_GNU_WXSTRING
418 #include "wx/string.h"
419 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
423 IMPLEMENT_DYNAMIC_CLASS(wxXColormap
, wxObject
)
424 IMPLEMENT_DYNAMIC_CLASS(wxXFont
, wxObject
)
425 IMPLEMENT_DYNAMIC_CLASS(wxXCursor
, wxObject
)
427 IMPLEMENT_DYNAMIC_CLASS(wxFont
, wxGDIObject
)
428 IMPLEMENT_DYNAMIC_CLASS(wxPalette
, wxGDIObject
)
429 IMPLEMENT_DYNAMIC_CLASS(wxPen
, wxGDIObject
)
430 IMPLEMENT_DYNAMIC_CLASS(wxBrush
, wxGDIObject
)
431 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxBitmap
)
432 IMPLEMENT_DYNAMIC_CLASS(wxCursor
, wxBitmap
)
433 IMPLEMENT_DYNAMIC_CLASS(wxBitmap
, wxGDIObject
)
434 IMPLEMENT_DYNAMIC_CLASS(wxMask
, wxObject
)
436 // This will presumably be implemented on other platforms too
438 IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler
, wxObject
)
439 IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler
, wxBitmapHandler
)
440 IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler
, wxBitmapHandler
)
441 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler
, wxBitmapHandler
)
442 IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler
, wxBitmapHandler
)
443 IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler
, wxBitmapHandler
)
444 IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler
, wxBitmapHandler
)
447 #include "wx/statbox.h"
448 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
452 IMPLEMENT_ABSTRACT_CLASS(wxDDEObject
, wxObject
)
453 IMPLEMENT_DYNAMIC_CLASS(wxDDEServer
, wxDDEObject
)
454 IMPLEMENT_DYNAMIC_CLASS(wxDDEClient
, wxDDEObject
)
455 IMPLEMENT_CLASS(wxDDEConnection
, wxObject
)
458 IMPLEMENT_ABSTRACT_CLASS(wxControl
, wxWindow
)
460 #include "wx/listbox.h"
461 IMPLEMENT_DYNAMIC_CLASS(wxListBox
, wxControl
)
463 IMPLEMENT_DYNAMIC_CLASS(wxApp
, wxEvtHandler
)
466 IMPLEMENT_DYNAMIC_CLASS(wxMenu
, wxWindow
)
467 IMPLEMENT_DYNAMIC_CLASS(wxMenuItem
, wxObject
)
468 IMPLEMENT_DYNAMIC_CLASS(wxMenuBar
, wxWindow
)
470 #include "wx/stattext.h"
471 #include "wx/statbmp.h"
472 IMPLEMENT_DYNAMIC_CLASS(wxStaticText
, wxControl
)
473 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap
, wxControl
)
476 #include "wx/metafile.h"
477 IMPLEMENT_DYNAMIC_CLASS(wxMetaFile
, wxObject
)
478 IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC
, wxDC
)
481 #include "wx/radiobox.h"
482 #include "wx/radiobut.h"
483 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
485 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton
, wxControl
)
486 // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
488 #include "wx/scrolbar.h"
489 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
491 #if WXWIN_COMPATIBILITY
492 BEGIN_EVENT_TABLE(wxScrollBar
, wxControl
)
493 EVT_SCROLL(wxScrollBar::OnScroll
)
497 #include "wx/slider.h"
498 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
500 #if WXWIN_COMPATIBILITY
501 BEGIN_EVENT_TABLE(wxSlider
, wxControl
)
502 EVT_SCROLL(wxSlider::OnScroll
)
506 #include "wx/timer.h"
507 IMPLEMENT_ABSTRACT_CLASS(wxTimer
, wxObject
)
509 #include "wx/textctrl.h"
510 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl
, wxControl
)
512 #include "wx/window.h"
513 IMPLEMENT_DYNAMIC_CLASS(wxWindow
, wxEvtHandler
)
515 #include "wx/scrolwin.h"
516 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow
, wxWindow
)
518 #include "wx/panel.h"
519 IMPLEMENT_DYNAMIC_CLASS(wxPanel
, wxWindow
)
521 #include "wx/msgbxdlg.h"
522 #include "wx/textdlg.h"
523 #include "wx/filedlg.h"
524 #include "wx/dirdlg.h"
525 #include "wx/choicdlg.h"
527 #if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
528 #include "wx/generic/msgdlgg.h"
529 IMPLEMENT_CLASS(wxGenericMessageDialog
, wxDialog
)
532 IMPLEMENT_CLASS(wxTextEntryDialog
, wxDialog
)
533 IMPLEMENT_CLASS(wxSingleChoiceDialog
, wxDialog
)
534 IMPLEMENT_CLASS(wxFileDialog
, wxDialog
)
535 IMPLEMENT_CLASS(wxDirDialog
, wxDialog
)
538 IMPLEMENT_CLASS(wxMessageDialog
)
543 #include "../../contrib/xmgauge/gauge.h"
545 #include "wx_gauge.h"
546 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
550 IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid
, wxPanel
)
552 ///// Event tables (also must be in one, statically-linked file for shared libraries)
554 // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here
555 const wxEventTable
*wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable
; }
557 const wxEventTable
wxEvtHandler::sm_eventTable
=
558 { NULL
, &wxEvtHandler::sm_eventTableEntries
[0] };
560 const wxEventTableEntry
wxEvtHandler::sm_eventTableEntries
[] = { { 0, 0, 0,
569 BEGIN_EVENT_TABLE(wxFrame
, wxWindow
)
570 EVT_SIZE(wxFrame::OnSize
)
571 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight
)
572 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged
)
573 EVT_IDLE(wxFrame::OnIdle
)
574 EVT_CLOSE(wxFrame::OnCloseWindow
)
577 BEGIN_EVENT_TABLE(wxDialog
, wxPanel
)
578 EVT_BUTTON(wxID_OK
, wxDialog::OnOK
)
579 EVT_BUTTON(wxID_APPLY
, wxDialog::OnApply
)
580 EVT_BUTTON(wxID_CANCEL
, wxDialog::OnCancel
)
581 EVT_CHAR_HOOK(wxDialog::OnCharHook
)
582 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged
)
583 EVT_CLOSE(wxDialog::OnCloseWindow
)
586 BEGIN_EVENT_TABLE(wxWindow
, wxEvtHandler
)
587 EVT_CHAR(wxWindow::OnChar
)
588 EVT_SIZE(wxWindow::Size
)
589 EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground
)
590 EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged
)
591 EVT_INIT_DIALOG(wxWindow::OnInitDialog
)
592 EVT_IDLE(wxWindow::OnIdle
)
595 BEGIN_EVENT_TABLE(wxScrolledWindow
, wxWindow
)
596 EVT_SCROLL(wxScrolledWindow::OnScroll
)
597 EVT_SIZE(wxScrolledWindow::OnSize
)
600 BEGIN_EVENT_TABLE(wxPanel
, wxWindow
)
601 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged
)
604 BEGIN_EVENT_TABLE(wxTextCtrl
, wxControl
)
605 EVT_CHAR(wxTextCtrl::OnChar
)
606 EVT_DROP_FILES(wxTextCtrl::OnDropFiles
)
607 EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground
)
611 BEGIN_EVENT_TABLE(wxMDIParentWindow
, wxFrame
)
612 EVT_SIZE(wxMDIParentWindow::OnSize
)
613 EVT_ACTIVATE(wxMDIParentWindow::OnActivate
)
614 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged
)
617 BEGIN_EVENT_TABLE(wxMDIClientWindow
, wxWindow
)
618 EVT_SCROLL(wxMDIClientWindow::OnScroll
)
622 BEGIN_EVENT_TABLE(wxToolBarBase
, wxControl
)
623 EVT_SCROLL(wxToolBarBase::OnScroll
)
624 EVT_SIZE(wxToolBarBase::OnSize
)
625 EVT_IDLE(wxToolBarBase::OnIdle
)
628 BEGIN_EVENT_TABLE(wxToolBarSimple
, wxToolBarBase
)
629 EVT_SIZE(wxToolBarSimple::OnSize
)
630 EVT_PAINT(wxToolBarSimple::OnPaint
)
631 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus
)
632 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent
)
636 BEGIN_EVENT_TABLE(wxToolBarMSW
, wxToolBarBase
)
637 EVT_SIZE(wxToolBarMSW::OnSize
)
638 EVT_PAINT(wxToolBarMSW::OnPaint
)
639 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent
)
642 BEGIN_EVENT_TABLE(wxToolBar95
, wxToolBarBase
)
643 EVT_SIZE(wxToolBar95::OnSize
)
644 EVT_PAINT(wxToolBar95::OnPaint
)
645 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus
)
646 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent
)
647 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged
)
651 BEGIN_EVENT_TABLE(wxGenericGrid
, wxPanel
)
652 EVT_SIZE(wxGenericGrid::OnSize
)
653 EVT_PAINT(wxGenericGrid::OnPaint
)
654 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent
)
655 EVT_TEXT(wxGRID_TEXT_CTRL
, wxGenericGrid::OnText
)
656 EVT_COMMAND_SCROLL(wxGRID_HSCROLL
, wxGenericGrid::OnGridScroll
)
657 EVT_COMMAND_SCROLL(wxGRID_VSCROLL
, wxGenericGrid::OnGridScroll
)
660 BEGIN_EVENT_TABLE(wxControl
, wxWindow
)
661 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground
)
664 #if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
665 BEGIN_EVENT_TABLE(wxGenericMessageDialog
, wxDialog
)
666 EVT_BUTTON(wxID_YES
, wxGenericMessageDialog::OnYes
)
667 EVT_BUTTON(wxID_NO
, wxGenericMessageDialog::OnNo
)
668 EVT_BUTTON(wxID_CANCEL
, wxGenericMessageDialog::OnCancel
)
671 BEGIN_EVENT_TABLE(wxGenericColourDialog
, wxDialog
)
672 EVT_BUTTON(wxID_ADD_CUSTOM
, wxGenericColourDialog::OnAddCustom
)
673 EVT_SLIDER(wxID_RED_SLIDER
, wxGenericColourDialog::OnRedSlider
)
674 EVT_SLIDER(wxID_GREEN_SLIDER
, wxGenericColourDialog::OnGreenSlider
)
675 EVT_SLIDER(wxID_BLUE_SLIDER
, wxGenericColourDialog::OnBlueSlider
)
676 EVT_PAINT(wxGenericColourDialog::OnPaint
)
677 EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent
)
680 BEGIN_EVENT_TABLE(wxGenericFontDialog
, wxDialog
)
681 EVT_CHECKBOX(wxID_FONT_UNDERLINE
, wxGenericFontDialog::OnChangeFont
)
682 EVT_CHOICE(wxID_FONT_STYLE
, wxGenericFontDialog::OnChangeFont
)
683 EVT_CHOICE(wxID_FONT_WEIGHT
, wxGenericFontDialog::OnChangeFont
)
684 EVT_CHOICE(wxID_FONT_FAMILY
, wxGenericFontDialog::OnChangeFont
)
685 EVT_CHOICE(wxID_FONT_COLOUR
, wxGenericFontDialog::OnChangeFont
)
686 EVT_CHOICE(wxID_FONT_SIZE
, wxGenericFontDialog::OnChangeFont
)
687 EVT_PAINT(wxGenericFontDialog::OnPaint
)
690 BEGIN_EVENT_TABLE(wxGenericPrintDialog
, wxDialog
)
691 EVT_BUTTON(wxID_OK
, wxGenericPrintDialog::OnOK
)
692 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPrintDialog::OnSetup
)
693 EVT_RADIOBOX(wxPRINTID_RANGE
, wxGenericPrintDialog::OnRange
)
698 BEGIN_EVENT_TABLE(wxTextEntryDialog
, wxDialog
)
699 EVT_BUTTON(wxID_OK
, wxTextEntryDialog::OnOK
)
702 BEGIN_EVENT_TABLE(wxSingleChoiceDialog
, wxDialog
)
703 EVT_BUTTON(wxID_OK
, wxSingleChoiceDialog::OnOK
)
706 #include "wx/prntbase.h"
708 BEGIN_EVENT_TABLE(wxPrintAbortDialog
, wxDialog
)
709 EVT_BUTTON(wxID_CANCEL
, wxPrintAbortDialog::OnCancel
)
712 BEGIN_EVENT_TABLE(wxPreviewControlBar
, wxWindow
)
713 EVT_BUTTON(wxID_PREVIEW_CLOSE
, wxPreviewControlBar::OnClose
)
714 EVT_BUTTON(wxID_PREVIEW_PRINT
, wxPreviewControlBar::OnPrint
)
715 EVT_BUTTON(wxID_PREVIEW_PREVIOUS
, wxPreviewControlBar::OnPrevious
)
716 EVT_BUTTON(wxID_PREVIEW_NEXT
, wxPreviewControlBar::OnNext
)
717 EVT_CHOICE(wxID_PREVIEW_ZOOM
, wxPreviewControlBar::OnZoom
)
723 const wxSize
wxDefaultSize(-1, -1);
724 const wxPoint
wxDefaultPosition(-1, -1);