1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
12 // #pragma implementation
16 #include "wx/object.h"
17 #include "wx/window.h"
20 #include "wx/postscrp.h"
22 #define _MAXPATHLEN 500
24 // Used for X resources
27 #include <X11/Xutil.h>
28 #include <X11/Xresource.h>
30 wxResourceCache
*wxTheResourceCache
= (wxResourceCache
*) NULL
;
31 XrmDatabase wxResourceDatabase
;
33 // Useful buffer, initialized in wxCommonInit
34 char *wxBuffer
= (char *) NULL
;
37 wxList wxTopLevelWindows
;
39 // List of windows pending deletion
40 wxList wxPendingDelete
;
42 // Current cursor, in order to hang on to
43 // cursor handle when setting the cursor globally
44 wxCursor
*g_globalCursor
= (wxCursor
*) NULL
;
46 // Don't allow event propagation during drag
47 bool g_blockEventsOnDrag
= FALSE
;
49 // Don't allow mouse event propagation during scroll
50 bool g_blockEventsOnScroll
= FALSE
;
52 // Message Strings for Internationalization
53 char **wx_msg_str
= (char**)NULL
;
55 // Custom OS version, as optionally placed in wx.ini/.wxrc
56 // Currently this can be Win95, Windows, Win32s, WinNT.
57 // For some systems, you can't tell until run-time what services you
58 // have. See wxGetOsVersion, which uses this string if present.
59 char *wxOsVersion
= (char *) NULL
;
61 // For printing several pages
63 wxPrintPaperDatabase
* wxThePrintPaperDatabase
= (wxPrintPaperDatabase
*) NULL
;
66 wxBrushList
*wxTheBrushList
= (wxBrushList
*) NULL
;
67 wxPenList
*wxThePenList
= (wxPenList
*) NULL
;
68 wxFontList
*wxTheFontList
= (wxFontList
*) NULL
;
69 wxColourDatabase
*wxTheColourDatabase
= (wxColourDatabase
*) NULL
;
70 wxBitmapList
*wxTheBitmapList
= (wxBitmapList
*) NULL
;
74 wxFontNameDirectory
*wxTheFontNameDirectory
;
77 wxFont
*wxNORMAL_FONT
;
79 wxFont
*wxITALIC_FONT
;
87 wxPen
*wxTRANSPARENT_PEN
;
88 wxPen
*wxBLACK_DASHED_PEN
;
90 wxPen
*wxMEDIUM_GREY_PEN
;
91 wxPen
*wxLIGHT_GREY_PEN
;
93 wxBrush
*wxBLUE_BRUSH
;
94 wxBrush
*wxGREEN_BRUSH
;
95 wxBrush
*wxWHITE_BRUSH
;
96 wxBrush
*wxBLACK_BRUSH
;
97 wxBrush
*wxTRANSPARENT_BRUSH
;
98 wxBrush
*wxCYAN_BRUSH
;
100 wxBrush
*wxGREY_BRUSH
;
101 wxBrush
*wxMEDIUM_GREY_BRUSH
;
102 wxBrush
*wxLIGHT_GREY_BRUSH
;
106 wxColour
*wxGREY
; // Robert Roebling
111 wxColour
*wxLIGHT_GREY
;
113 wxCursor
*wxSTANDARD_CURSOR
= (wxCursor
*) NULL
;
114 wxCursor
*wxHOURGLASS_CURSOR
= (wxCursor
*) NULL
;
115 wxCursor
*wxCROSS_CURSOR
= (wxCursor
*) NULL
;
118 wxAcceleratorTable wxNullAcceleratorTable
;
119 wxBitmap wxNullBitmap
;
121 wxCursor wxNullCursor
;
125 wxColour wxNullColour
;
126 wxPalette wxNullPalette
;
127 wxRegion wxNullRegion
;
129 // Default window names
130 const char *wxButtonNameStr
= "button";
131 const char *wxCanvasNameStr
= "canvas";
132 const char *wxCheckBoxNameStr
= "check";
133 const char *wxChoiceNameStr
= "choice";
134 const char *wxComboBoxNameStr
= "comboBox";
135 const char *wxDialogNameStr
= "dialog";
136 const char *wxFrameNameStr
= "frame";
137 const char *wxGaugeNameStr
= "gauge";
138 const char *wxStaticBoxNameStr
= "groupBox";
139 const char *wxListBoxNameStr
= "listBox";
140 const char *wxStaticTextNameStr
= "message";
141 const char *wxStaticBitmapNameStr
= "message";
142 const char *wxMultiTextNameStr
= "multitext";
143 const char *wxPanelNameStr
= "panel";
144 const char *wxRadioBoxNameStr
= "radioBox";
145 const char *wxRadioButtonNameStr
= "radioButton";
146 const char *wxBitmapRadioButtonNameStr
= "radioButton";
147 const char *wxScrollBarNameStr
= "scrollBar";
148 const char *wxSliderNameStr
= "slider";
149 const char *wxStaticNameStr
= "static";
150 const char *wxTextCtrlWindowNameStr
= "textWindow";
151 const char *wxTextCtrlNameStr
= "text";
152 const char *wxVirtListBoxNameStr
= "virtListBox";
153 const char *wxButtonBarNameStr
= "buttonbar";
154 const char *wxEnhDialogNameStr
= "Shell";
155 const char *wxToolBarNameStr
= "toolbar";
156 const char *wxStatusLineNameStr
= "status_line";
157 const char *wxEmptyString
= "";
158 const char *wxGetTextFromUserPromptStr
= "Input Text";
159 const char *wxMessageBoxCaptionStr
= "Message";
160 const char *wxFileSelectorPromptStr
= "Select a file";
161 const char *wxFileSelectorDefaultWildcardStr
= "*.*";
162 const char *wxInternalErrorStr
= "wxWindows Internal Error";
163 const char *wxFatalErrorStr
= "wxWindows Fatal Error";
166 const char *wxFloatToStringStr
= "%.2f";
167 const char *wxDoubleToStringStr
= "%.2f";
170 const char *wxUserResourceStr
= "TEXT";
174 #if wxUSE_SHARED_LIBRARY
176 * For wxWindows to be made into a dynamic library (e.g. Sun),
177 * all IMPLEMENT_... macros must be in one place.
178 * But normally, the definitions are in the appropriate places.
181 // Hand-coded IMPLEMENT... macro for wxObject (define static data)
182 wxClassInfo
wxObject::classwxObject((char *) "wxObject", (char *) NULL
, (char *) NULL
, (int ) sizeof(wxObject
), (wxObjectConstructorFn
) NULL
);
183 wxClassInfo
*wxClassInfo::first
= (wxClassInfo
*) NULL
;
184 wxHashTable
wxClassInfo::classTable(wxKEY_STRING
);
186 #include "wx/button.h"
187 #include "wx/bmpbuttn.h"
188 IMPLEMENT_DYNAMIC_CLASS(wxButton
, wxControl
)
189 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
, wxButton
)
191 #include "wx/checkbox.h"
192 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox
, wxControl
)
193 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox
, wxCheckBox
)
195 #include "wx/choice.h"
196 IMPLEMENT_DYNAMIC_CLASS(wxChoice
, wxControl
)
199 #include "wx/clipbrd.h"
200 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
201 IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient
, wxObject
)
205 #include "wx/combobox.h"
206 IMPLEMENT_DYNAMIC_CLASS(wxComboBox
, wxControl
)
210 #include "wx/dcmemory.h"
211 #include "wx/dcclient.h"
212 #include "wx/dcscreen.h"
213 IMPLEMENT_ABSTRACT_CLASS(wxDC
, wxObject
)
214 IMPLEMENT_DYNAMIC_CLASS(wxClientDC
, wxDC
)
215 IMPLEMENT_DYNAMIC_CLASS(wxWindowDC
, wxDC
)
216 IMPLEMENT_DYNAMIC_CLASS(wxPaintDC
, wxDC
)
217 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
, wxDC
)
218 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC
, wxWindowDC
)
221 #include "wx/dcprint.h"
222 IMPLEMENT_CLASS(wxPrinterDC
, wxDC
)
225 #include "wx/dialog.h"
226 IMPLEMENT_DYNAMIC_CLASS(wxDialog
, wxWindow
)
228 #include "wx/frame.h"
229 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxWindow
)
232 IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame
, wxFrame
)
233 IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame
, wxFrame
)
234 IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow
, wxWindow
)
236 #include "wx/cmndata.h"
237 IMPLEMENT_DYNAMIC_CLASS(wxColourData
, wxObject
)
238 IMPLEMENT_DYNAMIC_CLASS(wxFontData
, wxObject
)
239 IMPLEMENT_DYNAMIC_CLASS(wxPrintData
, wxObject
)
241 #include "wx/colordlg.h"
242 #include "wx/fontdlg.h"
244 #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
245 #include "wx/generic/colordlg.h"
246 #include "wx/generic/fontdlg.h"
247 IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog
, wxDialog
)
248 IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog
, wxDialog
)
251 // X defines wxColourDialog to be wxGenericColourDialog
253 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
254 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog
, wxDialog
)
257 #include "wx/gdicmn.h"
259 #include "wx/brush.h"
261 #include "wx/palette.h"
263 #include "wx/cursor.h"
265 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
266 IMPLEMENT_CLASS(wxColourDatabase
, wxList
)
267 IMPLEMENT_DYNAMIC_CLASS(wxFontList
, wxList
)
268 IMPLEMENT_DYNAMIC_CLASS(wxPenList
, wxList
)
269 IMPLEMENT_DYNAMIC_CLASS(wxBrushList
, wxList
)
270 IMPLEMENT_DYNAMIC_CLASS(wxBitmapList
, wxList
)
274 IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject)
275 IMPLEMENT_DYNAMIC_CLASS(wxIntPoint, wxObject)
279 #if defined(wx_x) || (defined(wx_msw) && wxUSE_PORTABLE_FONTS_IN_MSW)
280 IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory
, wxObject
)
284 IMPLEMENT_DYNAMIC_CLASS(wxHashTable
, wxObject
)
287 IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance
, wxClient
)
288 IMPLEMENT_CLASS(wxHelpConnection
, wxConnection
)
291 IMPLEMENT_DYNAMIC_CLASS(wxNode
, wxObject
)
292 IMPLEMENT_DYNAMIC_CLASS(wxList
, wxObject
)
293 IMPLEMENT_DYNAMIC_CLASS(wxStringList
, wxList
)
295 #if wxUSE_PRINTING_ARCHITECTURE
296 #include "wx/print.h"
297 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
298 IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase
, wxObject
)
299 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter
, wxPrinterBase
)
300 IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter
, wxPrinterBase
)
301 IMPLEMENT_ABSTRACT_CLASS(wxPrintout
, wxObject
)
302 IMPLEMENT_CLASS(wxPreviewCanvas
, wxWindow
)
303 IMPLEMENT_CLASS(wxPreviewControlBar
, wxWindow
)
304 IMPLEMENT_CLASS(wxPreviewFrame
, wxFrame
)
305 IMPLEMENT_CLASS(wxPrintPreviewBase
, wxObject
)
306 IMPLEMENT_CLASS(wxPostScriptPrintPreview
, wxPrintPreviewBase
)
307 IMPLEMENT_CLASS(wxWindowsPrintPreview
, wxPrintPreviewBase
)
308 IMPLEMENT_CLASS(wxGenericPrintDialog
, wxDialog
)
309 IMPLEMENT_CLASS(wxGenericPrintSetupDialog
, wxDialog
)
313 #include "wx/postscrp.h"
314 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC
, wxDC
)
315 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData
, wxObject
)
316 IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData
, wxObject
)
317 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType
, wxObject
)
318 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase
, wxList
)
321 #if wxUSE_WX_RESOURCES
322 #include "wx/resource.h"
323 IMPLEMENT_DYNAMIC_CLASS(wxItemResource
, wxObject
)
324 IMPLEMENT_DYNAMIC_CLASS(wxResourceTable
, wxHashTable
)
327 #include "wx/event.h"
328 IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler
, wxObject
)
329 IMPLEMENT_ABSTRACT_CLASS(wxEvent
, wxObject
)
330 IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent
, wxEvent
)
331 IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent
, wxCommandEvent
)
332 IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent
, wxEvent
)
333 IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent
, wxEvent
)
334 IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent
, wxEvent
)
335 IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent
, wxEvent
)
336 IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent
, wxEvent
)
337 IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent
, wxEvent
)
338 IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent
, wxEvent
)
339 IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent
, wxEvent
)
340 IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent
, wxEvent
)
341 IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent
, wxEvent
)
342 IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent
, wxEvent
)
343 IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent
, wxEvent
)
344 IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent
, wxEvent
)
345 IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent
, wxEvent
)
346 IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent
, wxEvent
)
347 IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent
, wxEvent
)
348 IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent
, wxEvent
)
350 #include "wx/utils.h"
351 IMPLEMENT_DYNAMIC_CLASS(wxPathList
, wxList
)
353 // IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject)
355 #include "wx/process.h"
356 IMPLEMENT_DYNAMIC_CLASS(wxProcess
, wxEvtHandler
)
360 IMPLEMENT_DYNAMIC_CLASS(wxDate
, wxObject
)
363 #if wxUSE_DOC_VIEW_ARCHITECTURE
364 #include "wx/docview.h"
365 //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
366 IMPLEMENT_ABSTRACT_CLASS(wxDocument
, wxEvtHandler
)
367 IMPLEMENT_ABSTRACT_CLASS(wxView
, wxEvtHandler
)
368 IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate
, wxObject
)
369 IMPLEMENT_DYNAMIC_CLASS(wxDocManager
, wxEvtHandler
)
370 IMPLEMENT_CLASS(wxDocChildFrame
, wxFrame
)
371 IMPLEMENT_CLASS(wxDocParentFrame
, wxFrame
)
372 #if wxUSE_PRINTING_ARCHITECTURE
373 IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout
, wxPrintout
)
375 IMPLEMENT_CLASS(wxCommand
, wxObject
)
376 IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor
, wxObject
)
377 IMPLEMENT_DYNAMIC_CLASS(wxFileHistory
, wxObject
)
380 #if wxUSE_CONSTRAINTS
381 #include "wx/layout.h"
382 IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint
, wxObject
)
383 IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints
, wxObject
)
384 IMPLEMENT_DYNAMIC_CLASS(wxSizer
, wxObject
)
385 IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer
, wxSizer
)
389 #include "wx/tbarbase.h"
390 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool
, wxObject
)
391 IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase
, wxControl
)
393 #include "wx/tbarsmpl.h"
394 IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple
, wxToolBarBase
)
397 #include "wx/tbarmsw.h"
398 IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW
, wxToolBarBase
)
400 #include "wx/tbar95.h"
401 IMPLEMENT_DYNAMIC_CLASS(wxToolBar95
, wxToolBarBase
)
406 #include "wx/sckaddr.h"
408 IMPLEMENT_DYNAMIC_CLASS(wxIPV4address
, wxSockAddress
)
410 IMPLEMENT_DYNAMIC_CLASS(wxIPV6address
, wxSockAddress
)
413 IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress
, wxSockAddress
)
416 #include "wx/socket.h"
418 IMPLEMENT_CLASS(wxSocketBase
, wxEvtHandler
)
419 IMPLEMENT_CLASS(wxSocketClient
, wxSocketBase
)
420 IMPLEMENT_CLASS(wxSocketServer
, wxSocketBase
)
421 IMPLEMENT_CLASS(wxSocketHandler
, wxObject
)
422 IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent
, wxEvent
)
426 IMPLEMENT_CLASS(wxProtoInfo
, wxObject
)
427 IMPLEMENT_CLASS(wxURL
, wxObject
)
429 #include "wx/protocol/http.h"
431 IMPLEMENT_DYNAMIC_CLASS(wxHTTP
, wxProtocol
)
432 IMPLEMENT_PROTOCOL(wxHTTP
, "http", "80", TRUE
)
434 #include "wx/protocol/ftp.h"
436 IMPLEMENT_DYNAMIC_CLASS(wxFTP
, wxProtocol
)
437 IMPLEMENT_PROTOCOL(wxFTP
, "ftp", "21", TRUE
)
439 #include "wx/protocol/sckfile.h"
441 IMPLEMENT_DYNAMIC_CLASS(wxFileProto
, wxProtocol
)
442 IMPLEMENT_PROTOCOL(wxFileProto
, "file", NULL
, FALSE
)
444 #include "wx/sckipc.h"
446 IMPLEMENT_DYNAMIC_CLASS(wxTCPServer
, wxServerBase
)
447 IMPLEMENT_DYNAMIC_CLASS(wxTCPClient
, wxClientBase
)
448 IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection
, wxConnectionBase
)
450 #include "wx/statusbr.h"
452 IMPLEMENT_DYNAMIC_CLASS(wxStatusBar
, wxWindow
)
454 BEGIN_EVENT_TABLE(wxStatusBar
, wxWindow
)
455 EVT_PAINT(wxStatusBar::OnPaint
)
456 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged
)
461 IMPLEMENT_DYNAMIC_CLASS(wxTime
, wxObject
)
464 #if !USE_GNU_WXSTRING
465 #include "wx/string.h"
466 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
470 IMPLEMENT_DYNAMIC_CLASS(wxXColormap
, wxObject
)
471 IMPLEMENT_DYNAMIC_CLASS(wxXFont
, wxObject
)
472 IMPLEMENT_DYNAMIC_CLASS(wxXCursor
, wxObject
)
474 IMPLEMENT_DYNAMIC_CLASS(wxFont
, wxGDIObject
)
475 IMPLEMENT_DYNAMIC_CLASS(wxPalette
, wxGDIObject
)
476 IMPLEMENT_DYNAMIC_CLASS(wxPen
, wxGDIObject
)
477 IMPLEMENT_DYNAMIC_CLASS(wxBrush
, wxGDIObject
)
478 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxBitmap
)
479 IMPLEMENT_DYNAMIC_CLASS(wxCursor
, wxBitmap
)
480 IMPLEMENT_DYNAMIC_CLASS(wxBitmap
, wxGDIObject
)
481 IMPLEMENT_DYNAMIC_CLASS(wxMask
, wxObject
)
483 // This will presumably be implemented on other platforms too
485 IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler
, wxObject
)
486 IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler
, wxBitmapHandler
)
487 IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler
, wxBitmapHandler
)
488 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler
, wxBitmapHandler
)
489 IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler
, wxBitmapHandler
)
490 IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler
, wxBitmapHandler
)
491 IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler
, wxBitmapHandler
)
494 #include "wx/statbox.h"
495 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
499 IMPLEMENT_ABSTRACT_CLASS(wxDDEObject
, wxObject
)
500 IMPLEMENT_DYNAMIC_CLASS(wxDDEServer
, wxDDEObject
)
501 IMPLEMENT_DYNAMIC_CLASS(wxDDEClient
, wxDDEObject
)
502 IMPLEMENT_CLASS(wxDDEConnection
, wxObject
)
505 IMPLEMENT_ABSTRACT_CLASS(wxControl
, wxWindow
)
507 #include "wx/listbox.h"
508 IMPLEMENT_DYNAMIC_CLASS(wxListBox
, wxControl
)
510 IMPLEMENT_DYNAMIC_CLASS(wxApp
, wxEvtHandler
)
513 IMPLEMENT_DYNAMIC_CLASS(wxMenu
, wxWindow
)
514 IMPLEMENT_DYNAMIC_CLASS(wxMenuItem
, wxObject
)
515 IMPLEMENT_DYNAMIC_CLASS(wxMenuBar
, wxWindow
)
517 #include "wx/stattext.h"
518 #include "wx/statbmp.h"
519 IMPLEMENT_DYNAMIC_CLASS(wxStaticText
, wxControl
)
520 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap
, wxControl
)
523 #include "wx/metafile.h"
524 IMPLEMENT_DYNAMIC_CLASS(wxMetaFile
, wxObject
)
525 IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC
, wxDC
)
528 #include "wx/radiobox.h"
529 #include "wx/radiobut.h"
530 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
532 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton
, wxControl
)
533 // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
535 #include "wx/scrolbar.h"
536 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
538 #if WXWIN_COMPATIBILITY
539 BEGIN_EVENT_TABLE(wxScrollBar
, wxControl
)
540 EVT_SCROLL(wxScrollBar::OnScroll
)
544 #include "wx/slider.h"
545 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
547 #if WXWIN_COMPATIBILITY
548 BEGIN_EVENT_TABLE(wxSlider
, wxControl
)
549 EVT_SCROLL(wxSlider::OnScroll
)
553 #include "wx/timer.h"
554 IMPLEMENT_ABSTRACT_CLASS(wxTimer
, wxObject
)
556 #include "wx/textctrl.h"
557 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl
, wxControl
)
559 #include "wx/window.h"
560 IMPLEMENT_DYNAMIC_CLASS(wxWindow
, wxEvtHandler
)
562 #include "wx/scrolwin.h"
563 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow
, wxWindow
)
565 #include "wx/panel.h"
566 IMPLEMENT_DYNAMIC_CLASS(wxPanel
, wxWindow
)
568 #include "wx/msgbxdlg.h"
569 #include "wx/textdlg.h"
570 #include "wx/filedlg.h"
571 #include "wx/dirdlg.h"
572 #include "wx/choicdlg.h"
574 #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
575 #include "wx/generic/msgdlgg.h"
576 IMPLEMENT_CLASS(wxGenericMessageDialog
, wxDialog
)
579 IMPLEMENT_CLASS(wxTextEntryDialog
, wxDialog
)
580 IMPLEMENT_CLASS(wxSingleChoiceDialog
, wxDialog
)
581 IMPLEMENT_CLASS(wxFileDialog
, wxDialog
)
582 IMPLEMENT_CLASS(wxDirDialog
, wxDialog
)
585 IMPLEMENT_CLASS(wxMessageDialog
)
590 #include "../../contrib/xmgauge/gauge.h"
592 #include "wx_gauge.h"
593 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
597 IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid
, wxPanel
)
599 ///// Event tables (also must be in one, statically-linked file for shared libraries)
601 // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here
602 const wxEventTable
*wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable
; }
604 const wxEventTable
wxEvtHandler::sm_eventTable
=
605 { NULL
, &wxEvtHandler::sm_eventTableEntries
[0] };
607 const wxEventTableEntry
wxEvtHandler::sm_eventTableEntries
[] = { { 0, 0, 0,
616 BEGIN_EVENT_TABLE(wxFrame
, wxWindow
)
617 EVT_SIZE(wxFrame::OnSize
)
618 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight
)
619 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged
)
620 EVT_IDLE(wxFrame::OnIdle
)
621 EVT_CLOSE(wxFrame::OnCloseWindow
)
624 BEGIN_EVENT_TABLE(wxDialog
, wxPanel
)
625 EVT_BUTTON(wxID_OK
, wxDialog::OnOK
)
626 EVT_BUTTON(wxID_APPLY
, wxDialog::OnApply
)
627 EVT_BUTTON(wxID_CANCEL
, wxDialog::OnCancel
)
628 EVT_CHAR_HOOK(wxDialog::OnCharHook
)
629 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged
)
630 EVT_CLOSE(wxDialog::OnCloseWindow
)
633 BEGIN_EVENT_TABLE(wxWindow
, wxEvtHandler
)
634 EVT_CHAR(wxWindow::OnChar
)
635 EVT_SIZE(wxWindow::Size
)
636 EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground
)
637 EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged
)
638 EVT_INIT_DIALOG(wxWindow::OnInitDialog
)
639 EVT_IDLE(wxWindow::OnIdle
)
642 BEGIN_EVENT_TABLE(wxScrolledWindow
, wxWindow
)
643 EVT_SCROLL(wxScrolledWindow::OnScroll
)
644 EVT_SIZE(wxScrolledWindow::OnSize
)
647 BEGIN_EVENT_TABLE(wxPanel
, wxWindow
)
648 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged
)
651 BEGIN_EVENT_TABLE(wxTextCtrl
, wxControl
)
652 EVT_CHAR(wxTextCtrl::OnChar
)
653 EVT_DROP_FILES(wxTextCtrl::OnDropFiles
)
654 EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground
)
658 BEGIN_EVENT_TABLE(wxMDIParentWindow
, wxFrame
)
659 EVT_SIZE(wxMDIParentWindow::OnSize
)
660 EVT_ACTIVATE(wxMDIParentWindow::OnActivate
)
661 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged
)
664 BEGIN_EVENT_TABLE(wxMDIClientWindow
, wxWindow
)
665 EVT_SCROLL(wxMDIClientWindow::OnScroll
)
669 BEGIN_EVENT_TABLE(wxToolBarBase
, wxControl
)
670 EVT_SCROLL(wxToolBarBase::OnScroll
)
671 EVT_SIZE(wxToolBarBase::OnSize
)
672 EVT_IDLE(wxToolBarBase::OnIdle
)
675 BEGIN_EVENT_TABLE(wxToolBarSimple
, wxToolBarBase
)
676 EVT_SIZE(wxToolBarSimple::OnSize
)
677 EVT_PAINT(wxToolBarSimple::OnPaint
)
678 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus
)
679 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent
)
683 BEGIN_EVENT_TABLE(wxToolBarMSW
, wxToolBarBase
)
684 EVT_SIZE(wxToolBarMSW::OnSize
)
685 EVT_PAINT(wxToolBarMSW::OnPaint
)
686 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent
)
689 BEGIN_EVENT_TABLE(wxToolBar95
, wxToolBarBase
)
690 EVT_SIZE(wxToolBar95::OnSize
)
691 EVT_PAINT(wxToolBar95::OnPaint
)
692 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus
)
693 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent
)
694 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged
)
698 BEGIN_EVENT_TABLE(wxGenericGrid
, wxPanel
)
699 EVT_SIZE(wxGenericGrid::OnSize
)
700 EVT_PAINT(wxGenericGrid::OnPaint
)
701 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent
)
702 EVT_TEXT(wxGRID_TEXT_CTRL
, wxGenericGrid::OnText
)
703 EVT_COMMAND_SCROLL(wxGRID_HSCROLL
, wxGenericGrid::OnGridScroll
)
704 EVT_COMMAND_SCROLL(wxGRID_VSCROLL
, wxGenericGrid::OnGridScroll
)
707 BEGIN_EVENT_TABLE(wxControl
, wxWindow
)
708 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground
)
711 #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
712 BEGIN_EVENT_TABLE(wxGenericMessageDialog
, wxDialog
)
713 EVT_BUTTON(wxID_YES
, wxGenericMessageDialog::OnYes
)
714 EVT_BUTTON(wxID_NO
, wxGenericMessageDialog::OnNo
)
715 EVT_BUTTON(wxID_CANCEL
, wxGenericMessageDialog::OnCancel
)
718 BEGIN_EVENT_TABLE(wxGenericColourDialog
, wxDialog
)
719 EVT_BUTTON(wxID_ADD_CUSTOM
, wxGenericColourDialog::OnAddCustom
)
720 EVT_SLIDER(wxID_RED_SLIDER
, wxGenericColourDialog::OnRedSlider
)
721 EVT_SLIDER(wxID_GREEN_SLIDER
, wxGenericColourDialog::OnGreenSlider
)
722 EVT_SLIDER(wxID_BLUE_SLIDER
, wxGenericColourDialog::OnBlueSlider
)
723 EVT_PAINT(wxGenericColourDialog::OnPaint
)
724 EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent
)
727 BEGIN_EVENT_TABLE(wxGenericFontDialog
, wxDialog
)
728 EVT_CHECKBOX(wxID_FONT_UNDERLINE
, wxGenericFontDialog::OnChangeFont
)
729 EVT_CHOICE(wxID_FONT_STYLE
, wxGenericFontDialog::OnChangeFont
)
730 EVT_CHOICE(wxID_FONT_WEIGHT
, wxGenericFontDialog::OnChangeFont
)
731 EVT_CHOICE(wxID_FONT_FAMILY
, wxGenericFontDialog::OnChangeFont
)
732 EVT_CHOICE(wxID_FONT_COLOUR
, wxGenericFontDialog::OnChangeFont
)
733 EVT_CHOICE(wxID_FONT_SIZE
, wxGenericFontDialog::OnChangeFont
)
734 EVT_PAINT(wxGenericFontDialog::OnPaint
)
737 BEGIN_EVENT_TABLE(wxGenericPrintDialog
, wxDialog
)
738 EVT_BUTTON(wxID_OK
, wxGenericPrintDialog::OnOK
)
739 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPrintDialog::OnSetup
)
740 EVT_RADIOBOX(wxPRINTID_RANGE
, wxGenericPrintDialog::OnRange
)
745 BEGIN_EVENT_TABLE(wxTextEntryDialog
, wxDialog
)
746 EVT_BUTTON(wxID_OK
, wxTextEntryDialog::OnOK
)
749 BEGIN_EVENT_TABLE(wxSingleChoiceDialog
, wxDialog
)
750 EVT_BUTTON(wxID_OK
, wxSingleChoiceDialog::OnOK
)
753 #include "wx/prntbase.h"
755 BEGIN_EVENT_TABLE(wxPrintAbortDialog
, wxDialog
)
756 EVT_BUTTON(wxID_CANCEL
, wxPrintAbortDialog::OnCancel
)
759 BEGIN_EVENT_TABLE(wxPreviewControlBar
, wxWindow
)
760 EVT_BUTTON(wxID_PREVIEW_CLOSE
, wxPreviewControlBar::OnClose
)
761 EVT_BUTTON(wxID_PREVIEW_PRINT
, wxPreviewControlBar::OnPrint
)
762 EVT_BUTTON(wxID_PREVIEW_PREVIOUS
, wxPreviewControlBar::OnPrevious
)
763 EVT_BUTTON(wxID_PREVIEW_NEXT
, wxPreviewControlBar::OnNext
)
764 EVT_CHOICE(wxID_PREVIEW_ZOOM
, wxPreviewControlBar::OnZoom
)
770 const wxSize
wxDefaultSize(-1, -1);
771 const wxPoint
wxDefaultPosition(-1, -1);