1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
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 // Message Strings for Internationalization
50 char **wx_msg_str
= (char**)NULL
;
52 // Custom OS version, as optionally placed in wx.ini/.wxrc
53 // Currently this can be Win95, Windows, Win32s, WinNT.
54 // For some systems, you can't tell until run-time what services you
55 // have. See wxGetOsVersion, which uses this string if present.
56 char *wxOsVersion
= (char *) NULL
;
58 // For printing several pages
60 wxPrintPaperDatabase
* wxThePrintPaperDatabase
= (wxPrintPaperDatabase
*) NULL
;
63 wxBrushList
*wxTheBrushList
= (wxBrushList
*) NULL
;
64 wxPenList
*wxThePenList
= (wxPenList
*) NULL
;
65 wxFontList
*wxTheFontList
= (wxFontList
*) NULL
;
66 wxColourDatabase
*wxTheColourDatabase
= (wxColourDatabase
*) NULL
;
67 wxBitmapList
*wxTheBitmapList
= (wxBitmapList
*) NULL
;
71 wxFontNameDirectory
*wxTheFontNameDirectory
;
74 wxFont
*wxNORMAL_FONT
;
76 wxFont
*wxITALIC_FONT
;
84 wxPen
*wxTRANSPARENT_PEN
;
85 wxPen
*wxBLACK_DASHED_PEN
;
87 wxPen
*wxMEDIUM_GREY_PEN
;
88 wxPen
*wxLIGHT_GREY_PEN
;
90 wxBrush
*wxBLUE_BRUSH
;
91 wxBrush
*wxGREEN_BRUSH
;
92 wxBrush
*wxWHITE_BRUSH
;
93 wxBrush
*wxBLACK_BRUSH
;
94 wxBrush
*wxTRANSPARENT_BRUSH
;
95 wxBrush
*wxCYAN_BRUSH
;
97 wxBrush
*wxGREY_BRUSH
;
98 wxBrush
*wxMEDIUM_GREY_BRUSH
;
99 wxBrush
*wxLIGHT_GREY_BRUSH
;
103 wxColour
*wxGREY
; // Robert Roebling
108 wxColour
*wxLIGHT_GREY
;
110 wxCursor
*wxSTANDARD_CURSOR
= (wxCursor
*) NULL
;
111 wxCursor
*wxHOURGLASS_CURSOR
= (wxCursor
*) NULL
;
112 wxCursor
*wxCROSS_CURSOR
= (wxCursor
*) NULL
;
115 wxAcceleratorTable wxNullAcceleratorTable
;
116 wxBitmap wxNullBitmap
;
118 wxCursor wxNullCursor
;
122 wxColour wxNullColour
;
123 wxPalette wxNullPalette
;
125 // Default window names
126 const char *wxButtonNameStr
= "button";
127 const char *wxCanvasNameStr
= "canvas";
128 const char *wxCheckBoxNameStr
= "check";
129 const char *wxChoiceNameStr
= "choice";
130 const char *wxComboBoxNameStr
= "comboBox";
131 const char *wxDialogNameStr
= "dialog";
132 const char *wxFrameNameStr
= "frame";
133 const char *wxGaugeNameStr
= "gauge";
134 const char *wxStaticBoxNameStr
= "groupBox";
135 const char *wxListBoxNameStr
= "listBox";
136 const char *wxStaticTextNameStr
= "message";
137 const char *wxStaticBitmapNameStr
= "message";
138 const char *wxMultiTextNameStr
= "multitext";
139 const char *wxPanelNameStr
= "panel";
140 const char *wxRadioBoxNameStr
= "radioBox";
141 const char *wxRadioButtonNameStr
= "radioButton";
142 const char *wxBitmapRadioButtonNameStr
= "radioButton";
143 const char *wxScrollBarNameStr
= "scrollBar";
144 const char *wxSliderNameStr
= "slider";
145 const char *wxStaticNameStr
= "static";
146 const char *wxTextCtrlWindowNameStr
= "textWindow";
147 const char *wxTextCtrlNameStr
= "text";
148 const char *wxVirtListBoxNameStr
= "virtListBox";
149 const char *wxButtonBarNameStr
= "buttonbar";
150 const char *wxEnhDialogNameStr
= "Shell";
151 const char *wxToolBarNameStr
= "toolbar";
152 const char *wxStatusLineNameStr
= "status_line";
153 const char *wxEmptyString
= "";
154 const char *wxGetTextFromUserPromptStr
= "Input Text";
155 const char *wxMessageBoxCaptionStr
= "Message";
156 const char *wxFileSelectorPromptStr
= "Select a file";
157 const char *wxFileSelectorDefaultWildcardStr
= "*.*";
158 const char *wxInternalErrorStr
= "wxWindows Internal Error";
159 const char *wxFatalErrorStr
= "wxWindows Fatal Error";
162 const char *wxFloatToStringStr
= "%.2f";
163 const char *wxDoubleToStringStr
= "%.2f";
166 const char *wxUserResourceStr
= "TEXT";
170 #if wxUSE_SHARED_LIBRARY
172 * For wxWindows to be made into a dynamic library (e.g. Sun),
173 * all IMPLEMENT_... macros must be in one place.
174 * But normally, the definitions are in the appropriate places.
177 // Hand-coded IMPLEMENT... macro for wxObject (define static data)
178 wxClassInfo
wxObject::classwxObject((char *) "wxObject", (char *) NULL
, (char *) NULL
, (int ) sizeof(wxObject
), (wxObjectConstructorFn
) NULL
);
179 wxClassInfo
*wxClassInfo::first
= (wxClassInfo
*) NULL
;
180 wxHashTable
wxClassInfo::classTable(wxKEY_STRING
);
182 #include "wx/button.h"
183 #include "wx/bmpbuttn.h"
184 IMPLEMENT_DYNAMIC_CLASS(wxButton
, wxControl
)
185 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
, wxButton
)
187 #include "wx/checkbox.h"
188 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox
, wxControl
)
189 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox
, wxCheckBox
)
191 #include "wx/choice.h"
192 IMPLEMENT_DYNAMIC_CLASS(wxChoice
, wxControl
)
195 #include "wx/clipbrd.h"
196 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
197 IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient
, wxObject
)
201 #include "wx/combobox.h"
202 IMPLEMENT_DYNAMIC_CLASS(wxComboBox
, wxControl
)
206 #include "wx/dcmemory.h"
207 #include "wx/dcclient.h"
208 #include "wx/dcscreen.h"
209 IMPLEMENT_ABSTRACT_CLASS(wxDC
, wxObject
)
210 IMPLEMENT_DYNAMIC_CLASS(wxClientDC
, wxDC
)
211 IMPLEMENT_DYNAMIC_CLASS(wxWindowDC
, wxDC
)
212 IMPLEMENT_DYNAMIC_CLASS(wxPaintDC
, wxDC
)
213 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
, wxDC
)
214 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC
, wxWindowDC
)
217 #include "wx/dcprint.h"
218 IMPLEMENT_CLASS(wxPrinterDC
, wxDC
)
221 #include "wx/dialog.h"
222 IMPLEMENT_DYNAMIC_CLASS(wxDialog
, wxWindow
)
224 #include "wx/frame.h"
225 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxWindow
)
228 IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame
, wxFrame
)
229 IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame
, wxFrame
)
230 IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow
, wxWindow
)
232 #include "wx/cmndata.h"
233 IMPLEMENT_DYNAMIC_CLASS(wxColourData
, wxObject
)
234 IMPLEMENT_DYNAMIC_CLASS(wxFontData
, wxObject
)
235 IMPLEMENT_DYNAMIC_CLASS(wxPrintData
, wxObject
)
237 #include "wx/colordlg.h"
238 #include "wx/fontdlg.h"
240 #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
241 #include "wx/generic/colordlg.h"
242 #include "wx/generic/fontdlg.h"
243 IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog
, wxDialog
)
244 IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog
, wxDialog
)
247 // X defines wxColourDialog to be wxGenericColourDialog
249 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
250 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog
, wxDialog
)
253 #include "wx/gdicmn.h"
255 #include "wx/brush.h"
257 #include "wx/palette.h"
259 #include "wx/cursor.h"
261 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
262 IMPLEMENT_CLASS(wxColourDatabase
, wxList
)
263 IMPLEMENT_DYNAMIC_CLASS(wxFontList
, wxList
)
264 IMPLEMENT_DYNAMIC_CLASS(wxPenList
, wxList
)
265 IMPLEMENT_DYNAMIC_CLASS(wxBrushList
, wxList
)
266 IMPLEMENT_DYNAMIC_CLASS(wxBitmapList
, wxList
)
270 IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject)
271 IMPLEMENT_DYNAMIC_CLASS(wxIntPoint, wxObject)
275 #if defined(wx_x) || (defined(wx_msw) && wxUSE_PORTABLE_FONTS_IN_MSW)
276 IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory
, wxObject
)
280 IMPLEMENT_DYNAMIC_CLASS(wxHashTable
, wxObject
)
283 IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance
, wxClient
)
284 IMPLEMENT_CLASS(wxHelpConnection
, wxConnection
)
287 IMPLEMENT_DYNAMIC_CLASS(wxNode
, wxObject
)
288 IMPLEMENT_DYNAMIC_CLASS(wxList
, wxObject
)
289 IMPLEMENT_DYNAMIC_CLASS(wxStringList
, wxList
)
291 #if wxUSE_PRINTING_ARCHITECTURE
292 #include "wx/print.h"
293 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
294 IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase
, wxObject
)
295 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter
, wxPrinterBase
)
296 IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter
, wxPrinterBase
)
297 IMPLEMENT_ABSTRACT_CLASS(wxPrintout
, wxObject
)
298 IMPLEMENT_CLASS(wxPreviewCanvas
, wxWindow
)
299 IMPLEMENT_CLASS(wxPreviewControlBar
, wxWindow
)
300 IMPLEMENT_CLASS(wxPreviewFrame
, wxFrame
)
301 IMPLEMENT_CLASS(wxPrintPreviewBase
, wxObject
)
302 IMPLEMENT_CLASS(wxPostScriptPrintPreview
, wxPrintPreviewBase
)
303 IMPLEMENT_CLASS(wxWindowsPrintPreview
, wxPrintPreviewBase
)
304 IMPLEMENT_CLASS(wxGenericPrintDialog
, wxDialog
)
305 IMPLEMENT_CLASS(wxGenericPrintSetupDialog
, wxDialog
)
309 #include "wx/postscrp.h"
310 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC
, wxDC
)
311 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData
, wxObject
)
312 IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData
, wxObject
)
313 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType
, wxObject
)
314 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase
, wxList
)
317 #if wxUSE_WX_RESOURCES
318 #include "wx/resource.h"
319 IMPLEMENT_DYNAMIC_CLASS(wxItemResource
, wxObject
)
320 IMPLEMENT_DYNAMIC_CLASS(wxResourceTable
, wxHashTable
)
323 #include "wx/event.h"
324 IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler
, wxObject
)
325 IMPLEMENT_ABSTRACT_CLASS(wxEvent
, wxObject
)
326 IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent
, wxEvent
)
327 IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent
, wxCommandEvent
)
328 IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent
, wxEvent
)
329 IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent
, wxEvent
)
330 IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent
, wxEvent
)
331 IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent
, wxEvent
)
332 IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent
, wxEvent
)
333 IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent
, wxEvent
)
334 IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent
, wxEvent
)
335 IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent
, wxEvent
)
336 IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent
, wxEvent
)
337 IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent
, wxEvent
)
338 IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent
, wxEvent
)
339 IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent
, wxEvent
)
340 IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent
, wxEvent
)
341 IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent
, wxEvent
)
342 IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent
, wxEvent
)
343 IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent
, wxEvent
)
344 IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent
, wxEvent
)
346 #include "wx/utils.h"
347 IMPLEMENT_DYNAMIC_CLASS(wxPathList
, wxList
)
349 // IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject)
351 #include "wx/process.h"
352 IMPLEMENT_DYNAMIC_CLASS(wxProcess
, wxEvtHandler
)
356 IMPLEMENT_DYNAMIC_CLASS(wxDate
, wxObject
)
359 #if wxUSE_DOC_VIEW_ARCHITECTURE
360 #include "wx/docview.h"
361 //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
362 IMPLEMENT_ABSTRACT_CLASS(wxDocument
, wxEvtHandler
)
363 IMPLEMENT_ABSTRACT_CLASS(wxView
, wxEvtHandler
)
364 IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate
, wxObject
)
365 IMPLEMENT_DYNAMIC_CLASS(wxDocManager
, wxEvtHandler
)
366 IMPLEMENT_CLASS(wxDocChildFrame
, wxFrame
)
367 IMPLEMENT_CLASS(wxDocParentFrame
, wxFrame
)
368 #if wxUSE_PRINTING_ARCHITECTURE
369 IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout
, wxPrintout
)
371 IMPLEMENT_CLASS(wxCommand
, wxObject
)
372 IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor
, wxObject
)
373 IMPLEMENT_DYNAMIC_CLASS(wxFileHistory
, wxObject
)
376 #if wxUSE_CONSTRAINTS
377 #include "wx/layout.h"
378 IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint
, wxObject
)
379 IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints
, wxObject
)
380 IMPLEMENT_DYNAMIC_CLASS(wxSizer
, wxObject
)
381 IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer
, wxSizer
)
385 #include "wx/tbarbase.h"
386 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool
, wxObject
)
387 IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase
, wxControl
)
389 #include "wx/tbarsmpl.h"
390 IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple
, wxToolBarBase
)
393 #include "wx/tbarmsw.h"
394 IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW
, wxToolBarBase
)
396 #include "wx/tbar95.h"
397 IMPLEMENT_DYNAMIC_CLASS(wxToolBar95
, wxToolBarBase
)
402 #include "wx/sckaddr.h"
404 IMPLEMENT_DYNAMIC_CLASS(wxIPV4address
, wxSockAddress
)
406 IMPLEMENT_DYNAMIC_CLASS(wxIPV6address
, wxSockAddress
)
409 IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress
, wxSockAddress
)
412 #include "wx/socket.h"
414 IMPLEMENT_CLASS(wxSocketBase
, wxEvtHandler
)
415 IMPLEMENT_CLASS(wxSocketClient
, wxSocketBase
)
416 IMPLEMENT_CLASS(wxSocketServer
, wxSocketBase
)
417 IMPLEMENT_CLASS(wxSocketHandler
, wxObject
)
418 IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent
, wxEvent
)
422 IMPLEMENT_CLASS(wxProtoInfo
, wxObject
)
423 IMPLEMENT_CLASS(wxURL
, wxObject
)
425 #include "wx/protocol/http.h"
427 IMPLEMENT_DYNAMIC_CLASS(wxHTTP
, wxProtocol
)
428 IMPLEMENT_PROTOCOL(wxHTTP
, "http", "80", TRUE
)
430 #include "wx/protocol/ftp.h"
432 IMPLEMENT_DYNAMIC_CLASS(wxFTP
, wxProtocol
)
433 IMPLEMENT_PROTOCOL(wxFTP
, "ftp", "21", TRUE
)
435 #include "wx/protocol/sckfile.h"
437 IMPLEMENT_DYNAMIC_CLASS(wxFileProto
, wxProtocol
)
438 IMPLEMENT_PROTOCOL(wxFileProto
, "file", NULL
, FALSE
)
440 #include "wx/sckipc.h"
442 IMPLEMENT_DYNAMIC_CLASS(wxTCPServer
, wxServerBase
)
443 IMPLEMENT_DYNAMIC_CLASS(wxTCPClient
, wxClientBase
)
444 IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection
, wxConnectionBase
)
446 #include "wx/statusbr.h"
448 IMPLEMENT_DYNAMIC_CLASS(wxStatusBar
, wxWindow
)
450 BEGIN_EVENT_TABLE(wxStatusBar
, wxWindow
)
451 EVT_PAINT(wxStatusBar::OnPaint
)
452 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged
)
457 IMPLEMENT_DYNAMIC_CLASS(wxTime
, wxObject
)
460 #if !USE_GNU_WXSTRING
461 #include "wx/string.h"
462 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
466 IMPLEMENT_DYNAMIC_CLASS(wxXColormap
, wxObject
)
467 IMPLEMENT_DYNAMIC_CLASS(wxXFont
, wxObject
)
468 IMPLEMENT_DYNAMIC_CLASS(wxXCursor
, wxObject
)
470 IMPLEMENT_DYNAMIC_CLASS(wxFont
, wxGDIObject
)
471 IMPLEMENT_DYNAMIC_CLASS(wxPalette
, wxGDIObject
)
472 IMPLEMENT_DYNAMIC_CLASS(wxPen
, wxGDIObject
)
473 IMPLEMENT_DYNAMIC_CLASS(wxBrush
, wxGDIObject
)
474 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxBitmap
)
475 IMPLEMENT_DYNAMIC_CLASS(wxCursor
, wxBitmap
)
476 IMPLEMENT_DYNAMIC_CLASS(wxBitmap
, wxGDIObject
)
477 IMPLEMENT_DYNAMIC_CLASS(wxMask
, wxObject
)
479 // This will presumably be implemented on other platforms too
481 IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler
, wxObject
)
482 IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler
, wxBitmapHandler
)
483 IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler
, wxBitmapHandler
)
484 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler
, wxBitmapHandler
)
485 IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler
, wxBitmapHandler
)
486 IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler
, wxBitmapHandler
)
487 IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler
, wxBitmapHandler
)
490 #include "wx/statbox.h"
491 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
495 IMPLEMENT_ABSTRACT_CLASS(wxDDEObject
, wxObject
)
496 IMPLEMENT_DYNAMIC_CLASS(wxDDEServer
, wxDDEObject
)
497 IMPLEMENT_DYNAMIC_CLASS(wxDDEClient
, wxDDEObject
)
498 IMPLEMENT_CLASS(wxDDEConnection
, wxObject
)
501 IMPLEMENT_ABSTRACT_CLASS(wxControl
, wxWindow
)
503 #include "wx/listbox.h"
504 IMPLEMENT_DYNAMIC_CLASS(wxListBox
, wxControl
)
506 IMPLEMENT_DYNAMIC_CLASS(wxApp
, wxEvtHandler
)
509 IMPLEMENT_DYNAMIC_CLASS(wxMenu
, wxWindow
)
510 IMPLEMENT_DYNAMIC_CLASS(wxMenuItem
, wxObject
)
511 IMPLEMENT_DYNAMIC_CLASS(wxMenuBar
, wxWindow
)
513 #include "wx/stattext.h"
514 #include "wx/statbmp.h"
515 IMPLEMENT_DYNAMIC_CLASS(wxStaticText
, wxControl
)
516 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap
, wxControl
)
519 #include "wx/metafile.h"
520 IMPLEMENT_DYNAMIC_CLASS(wxMetaFile
, wxObject
)
521 IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC
, wxDC
)
524 #include "wx/radiobox.h"
525 #include "wx/radiobut.h"
526 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
528 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton
, wxControl
)
529 // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
531 #include "wx/scrolbar.h"
532 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
534 #if WXWIN_COMPATIBILITY
535 BEGIN_EVENT_TABLE(wxScrollBar
, wxControl
)
536 EVT_SCROLL(wxScrollBar::OnScroll
)
540 #include "wx/slider.h"
541 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
543 #if WXWIN_COMPATIBILITY
544 BEGIN_EVENT_TABLE(wxSlider
, wxControl
)
545 EVT_SCROLL(wxSlider::OnScroll
)
549 #include "wx/timer.h"
550 IMPLEMENT_ABSTRACT_CLASS(wxTimer
, wxObject
)
552 #include "wx/textctrl.h"
553 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl
, wxControl
)
555 #include "wx/window.h"
556 IMPLEMENT_DYNAMIC_CLASS(wxWindow
, wxEvtHandler
)
558 #include "wx/scrolwin.h"
559 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow
, wxWindow
)
561 #include "wx/panel.h"
562 IMPLEMENT_DYNAMIC_CLASS(wxPanel
, wxWindow
)
564 #include "wx/msgbxdlg.h"
565 #include "wx/textdlg.h"
566 #include "wx/filedlg.h"
567 #include "wx/dirdlg.h"
568 #include "wx/choicdlg.h"
570 #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
571 #include "wx/generic/msgdlgg.h"
572 IMPLEMENT_CLASS(wxGenericMessageDialog
, wxDialog
)
575 IMPLEMENT_CLASS(wxTextEntryDialog
, wxDialog
)
576 IMPLEMENT_CLASS(wxSingleChoiceDialog
, wxDialog
)
577 IMPLEMENT_CLASS(wxFileDialog
, wxDialog
)
578 IMPLEMENT_CLASS(wxDirDialog
, wxDialog
)
581 IMPLEMENT_CLASS(wxMessageDialog
)
586 #include "../../contrib/xmgauge/gauge.h"
588 #include "wx_gauge.h"
589 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
593 IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid
, wxPanel
)
595 ///// Event tables (also must be in one, statically-linked file for shared libraries)
597 // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here
598 const wxEventTable
*wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable
; }
600 const wxEventTable
wxEvtHandler::sm_eventTable
=
601 { NULL
, &wxEvtHandler::sm_eventTableEntries
[0] };
603 const wxEventTableEntry
wxEvtHandler::sm_eventTableEntries
[] = { { 0, 0, 0,
612 BEGIN_EVENT_TABLE(wxFrame
, wxWindow
)
613 EVT_SIZE(wxFrame::OnSize
)
614 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight
)
615 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged
)
616 EVT_IDLE(wxFrame::OnIdle
)
617 EVT_CLOSE(wxFrame::OnCloseWindow
)
620 BEGIN_EVENT_TABLE(wxDialog
, wxPanel
)
621 EVT_BUTTON(wxID_OK
, wxDialog::OnOK
)
622 EVT_BUTTON(wxID_APPLY
, wxDialog::OnApply
)
623 EVT_BUTTON(wxID_CANCEL
, wxDialog::OnCancel
)
624 EVT_CHAR_HOOK(wxDialog::OnCharHook
)
625 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged
)
626 EVT_CLOSE(wxDialog::OnCloseWindow
)
629 BEGIN_EVENT_TABLE(wxWindow
, wxEvtHandler
)
630 EVT_CHAR(wxWindow::OnChar
)
631 EVT_SIZE(wxWindow::Size
)
632 EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground
)
633 EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged
)
634 EVT_INIT_DIALOG(wxWindow::OnInitDialog
)
635 EVT_IDLE(wxWindow::OnIdle
)
638 BEGIN_EVENT_TABLE(wxScrolledWindow
, wxWindow
)
639 EVT_SCROLL(wxScrolledWindow::OnScroll
)
640 EVT_SIZE(wxScrolledWindow::OnSize
)
643 BEGIN_EVENT_TABLE(wxPanel
, wxWindow
)
644 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged
)
647 BEGIN_EVENT_TABLE(wxTextCtrl
, wxControl
)
648 EVT_CHAR(wxTextCtrl::OnChar
)
649 EVT_DROP_FILES(wxTextCtrl::OnDropFiles
)
650 EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground
)
654 BEGIN_EVENT_TABLE(wxMDIParentWindow
, wxFrame
)
655 EVT_SIZE(wxMDIParentWindow::OnSize
)
656 EVT_ACTIVATE(wxMDIParentWindow::OnActivate
)
657 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged
)
660 BEGIN_EVENT_TABLE(wxMDIClientWindow
, wxWindow
)
661 EVT_SCROLL(wxMDIClientWindow::OnScroll
)
665 BEGIN_EVENT_TABLE(wxToolBarBase
, wxControl
)
666 EVT_SCROLL(wxToolBarBase::OnScroll
)
667 EVT_SIZE(wxToolBarBase::OnSize
)
668 EVT_IDLE(wxToolBarBase::OnIdle
)
671 BEGIN_EVENT_TABLE(wxToolBarSimple
, wxToolBarBase
)
672 EVT_SIZE(wxToolBarSimple::OnSize
)
673 EVT_PAINT(wxToolBarSimple::OnPaint
)
674 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus
)
675 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent
)
679 BEGIN_EVENT_TABLE(wxToolBarMSW
, wxToolBarBase
)
680 EVT_SIZE(wxToolBarMSW::OnSize
)
681 EVT_PAINT(wxToolBarMSW::OnPaint
)
682 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent
)
685 BEGIN_EVENT_TABLE(wxToolBar95
, wxToolBarBase
)
686 EVT_SIZE(wxToolBar95::OnSize
)
687 EVT_PAINT(wxToolBar95::OnPaint
)
688 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus
)
689 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent
)
690 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged
)
694 BEGIN_EVENT_TABLE(wxGenericGrid
, wxPanel
)
695 EVT_SIZE(wxGenericGrid::OnSize
)
696 EVT_PAINT(wxGenericGrid::OnPaint
)
697 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent
)
698 EVT_TEXT(wxGRID_TEXT_CTRL
, wxGenericGrid::OnText
)
699 EVT_COMMAND_SCROLL(wxGRID_HSCROLL
, wxGenericGrid::OnGridScroll
)
700 EVT_COMMAND_SCROLL(wxGRID_VSCROLL
, wxGenericGrid::OnGridScroll
)
703 BEGIN_EVENT_TABLE(wxControl
, wxWindow
)
704 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground
)
707 #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
708 BEGIN_EVENT_TABLE(wxGenericMessageDialog
, wxDialog
)
709 EVT_BUTTON(wxID_YES
, wxGenericMessageDialog::OnYes
)
710 EVT_BUTTON(wxID_NO
, wxGenericMessageDialog::OnNo
)
711 EVT_BUTTON(wxID_CANCEL
, wxGenericMessageDialog::OnCancel
)
714 BEGIN_EVENT_TABLE(wxGenericColourDialog
, wxDialog
)
715 EVT_BUTTON(wxID_ADD_CUSTOM
, wxGenericColourDialog::OnAddCustom
)
716 EVT_SLIDER(wxID_RED_SLIDER
, wxGenericColourDialog::OnRedSlider
)
717 EVT_SLIDER(wxID_GREEN_SLIDER
, wxGenericColourDialog::OnGreenSlider
)
718 EVT_SLIDER(wxID_BLUE_SLIDER
, wxGenericColourDialog::OnBlueSlider
)
719 EVT_PAINT(wxGenericColourDialog::OnPaint
)
720 EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent
)
723 BEGIN_EVENT_TABLE(wxGenericFontDialog
, wxDialog
)
724 EVT_CHECKBOX(wxID_FONT_UNDERLINE
, wxGenericFontDialog::OnChangeFont
)
725 EVT_CHOICE(wxID_FONT_STYLE
, wxGenericFontDialog::OnChangeFont
)
726 EVT_CHOICE(wxID_FONT_WEIGHT
, wxGenericFontDialog::OnChangeFont
)
727 EVT_CHOICE(wxID_FONT_FAMILY
, wxGenericFontDialog::OnChangeFont
)
728 EVT_CHOICE(wxID_FONT_COLOUR
, wxGenericFontDialog::OnChangeFont
)
729 EVT_CHOICE(wxID_FONT_SIZE
, wxGenericFontDialog::OnChangeFont
)
730 EVT_PAINT(wxGenericFontDialog::OnPaint
)
733 BEGIN_EVENT_TABLE(wxGenericPrintDialog
, wxDialog
)
734 EVT_BUTTON(wxID_OK
, wxGenericPrintDialog::OnOK
)
735 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPrintDialog::OnSetup
)
736 EVT_RADIOBOX(wxPRINTID_RANGE
, wxGenericPrintDialog::OnRange
)
741 BEGIN_EVENT_TABLE(wxTextEntryDialog
, wxDialog
)
742 EVT_BUTTON(wxID_OK
, wxTextEntryDialog::OnOK
)
745 BEGIN_EVENT_TABLE(wxSingleChoiceDialog
, wxDialog
)
746 EVT_BUTTON(wxID_OK
, wxSingleChoiceDialog::OnOK
)
749 #include "wx/prntbase.h"
751 BEGIN_EVENT_TABLE(wxPrintAbortDialog
, wxDialog
)
752 EVT_BUTTON(wxID_CANCEL
, wxPrintAbortDialog::OnCancel
)
755 BEGIN_EVENT_TABLE(wxPreviewControlBar
, wxWindow
)
756 EVT_BUTTON(wxID_PREVIEW_CLOSE
, wxPreviewControlBar::OnClose
)
757 EVT_BUTTON(wxID_PREVIEW_PRINT
, wxPreviewControlBar::OnPrint
)
758 EVT_BUTTON(wxID_PREVIEW_PREVIOUS
, wxPreviewControlBar::OnPrevious
)
759 EVT_BUTTON(wxID_PREVIEW_NEXT
, wxPreviewControlBar::OnNext
)
760 EVT_CHOICE(wxID_PREVIEW_ZOOM
, wxPreviewControlBar::OnZoom
)
766 const wxSize
wxDefaultSize(-1, -1);
767 const wxPoint
wxDefaultPosition(-1, -1);