1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Various data
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "data.h"
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
27 #define _MAXPATHLEN 500
29 // Useful buffer, initialized in wxCommonInit
30 char *wxBuffer
= NULL
;
33 wxList wxTopLevelWindows
;
35 // List of windows pending deletion
36 wxList WXDLLEXPORT wxPendingDelete
;
38 // Current cursor, in order to hang on to
39 // cursor handle when setting the cursor globally
40 wxCursor
*g_globalCursor
= NULL
;
42 // Message Strings for Internationalization
43 char **wx_msg_str
= (char**)NULL
;
45 // Custom OS version, as optionally placed in wx.ini/.wxrc
46 // Currently this can be Win95, Windows, Win32s, WinNT.
47 // For some systems, you can't tell until run-time what services you
48 // have. See wxGetOsVersion, which uses this string if present.
49 char *wxOsVersion
= NULL
;
54 wxBrushList
*wxTheBrushList
= NULL
;
55 wxPenList
*wxThePenList
= NULL
;
56 wxFontList
*wxTheFontList
= NULL
;
57 wxBitmapList
*wxTheBitmapList
= NULL
;
59 wxColourDatabase
*wxTheColourDatabase
= NULL
;
62 wxFont
*wxNORMAL_FONT
;
64 wxFont
*wxITALIC_FONT
;
72 wxPen
*wxTRANSPARENT_PEN
;
73 wxPen
*wxBLACK_DASHED_PEN
;
75 wxPen
*wxMEDIUM_GREY_PEN
;
76 wxPen
*wxLIGHT_GREY_PEN
;
78 wxBrush
*wxBLUE_BRUSH
;
79 wxBrush
*wxGREEN_BRUSH
;
80 wxBrush
*wxWHITE_BRUSH
;
81 wxBrush
*wxBLACK_BRUSH
;
82 wxBrush
*wxTRANSPARENT_BRUSH
;
83 wxBrush
*wxCYAN_BRUSH
;
85 wxBrush
*wxGREY_BRUSH
;
86 wxBrush
*wxMEDIUM_GREY_BRUSH
;
87 wxBrush
*wxLIGHT_GREY_BRUSH
;
95 wxColour
*wxLIGHT_GREY
;
97 wxCursor
*wxSTANDARD_CURSOR
= NULL
;
98 wxCursor
*wxHOURGLASS_CURSOR
= NULL
;
99 wxCursor
*wxCROSS_CURSOR
= NULL
;
102 wxAcceleratorTable wxNullAcceleratorTable
;
103 wxBitmap wxNullBitmap
;
105 wxCursor wxNullCursor
;
108 wxPalette wxNullPalette
;
110 wxColour wxNullColour
;
112 // Default window names
113 const char *wxButtonNameStr
= "button";
114 const char *wxCanvasNameStr
= "canvas";
115 const char *wxCheckBoxNameStr
= "check";
116 const char *wxChoiceNameStr
= "choice";
117 const char *wxComboBoxNameStr
= "comboBox";
118 const char *wxDialogNameStr
= "dialog";
119 const char *wxFrameNameStr
= "frame";
120 const char *wxGaugeNameStr
= "gauge";
121 const char *wxStaticBoxNameStr
= "groupBox";
122 const char *wxListBoxNameStr
= "listBox";
123 const char *wxStaticTextNameStr
= "message";
124 const char *wxStaticBitmapNameStr
= "message";
125 const char *wxMultiTextNameStr
= "multitext";
126 const char *wxPanelNameStr
= "panel";
127 const char *wxRadioBoxNameStr
= "radioBox";
128 const char *wxRadioButtonNameStr
= "radioButton";
129 const char *wxBitmapRadioButtonNameStr
= "radioButton";
130 const char *wxScrollBarNameStr
= "scrollBar";
131 const char *wxSliderNameStr
= "slider";
132 const char *wxStaticNameStr
= "static";
133 const char *wxTextCtrlWindowNameStr
= "textWindow";
134 const char *wxTextCtrlNameStr
= "text";
135 const char *wxVirtListBoxNameStr
= "virtListBox";
136 const char *wxButtonBarNameStr
= "buttonbar";
137 const char *wxEnhDialogNameStr
= "Shell";
138 const char *wxToolBarNameStr
= "toolbar";
139 const char *wxStatusLineNameStr
= "status_line";
140 const char *wxEmptyString
= "";
141 const char *wxGetTextFromUserPromptStr
= "Input Text";
142 const char *wxMessageBoxCaptionStr
= "Message";
143 const char *wxFileSelectorPromptStr
= "Select a file";
144 const char *wxFileSelectorDefaultWildcardStr
= "*.*";
145 const char *wxInternalErrorStr
= "wxWindows Internal Error";
146 const char *wxFatalErrorStr
= "wxWindows Fatal Error";
147 const char *wxTreeCtrlNameStr
= "treeCtrl";
150 const char *wxFloatToStringStr
= "%.2f";
151 const char *wxDoubleToStringStr
= "%.2f";
154 const char *wxUserResourceStr
= "TEXT";
158 class wxPrintPaperDatabase
;
159 wxPrintPaperDatabase
* wxThePrintPaperDatabase
= NULL
;
162 #if wxUSE_SHARED_LIBRARY
164 * For wxWindows to be made into a dynamic library (e.g. Sun),
165 * all IMPLEMENT_... macros must be in one place.
166 * But normally, the definitions are in the appropriate places.
169 // Hand-coded IMPLEMENT... macro for wxObject (define static data)
170 wxClassInfo
wxObject::classwxObject("wxObject", NULL
, NULL
, sizeof(wxObject
), NULL
);
171 wxClassInfo
*wxClassInfo::first
= NULL
;
172 wxClassInfo
wxClassInfo::classTable(wxKEY_STRING
);
174 #include "wx/button.h"
175 #include "wx/bmpbuttn.h"
176 IMPLEMENT_DYNAMIC_CLASS(wxButton
, wxControl
)
177 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton
, wxButton
)
179 #include "wx/checkbox.h"
180 IMPLEMENT_DYNAMIC_CLASS(wxCheckBox
, wxControl
)
181 IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox
, wxCheckBox
)
183 #include "wx/choice.h"
184 IMPLEMENT_DYNAMIC_CLASS(wxChoice
, wxControl
)
187 #include "wx/clipbrd.h"
188 IMPLEMENT_DYNAMIC_CLASS(wxClipboard
, wxObject
)
189 IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient
, wxObject
)
193 #include "wx/combobox.h"
194 IMPLEMENT_DYNAMIC_CLASS(wxComboBox
, wxControl
)
198 #include "wx/dcmemory.h"
199 #include "wx/dcclient.h"
200 #include "wx/dcscreen.h"
201 IMPLEMENT_ABSTRACT_CLASS(wxDC
, wxObject
)
202 IMPLEMENT_DYNAMIC_CLASS(wxWindowDC
, wxDC
)
203 IMPLEMENT_DYNAMIC_CLASS(wxPaintDC
, wxWindowDC
)
204 IMPLEMENT_DYNAMIC_CLASS(wxClientDC
, wxWindowDC
)
205 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC
, wxWindowDC
)
206 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
, wxDC
)
208 #if defined(__WXMSW__)
209 #include "wx/dcprint.h"
210 IMPLEMENT_CLASS(wxPrinterDC
, wxDC
)
213 #include "wx/dialog.h"
214 IMPLEMENT_DYNAMIC_CLASS(wxDialog
, wxWindow
)
216 #include "wx/frame.h"
217 IMPLEMENT_DYNAMIC_CLASS(wxFrame
, wxWindow
)
220 IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame
, wxFrame
)
221 IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame
, wxFrame
)
222 IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow
, wxWindow
)
224 #include "wx/cmndata.h"
225 IMPLEMENT_DYNAMIC_CLASS(wxColourData
, wxObject
)
226 IMPLEMENT_DYNAMIC_CLASS(wxFontData
, wxObject
)
227 IMPLEMENT_DYNAMIC_CLASS(wxPrintData
, wxObject
)
229 #include "wx/colordlg.h"
230 #include "wx/fontdlg.h"
232 #if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW
233 #include "wx/generic/colordlg.h"
234 #include "wx/generic/fontdlg.h"
235 IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog
, wxDialog
)
236 IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog
, wxDialog
)
239 // X defines wxColourDialog to be wxGenericColourDialog
241 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
242 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog
, wxDialog
)
245 #include "wx/gdicmn.h"
247 #include "wx/brush.h"
249 #include "wx/palette.h"
251 #include "wx/cursor.h"
253 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
254 IMPLEMENT_CLASS(wxColourDatabase
, wxList
)
255 IMPLEMENT_DYNAMIC_CLASS(wxFontList
, wxList
)
256 IMPLEMENT_DYNAMIC_CLASS(wxPenList
, wxList
)
257 IMPLEMENT_DYNAMIC_CLASS(wxBrushList
, wxList
)
258 IMPLEMENT_DYNAMIC_CLASS(wxBitmapList
, wxList
)
262 IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject)
263 IMPLEMENT_DYNAMIC_CLASS(wxRealPoint, wxObject)
268 IMPLEMENT_DYNAMIC_CLASS(wxHashTable
, wxObject
)
270 #include "wx/helpbase.h"
271 IMPLEMENT_CLASS(wxHelpControllerBase
, wxObject
)
276 #include "wx/msw/helpwin.h"
277 IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController
, wxHelpControllerBase
)
280 // Generic wxHelp controller
281 IMPLEMENT_CLASS(wxXLPHelpController
, wxHelpControllerBase
)
284 IMPLEMENT_CLASS(wxXLPHelpClient
, wxDDEClient
)
285 IMPLEMENT_CLASS(wxXLPHelpConnection
, wxDDEConnection
)
287 IMPLEMENT_CLASS(wxXLPHelpClient
, wxTCPClient
)
288 IMPLEMENT_CLASS(wxXLPHelpConnection
, wxTCPConnection
)
293 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
296 IMPLEMENT_DYNAMIC_CLASS(wxNode
, wxObject
)
297 IMPLEMENT_DYNAMIC_CLASS(wxList
, wxObject
)
298 IMPLEMENT_DYNAMIC_CLASS(wxStringList
, wxList
)
300 #if wxUSE_PRINTING_ARCHITECTURE
301 #include "wx/print.h"
302 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog
, wxDialog
)
303 IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase
, wxObject
)
304 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter
, wxPrinterBase
)
305 IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter
, wxPrinterBase
)
306 IMPLEMENT_ABSTRACT_CLASS(wxPrintout
, wxObject
)
307 IMPLEMENT_CLASS(wxPreviewCanvas
, wxWindow
)
308 IMPLEMENT_CLASS(wxPreviewControlBar
, wxWindow
)
309 IMPLEMENT_CLASS(wxPreviewFrame
, wxFrame
)
310 IMPLEMENT_CLASS(wxPrintPreviewBase
, wxObject
)
311 IMPLEMENT_CLASS(wxPostScriptPrintPreview
, wxPrintPreviewBase
)
312 IMPLEMENT_CLASS(wxWindowsPrintPreview
, wxPrintPreviewBase
)
313 IMPLEMENT_CLASS(wxGenericPrintDialog
, wxDialog
)
314 IMPLEMENT_CLASS(wxGenericPrintSetupDialog
, wxDialog
)
319 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC
, wxDC
)
320 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData
, wxObject
)
321 IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData
, wxObject
)
322 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType
, wxObject
)
323 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase
, wxList
)
326 #if wxUSE_WX_RESOURCES
327 #include "wx/resource.h"
328 IMPLEMENT_DYNAMIC_CLASS(wxItemResource
, wxObject
)
329 IMPLEMENT_DYNAMIC_CLASS(wxResourceTable
, wxHashTable
)
332 #include "wx/event.h"
333 IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler
, wxObject
)
334 IMPLEMENT_ABSTRACT_CLASS(wxEvent
, wxObject
)
335 IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent
, wxEvent
)
336 IMPLEMENT_DYNAMIC_CLASS(wxNotifyEvent
, wxCommandEvent
)
337 IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent
, wxCommandEvent
)
338 IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent
, wxEvent
)
339 IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent
, wxEvent
)
340 IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent
, wxEvent
)
341 IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent
, wxEvent
)
342 IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent
, wxEvent
)
343 IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent
, wxEvent
)
344 IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent
, wxEvent
)
345 IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent
, wxEvent
)
346 IMPLEMENT_DYNAMIC_CLASS(wxShowEvent
, wxEvent
)
347 IMPLEMENT_DYNAMIC_CLASS(wxMaximizeEvent
, wxEvent
)
348 IMPLEMENT_DYNAMIC_CLASS(wxIconizeEvent
, wxEvent
)
349 IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent
, wxEvent
)
350 IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent
, wxEvent
)
351 IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent
, wxEvent
)
352 IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent
, wxEvent
)
353 IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent
, wxEvent
)
354 IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent
, wxEvent
)
355 IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent
, wxEvent
)
356 IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent
, wxEvent
)
357 IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent
, wxEvent
)
359 #include "wx/utils.h"
360 IMPLEMENT_DYNAMIC_CLASS(wxPathList
, wxList
)
362 // IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject)
364 #include "wx/process.h"
365 IMPLEMENT_DYNAMIC_CLASS(wxProcess
, wxEvtHandler
)
369 IMPLEMENT_DYNAMIC_CLASS(wxDate
, wxObject
)
372 #if wxUSE_DOC_VIEW_ARCHITECTURE
373 #include "wx/docview.h"
374 //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
375 IMPLEMENT_ABSTRACT_CLASS(wxDocument
, wxEvtHandler
)
376 IMPLEMENT_ABSTRACT_CLASS(wxView
, wxEvtHandler
)
377 IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate
, wxObject
)
378 IMPLEMENT_DYNAMIC_CLASS(wxDocManager
, wxEvtHandler
)
379 IMPLEMENT_CLASS(wxDocChildFrame
, wxFrame
)
380 IMPLEMENT_CLASS(wxDocParentFrame
, wxFrame
)
381 #if wxUSE_PRINTING_ARCHITECTURE
382 IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout
, wxPrintout
)
384 IMPLEMENT_CLASS(wxCommand
, wxObject
)
385 IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor
, wxObject
)
386 IMPLEMENT_DYNAMIC_CLASS(wxFileHistory
, wxObject
)
389 #if wxUSE_CONSTRAINTS
390 #include "wx/layout.h"
391 IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint
, wxObject
)
392 IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints
, wxObject
)
393 IMPLEMENT_DYNAMIC_CLASS(wxSizer
, wxObject
)
394 IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer
, wxSizer
)
398 #include "wx/tbarbase.h"
399 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool
, wxObject
)
400 IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase
, wxControl
)
402 #include "wx/tbarsmpl.h"
403 IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple
, wxToolBarBase
)
406 #include "wx/tbarmsw.h"
407 IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW
, wxToolBarBase
)
409 #include "wx/tbar95.h"
410 IMPLEMENT_DYNAMIC_CLASS(wxToolBar95
, wxToolBarBase
)
417 #include "wx/sckaddr.h"
419 IMPLEMENT_DYNAMIC_CLASS(wxIPV4address
, wxSockAddress
)
421 IMPLEMENT_DYNAMIC_CLASS(wxIPV6address
, wxSockAddress
)
424 IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress
, wxSockAddress
)
427 #include "wx/socket.h"
429 IMPLEMENT_CLASS(wxSocketBase
, wxEvtHandler
)
430 IMPLEMENT_CLASS(wxSocketClient
, wxSocketBase
)
431 IMPLEMENT_CLASS(wxSocketServer
, wxSocketBase
)
432 IMPLEMENT_CLASS(wxSocketHandler
, wxObject
)
433 IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent
, wxEvent
)
437 IMPLEMENT_CLASS(wxProtoInfo
, wxObject
)
438 IMPLEMENT_CLASS(wxURL
, wxObject
)
440 #include "wx/protocol/http.h"
442 IMPLEMENT_DYNAMIC_CLASS(wxHTTP
, wxProtocol
)
443 IMPLEMENT_PROTOCOL(wxHTTP
, "http", "80", TRUE
)
445 #include "wx/protocol/ftp.h"
447 IMPLEMENT_DYNAMIC_CLASS(wxFTP
, wxProtocol
)
448 IMPLEMENT_PROTOCOL(wxFTP
, "ftp", "21", TRUE
)
450 #include "wx/protocol/sckfile.h"
452 IMPLEMENT_DYNAMIC_CLASS(wxFileProto
, wxProtocol
)
453 IMPLEMENT_PROTOCOL(wxFileProto
, "file", NULL
, FALSE
)
455 #include "wx/sckipc.h"
457 IMPLEMENT_DYNAMIC_CLASS(wxTCPServer
, wxServerBase
)
458 IMPLEMENT_DYNAMIC_CLASS(wxTCPClient
, wxClientBase
)
459 IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection
, wxConnectionBase
)
463 #include "wx/statusbr.h"
465 IMPLEMENT_DYNAMIC_CLASS(wxStatusBar
, wxWindow
)
467 BEGIN_EVENT_TABLE(wxStatusBar
, wxWindow
)
468 EVT_PAINT(wxStatusBar::OnPaint
)
469 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged
)
474 IMPLEMENT_DYNAMIC_CLASS(wxTime
, wxObject
)
477 #if !USE_GNU_WXSTRING
478 #include "wx/string.h"
479 IMPLEMENT_DYNAMIC_CLASS(wxString
, wxObject
)
483 IMPLEMENT_DYNAMIC_CLASS(wxXColormap
, wxObject
)
484 IMPLEMENT_DYNAMIC_CLASS(wxXFont
, wxObject
)
485 IMPLEMENT_DYNAMIC_CLASS(wxXCursor
, wxObject
)
487 IMPLEMENT_DYNAMIC_CLASS(wxFont
, wxGDIObject
)
488 IMPLEMENT_DYNAMIC_CLASS(wxPalette
, wxGDIObject
)
489 IMPLEMENT_DYNAMIC_CLASS(wxPen
, wxGDIObject
)
490 IMPLEMENT_DYNAMIC_CLASS(wxBrush
, wxGDIObject
)
491 IMPLEMENT_DYNAMIC_CLASS(wxIcon
, wxBitmap
)
492 IMPLEMENT_DYNAMIC_CLASS(wxCursor
, wxBitmap
)
493 IMPLEMENT_DYNAMIC_CLASS(wxBitmap
, wxGDIObject
)
494 IMPLEMENT_DYNAMIC_CLASS(wxMask
, wxObject
)
496 // This will presumably be implemented on other platforms too
498 IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler
, wxObject
)
499 IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler
, wxBitmapHandler
)
500 IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler
, wxBitmapHandler
)
501 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler
, wxBitmapHandler
)
502 IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler
, wxBitmapHandler
)
503 IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler
, wxBitmapHandler
)
504 IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler
, wxBitmapHandler
)
507 #include "wx/statbox.h"
508 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
512 IMPLEMENT_CLASS(wxServerBase
, wxObject
)
513 IMPLEMENT_CLASS(wxClientBase
, wxObject
)
514 IMPLEMENT_CLASS(wxConnectionBase
, wxObject
)
516 IMPLEMENT_DYNAMIC_CLASS(wxDDEServer
, wxServerBase
)
517 IMPLEMENT_DYNAMIC_CLASS(wxDDEClient
, wxClientBase
)
518 IMPLEMENT_CLASS(wxDDEConnection
, wxConnectionBase
)
521 IMPLEMENT_ABSTRACT_CLASS(wxControl
, wxWindow
)
523 #include "wx/listbox.h"
524 IMPLEMENT_DYNAMIC_CLASS(wxListBox
, wxControl
)
526 #include "wx/checklst.h"
527 IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox
, wxListBox
)
529 IMPLEMENT_DYNAMIC_CLASS(wxApp
, wxEvtHandler
)
532 IMPLEMENT_DYNAMIC_CLASS(wxMenu
, wxEvtHandler
)
533 IMPLEMENT_DYNAMIC_CLASS(wxMenuItem
, wxObject
)
534 IMPLEMENT_DYNAMIC_CLASS(wxMenuBar
, wxEvtHandler
)
536 #include "wx/stattext.h"
537 #include "wx/statbmp.h"
538 IMPLEMENT_DYNAMIC_CLASS(wxStaticText
, wxControl
)
539 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap
, wxControl
)
542 #include "wx/metafile.h"
543 IMPLEMENT_DYNAMIC_CLASS(wxMetaFile
, wxObject
)
544 IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC
, wxDC
)
547 #include "wx/radiobox.h"
548 #include "wx/radiobut.h"
549 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox
, wxControl
)
551 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton
, wxControl
)
552 // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
554 #include "wx/scrolbar.h"
555 IMPLEMENT_DYNAMIC_CLASS(wxScrollBar
, wxControl
)
557 #if WXWIN_COMPATIBILITY
558 BEGIN_EVENT_TABLE(wxScrollBar
, wxControl
)
559 EVT_SCROLL(wxScrollBar::OnScroll
)
563 #include "wx/slider.h"
564 IMPLEMENT_DYNAMIC_CLASS(wxSlider
, wxControl
)
566 #if WXWIN_COMPATIBILITY
567 BEGIN_EVENT_TABLE(wxSlider
, wxControl
)
568 EVT_SCROLL(wxSlider::OnScroll
)
572 #include "wx/timer.h"
573 IMPLEMENT_ABSTRACT_CLASS(wxTimer
, wxObject
)
575 #include "wx/textctrl.h"
576 IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl
, wxControl
)
578 #include "wx/window.h"
579 IMPLEMENT_DYNAMIC_CLASS(wxWindow
, wxEvtHandler
)
581 #include "wx/scrolwin.h"
582 IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow
, wxWindow
)
584 #include "wx/panel.h"
585 IMPLEMENT_DYNAMIC_CLASS(wxPanel
, wxWindow
)
587 #include "wx/msgbxdlg.h"
588 #include "wx/textdlg.h"
589 #include "wx/filedlg.h"
590 #include "wx/dirdlg.h"
591 #include "wx/choicdlg.h"
593 #if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW
594 #include "wx/generic/msgdlgg.h"
595 IMPLEMENT_CLASS(wxGenericMessageDialog
, wxDialog
)
598 IMPLEMENT_CLASS(wxTextEntryDialog
, wxDialog
)
599 IMPLEMENT_CLASS(wxSingleChoiceDialog
, wxDialog
)
600 IMPLEMENT_CLASS(wxFileDialog
, wxDialog
)
601 IMPLEMENT_CLASS(wxDirDialog
, wxDialog
)
604 IMPLEMENT_CLASS(wxMessageDialog
)
609 #include "../../contrib/xmgauge/gauge.h"
611 #include "wx_gauge.h"
612 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
)
616 IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid
, wxPanel
)
618 ///// Event tables (also must be in one, statically-linked file for shared libraries)
620 // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here
621 const wxEventTable
*wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable
; }
623 const wxEventTable
wxEvtHandler::sm_eventTable
=
624 { NULL
, &wxEvtHandler::sm_eventTableEntries
[0] };
626 const wxEventTableEntry
wxEvtHandler::sm_eventTableEntries
[] = { { 0, 0, 0, NULL
} };
628 BEGIN_EVENT_TABLE(wxFrame
, wxWindow
)
629 EVT_ACTIVATE(wxFrame::OnActivate
)
630 EVT_SIZE(wxFrame::OnSize
)
631 EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight
)
632 EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged
)
633 EVT_IDLE(wxFrame::OnIdle
)
634 EVT_CLOSE(wxFrame::OnCloseWindow
)
637 BEGIN_EVENT_TABLE(wxDialog
, wxPanel
)
638 EVT_BUTTON(wxID_OK
, wxDialog::OnOK
)
639 EVT_BUTTON(wxID_APPLY
, wxDialog::OnApply
)
640 EVT_BUTTON(wxID_CANCEL
, wxDialog::OnCancel
)
641 EVT_CHAR_HOOK(wxDialog::OnCharHook
)
642 EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged
)
643 EVT_CLOSE(wxDialog::OnCloseWindow
)
646 BEGIN_EVENT_TABLE(wxWindow
, wxEvtHandler
)
647 EVT_CHAR(wxWindow::OnChar
)
648 EVT_SIZE(wxWindow::Size
)
649 EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground
)
650 EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged
)
651 EVT_INIT_DIALOG(wxWindow::OnInitDialog
)
652 EVT_IDLE(wxWindow::OnIdle
)
655 BEGIN_EVENT_TABLE(wxScrolledWindow
, wxWindow
)
656 EVT_SCROLL(wxScrolledWindow::OnScroll
)
657 EVT_SIZE(wxScrolledWindow::OnSize
)
658 EVT_PAINT(wxScrolledWindow::OnPaint
)
661 BEGIN_EVENT_TABLE(wxPanel
, wxWindow
)
662 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged
)
665 BEGIN_EVENT_TABLE(wxTextCtrl
, wxControl
)
666 EVT_CHAR(wxTextCtrl::OnChar
)
667 EVT_DROP_FILES(wxTextCtrl::OnDropFiles
)
668 EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground
)
672 BEGIN_EVENT_TABLE(wxMDIParentWindow
, wxFrame
)
673 EVT_SIZE(wxMDIParentWindow::OnSize
)
674 EVT_ACTIVATE(wxMDIParentWindow::OnActivate
)
675 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged
)
678 BEGIN_EVENT_TABLE(wxMDIClientWindow
, wxWindow
)
679 EVT_SCROLL(wxMDIClientWindow::OnScroll
)
683 BEGIN_EVENT_TABLE(wxToolBarBase
, wxControl
)
684 EVT_SCROLL(wxToolBarBase::OnScroll
)
685 EVT_SIZE(wxToolBarBase::OnSize
)
686 EVT_IDLE(wxToolBarBase::OnIdle
)
689 BEGIN_EVENT_TABLE(wxToolBarSimple
, wxToolBarBase
)
690 EVT_SIZE(wxToolBarSimple::OnSize
)
691 EVT_PAINT(wxToolBarSimple::OnPaint
)
692 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus
)
693 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent
)
697 BEGIN_EVENT_TABLE(wxToolBarMSW
, wxToolBarBase
)
698 EVT_SIZE(wxToolBarMSW::OnSize
)
699 EVT_PAINT(wxToolBarMSW::OnPaint
)
700 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent
)
703 BEGIN_EVENT_TABLE(wxToolBar95
, wxToolBarBase
)
704 EVT_SIZE(wxToolBar95::OnSize
)
705 EVT_PAINT(wxToolBar95::OnPaint
)
706 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus
)
707 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent
)
708 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged
)
712 BEGIN_EVENT_TABLE(wxGenericGrid
, wxPanel
)
713 EVT_SIZE(wxGenericGrid::OnSize
)
714 EVT_PAINT(wxGenericGrid::OnPaint
)
715 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent
)
716 EVT_TEXT(wxGRID_TEXT_CTRL
, wxGenericGrid::OnText
)
717 EVT_COMMAND_SCROLL(wxGRID_HSCROLL
, wxGenericGrid::OnGridScroll
)
718 EVT_COMMAND_SCROLL(wxGRID_VSCROLL
, wxGenericGrid::OnGridScroll
)
721 BEGIN_EVENT_TABLE(wxControl
, wxWindow
)
722 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground
)
725 #if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW
726 BEGIN_EVENT_TABLE(wxGenericMessageDialog
, wxDialog
)
727 EVT_BUTTON(wxID_YES
, wxGenericMessageDialog::OnYes
)
728 EVT_BUTTON(wxID_NO
, wxGenericMessageDialog::OnNo
)
729 EVT_BUTTON(wxID_CANCEL
, wxGenericMessageDialog::OnCancel
)
732 BEGIN_EVENT_TABLE(wxGenericColourDialog
, wxDialog
)
733 EVT_BUTTON(wxID_ADD_CUSTOM
, wxGenericColourDialog::OnAddCustom
)
734 EVT_SLIDER(wxID_RED_SLIDER
, wxGenericColourDialog::OnRedSlider
)
735 EVT_SLIDER(wxID_GREEN_SLIDER
, wxGenericColourDialog::OnGreenSlider
)
736 EVT_SLIDER(wxID_BLUE_SLIDER
, wxGenericColourDialog::OnBlueSlider
)
737 EVT_PAINT(wxGenericColourDialog::OnPaint
)
738 EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent
)
741 BEGIN_EVENT_TABLE(wxGenericFontDialog
, wxDialog
)
742 EVT_CHECKBOX(wxID_FONT_UNDERLINE
, wxGenericFontDialog::OnChangeFont
)
743 EVT_CHOICE(wxID_FONT_STYLE
, wxGenericFontDialog::OnChangeFont
)
744 EVT_CHOICE(wxID_FONT_WEIGHT
, wxGenericFontDialog::OnChangeFont
)
745 EVT_CHOICE(wxID_FONT_FAMILY
, wxGenericFontDialog::OnChangeFont
)
746 EVT_CHOICE(wxID_FONT_COLOUR
, wxGenericFontDialog::OnChangeFont
)
747 EVT_CHOICE(wxID_FONT_SIZE
, wxGenericFontDialog::OnChangeFont
)
748 EVT_PAINT(wxGenericFontDialog::OnPaint
)
751 BEGIN_EVENT_TABLE(wxGenericPrintDialog
, wxDialog
)
752 EVT_BUTTON(wxID_OK
, wxGenericPrintDialog::OnOK
)
753 EVT_BUTTON(wxPRINTID_SETUP
, wxGenericPrintDialog::OnSetup
)
754 EVT_RADIOBOX(wxPRINTID_RANGE
, wxGenericPrintDialog::OnRange
)
759 BEGIN_EVENT_TABLE(wxTextEntryDialog
, wxDialog
)
760 EVT_BUTTON(wxID_OK
, wxTextEntryDialog::OnOK
)
763 BEGIN_EVENT_TABLE(wxSingleChoiceDialog
, wxDialog
)
764 EVT_BUTTON(wxID_OK
, wxSingleChoiceDialog::OnOK
)
767 #include "wx/prntbase.h"
769 BEGIN_EVENT_TABLE(wxPrintAbortDialog
, wxDialog
)
770 EVT_BUTTON(wxID_CANCEL
, wxPrintAbortDialog::OnCancel
)
773 BEGIN_EVENT_TABLE(wxPreviewControlBar
, wxWindow
)
774 EVT_BUTTON(wxID_PREVIEW_CLOSE
, wxPreviewControlBar::OnClose
)
775 EVT_BUTTON(wxID_PREVIEW_PRINT
, wxPreviewControlBar::OnPrint
)
776 EVT_BUTTON(wxID_PREVIEW_PREVIOUS
, wxPreviewControlBar::OnPrevious
)
777 EVT_BUTTON(wxID_PREVIEW_NEXT
, wxPreviewControlBar::OnNext
)
778 EVT_CHOICE(wxID_PREVIEW_ZOOM
, wxPreviewControlBar::OnZoom
)
784 const wxSize
wxDefaultSize(-1, -1);
785 const wxPoint
wxDefaultPosition(-1, -1);