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 wxUSE_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) || wxUSE_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) && wxUSE_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 wxUSE_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
)
318 #if wxUSE_WX_RESOURCES
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 wxUSE_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 wxUSE_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
)
377 #if wxUSE_CONSTRAINTS
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/sckaddr.h"
405 IMPLEMENT_DYNAMIC_CLASS(wxIPV4address
, wxSockAddress
)
407 IMPLEMENT_DYNAMIC_CLASS(wxIPV6address
, wxSockAddress
)
410 IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress
, wxSockAddress
)
413 #include "wx/socket.h"
415 IMPLEMENT_CLASS(wxSocketBase
, wxEvtHandler
)
416 IMPLEMENT_CLASS(wxSocketClient
, wxSocketBase
)
417 IMPLEMENT_CLASS(wxSocketServer
, wxSocketBase
)
418 IMPLEMENT_CLASS(wxSocketHandler
, wxObject
)
419 IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent
, wxEvent
)
423 IMPLEMENT_CLASS(wxProtoInfo
, wxObject
)
424 IMPLEMENT_CLASS(wxURL
, wxObject
)
426 #include "wx/protocol/http.h"
428 IMPLEMENT_DYNAMIC_CLASS(wxHTTP
, wxProtocol
)
429 IMPLEMENT_PROTOCOL(wxHTTP
, "http", "80", TRUE
)
431 #include "wx/protocol/ftp.h"
433 IMPLEMENT_DYNAMIC_CLASS(wxFTP
, wxProtocol
)
434 IMPLEMENT_PROTOCOL(wxFTP
, "ftp", "21", TRUE
)
436 #include "wx/protocol/sckfile.h"
438 IMPLEMENT_DYNAMIC_CLASS(wxFileProto
, wxProtocol
)
439 IMPLEMENT_PROTOCOL(wxFileProto
, "file", NULL
, FALSE
)
441 #include "wx/sckipc.h"
443 IMPLEMENT_DYNAMIC_CLASS(wxTCPServer
, wxServerBase
)
444 IMPLEMENT_DYNAMIC_CLASS(wxTCPClient
, wxClientBase
)
445 IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection
, wxConnectionBase
)
447 #include "wx/statusbr.h"
449 IMPLEMENT_DYNAMIC_CLASS(wxStatusBar
, wxWindow
)
451 BEGIN_EVENT_TABLE(wxStatusBar
, wxWindow
)
452 EVT_PAINT(wxStatusBar::OnPaint
)
453 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged
)
458 IMPLEMENT_DYNAMIC_CLASS(wxTime
, wxObject
)
461 #if !USE_GNU_WXSTRING
462 #include "wx/string.h"
463 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
467 IMPLEMENT_DYNAMIC_CLASS(wxXColormap
, wxObject
)
468 IMPLEMENT_DYNAMIC_CLASS(wxXFont
, wxObject
)
469 IMPLEMENT_DYNAMIC_CLASS(wxXCursor
, wxObject
)
471 IMPLEMENT_DYNAMIC_CLASS(wxFont
, wxGDIObject
)
472 IMPLEMENT_DYNAMIC_CLASS(wxPalette
, wxGDIObject
)
473 IMPLEMENT_DYNAMIC_CLASS(wxPen
, wxGDIObject
)
474 IMPLEMENT_DYNAMIC_CLASS(wxBrush
, wxGDIObject
)
475 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxBitmap
)
476 IMPLEMENT_DYNAMIC_CLASS(wxCursor
, wxBitmap
)
477 IMPLEMENT_DYNAMIC_CLASS(wxBitmap
, wxGDIObject
)
478 IMPLEMENT_DYNAMIC_CLASS(wxMask
, wxObject
)
480 // This will presumably be implemented on other platforms too
482 IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler
, wxObject
)
483 IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler
, wxBitmapHandler
)
484 IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler
, wxBitmapHandler
)
485 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler
, wxBitmapHandler
)
486 IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler
, wxBitmapHandler
)
487 IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler
, wxBitmapHandler
)
488 IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler
, wxBitmapHandler
)
491 #include "wx/statbox.h"
492 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
496 IMPLEMENT_ABSTRACT_CLASS(wxDDEObject
, wxObject
)
497 IMPLEMENT_DYNAMIC_CLASS(wxDDEServer
, wxDDEObject
)
498 IMPLEMENT_DYNAMIC_CLASS(wxDDEClient
, wxDDEObject
)
499 IMPLEMENT_CLASS(wxDDEConnection
, wxObject
)
502 IMPLEMENT_ABSTRACT_CLASS(wxControl
, wxWindow
)
504 #include "wx/listbox.h"
505 IMPLEMENT_DYNAMIC_CLASS(wxListBox
, wxControl
)
507 IMPLEMENT_DYNAMIC_CLASS(wxApp
, wxEvtHandler
)
510 IMPLEMENT_DYNAMIC_CLASS(wxMenu
, wxWindow
)
511 IMPLEMENT_DYNAMIC_CLASS(wxMenuItem
, wxObject
)
512 IMPLEMENT_DYNAMIC_CLASS(wxMenuBar
, wxWindow
)
514 #include "wx/stattext.h"
515 #include "wx/statbmp.h"
516 IMPLEMENT_DYNAMIC_CLASS(wxStaticText
, wxControl
)
517 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap
, wxControl
)
520 #include "wx/metafile.h"
521 IMPLEMENT_DYNAMIC_CLASS(wxMetaFile
, wxObject
)
522 IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC
, wxDC
)
525 #include "wx/radiobox.h"
526 #include "wx/radiobut.h"
527 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
529 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton
, wxControl
)
530 // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
532 #include "wx/scrolbar.h"
533 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
535 #if WXWIN_COMPATIBILITY
536 BEGIN_EVENT_TABLE(wxScrollBar
, wxControl
)
537 EVT_SCROLL(wxScrollBar::OnScroll
)
541 #include "wx/slider.h"
542 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
544 #if WXWIN_COMPATIBILITY
545 BEGIN_EVENT_TABLE(wxSlider
, wxControl
)
546 EVT_SCROLL(wxSlider::OnScroll
)
550 #include "wx/timer.h"
551 IMPLEMENT_ABSTRACT_CLASS(wxTimer
, wxObject
)
553 #include "wx/textctrl.h"
554 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl
, wxControl
)
556 #include "wx/window.h"
557 IMPLEMENT_DYNAMIC_CLASS(wxWindow
, wxEvtHandler
)
559 #include "wx/scrolwin.h"
560 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow
, wxWindow
)
562 #include "wx/panel.h"
563 IMPLEMENT_DYNAMIC_CLASS(wxPanel
, wxWindow
)
565 #include "wx/msgbxdlg.h"
566 #include "wx/textdlg.h"
567 #include "wx/filedlg.h"
568 #include "wx/dirdlg.h"
569 #include "wx/choicdlg.h"
571 #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
572 #include "wx/generic/msgdlgg.h"
573 IMPLEMENT_CLASS(wxGenericMessageDialog
, wxDialog
)
576 IMPLEMENT_CLASS(wxTextEntryDialog
, wxDialog
)
577 IMPLEMENT_CLASS(wxSingleChoiceDialog
, wxDialog
)
578 IMPLEMENT_CLASS(wxFileDialog
, wxDialog
)
579 IMPLEMENT_CLASS(wxDirDialog
, wxDialog
)
582 IMPLEMENT_CLASS(wxMessageDialog
)
587 #include "../../contrib/xmgauge/gauge.h"
589 #include "wx_gauge.h"
590 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
594 IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid
, wxPanel
)
596 ///// Event tables (also must be in one, statically-linked file for shared libraries)
598 // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here
599 const wxEventTable
*wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable
; }
601 const wxEventTable
wxEvtHandler::sm_eventTable
=
602 { NULL
, &wxEvtHandler::sm_eventTableEntries
[0] };
604 const wxEventTableEntry
wxEvtHandler::sm_eventTableEntries
[] = { { 0, 0, 0,
613 BEGIN_EVENT_TABLE(wxFrame
, wxWindow
)
614 EVT_SIZE(wxFrame::OnSize
)
615 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight
)
616 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged
)
617 EVT_IDLE(wxFrame::OnIdle
)
618 EVT_CLOSE(wxFrame::OnCloseWindow
)
621 BEGIN_EVENT_TABLE(wxDialog
, wxPanel
)
622 EVT_BUTTON(wxID_OK
, wxDialog::OnOK
)
623 EVT_BUTTON(wxID_APPLY
, wxDialog::OnApply
)
624 EVT_BUTTON(wxID_CANCEL
, wxDialog::OnCancel
)
625 EVT_CHAR_HOOK(wxDialog::OnCharHook
)
626 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged
)
627 EVT_CLOSE(wxDialog::OnCloseWindow
)
630 BEGIN_EVENT_TABLE(wxWindow
, wxEvtHandler
)
631 EVT_CHAR(wxWindow::OnChar
)
632 EVT_SIZE(wxWindow::Size
)
633 EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground
)
634 EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged
)
635 EVT_INIT_DIALOG(wxWindow::OnInitDialog
)
636 EVT_IDLE(wxWindow::OnIdle
)
639 BEGIN_EVENT_TABLE(wxScrolledWindow
, wxWindow
)
640 EVT_SCROLL(wxScrolledWindow::OnScroll
)
641 EVT_SIZE(wxScrolledWindow::OnSize
)
644 BEGIN_EVENT_TABLE(wxPanel
, wxWindow
)
645 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged
)
648 BEGIN_EVENT_TABLE(wxTextCtrl
, wxControl
)
649 EVT_CHAR(wxTextCtrl::OnChar
)
650 EVT_DROP_FILES(wxTextCtrl::OnDropFiles
)
651 EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground
)
655 BEGIN_EVENT_TABLE(wxMDIParentWindow
, wxFrame
)
656 EVT_SIZE(wxMDIParentWindow::OnSize
)
657 EVT_ACTIVATE(wxMDIParentWindow::OnActivate
)
658 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged
)
661 BEGIN_EVENT_TABLE(wxMDIClientWindow
, wxWindow
)
662 EVT_SCROLL(wxMDIClientWindow::OnScroll
)
666 BEGIN_EVENT_TABLE(wxToolBarBase
, wxControl
)
667 EVT_SCROLL(wxToolBarBase::OnScroll
)
668 EVT_SIZE(wxToolBarBase::OnSize
)
669 EVT_IDLE(wxToolBarBase::OnIdle
)
672 BEGIN_EVENT_TABLE(wxToolBarSimple
, wxToolBarBase
)
673 EVT_SIZE(wxToolBarSimple::OnSize
)
674 EVT_PAINT(wxToolBarSimple::OnPaint
)
675 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus
)
676 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent
)
680 BEGIN_EVENT_TABLE(wxToolBarMSW
, wxToolBarBase
)
681 EVT_SIZE(wxToolBarMSW::OnSize
)
682 EVT_PAINT(wxToolBarMSW::OnPaint
)
683 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent
)
686 BEGIN_EVENT_TABLE(wxToolBar95
, wxToolBarBase
)
687 EVT_SIZE(wxToolBar95::OnSize
)
688 EVT_PAINT(wxToolBar95::OnPaint
)
689 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus
)
690 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent
)
691 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged
)
695 BEGIN_EVENT_TABLE(wxGenericGrid
, wxPanel
)
696 EVT_SIZE(wxGenericGrid::OnSize
)
697 EVT_PAINT(wxGenericGrid::OnPaint
)
698 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent
)
699 EVT_TEXT(wxGRID_TEXT_CTRL
, wxGenericGrid::OnText
)
700 EVT_COMMAND_SCROLL(wxGRID_HSCROLL
, wxGenericGrid::OnGridScroll
)
701 EVT_COMMAND_SCROLL(wxGRID_VSCROLL
, wxGenericGrid::OnGridScroll
)
704 BEGIN_EVENT_TABLE(wxControl
, wxWindow
)
705 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground
)
708 #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
709 BEGIN_EVENT_TABLE(wxGenericMessageDialog
, wxDialog
)
710 EVT_BUTTON(wxID_YES
, wxGenericMessageDialog::OnYes
)
711 EVT_BUTTON(wxID_NO
, wxGenericMessageDialog::OnNo
)
712 EVT_BUTTON(wxID_CANCEL
, wxGenericMessageDialog::OnCancel
)
715 BEGIN_EVENT_TABLE(wxGenericColourDialog
, wxDialog
)
716 EVT_BUTTON(wxID_ADD_CUSTOM
, wxGenericColourDialog::OnAddCustom
)
717 EVT_SLIDER(wxID_RED_SLIDER
, wxGenericColourDialog::OnRedSlider
)
718 EVT_SLIDER(wxID_GREEN_SLIDER
, wxGenericColourDialog::OnGreenSlider
)
719 EVT_SLIDER(wxID_BLUE_SLIDER
, wxGenericColourDialog::OnBlueSlider
)
720 EVT_PAINT(wxGenericColourDialog::OnPaint
)
721 EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent
)
724 BEGIN_EVENT_TABLE(wxGenericFontDialog
, wxDialog
)
725 EVT_CHECKBOX(wxID_FONT_UNDERLINE
, wxGenericFontDialog::OnChangeFont
)
726 EVT_CHOICE(wxID_FONT_STYLE
, wxGenericFontDialog::OnChangeFont
)
727 EVT_CHOICE(wxID_FONT_WEIGHT
, wxGenericFontDialog::OnChangeFont
)
728 EVT_CHOICE(wxID_FONT_FAMILY
, wxGenericFontDialog::OnChangeFont
)
729 EVT_CHOICE(wxID_FONT_COLOUR
, wxGenericFontDialog::OnChangeFont
)
730 EVT_CHOICE(wxID_FONT_SIZE
, wxGenericFontDialog::OnChangeFont
)
731 EVT_PAINT(wxGenericFontDialog::OnPaint
)
734 BEGIN_EVENT_TABLE(wxGenericPrintDialog
, wxDialog
)
735 EVT_BUTTON(wxID_OK
, wxGenericPrintDialog::OnOK
)
736 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPrintDialog::OnSetup
)
737 EVT_RADIOBOX(wxPRINTID_RANGE
, wxGenericPrintDialog::OnRange
)
742 BEGIN_EVENT_TABLE(wxTextEntryDialog
, wxDialog
)
743 EVT_BUTTON(wxID_OK
, wxTextEntryDialog::OnOK
)
746 BEGIN_EVENT_TABLE(wxSingleChoiceDialog
, wxDialog
)
747 EVT_BUTTON(wxID_OK
, wxSingleChoiceDialog::OnOK
)
750 #include "wx/prntbase.h"
752 BEGIN_EVENT_TABLE(wxPrintAbortDialog
, wxDialog
)
753 EVT_BUTTON(wxID_CANCEL
, wxPrintAbortDialog::OnCancel
)
756 BEGIN_EVENT_TABLE(wxPreviewControlBar
, wxWindow
)
757 EVT_BUTTON(wxID_PREVIEW_CLOSE
, wxPreviewControlBar::OnClose
)
758 EVT_BUTTON(wxID_PREVIEW_PRINT
, wxPreviewControlBar::OnPrint
)
759 EVT_BUTTON(wxID_PREVIEW_PREVIOUS
, wxPreviewControlBar::OnPrevious
)
760 EVT_BUTTON(wxID_PREVIEW_NEXT
, wxPreviewControlBar::OnNext
)
761 EVT_CHOICE(wxID_PREVIEW_ZOOM
, wxPreviewControlBar::OnZoom
)
767 const wxSize
wxDefaultSize(-1, -1);
768 const wxPoint
wxDefaultPosition(-1, -1);