X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/26a87b69a0686db5700ae66e17c64c1bfe14d557..2506aab63c8e21aae493f99f4dcc0c622d6a27e0:/src/msw/data.cpp?ds=sidebyside diff --git a/src/msw/data.cpp b/src/msw/data.cpp index fbde5890cc..da26953b96 100644 --- a/src/msw/data.cpp +++ b/src/msw/data.cpp @@ -6,11 +6,11 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ -#pragma implementation +#pragma implementation "data.h" #endif // For compilers that support precompilation, includes "wx.h". @@ -24,16 +24,24 @@ #include "wx/wx.h" #endif +#include "wx/prntbase.h" + #define _MAXPATHLEN 500 // Useful buffer, initialized in wxCommonInit -char *wxBuffer = NULL; +wxChar *wxBuffer = NULL; // Windows List -wxList wxTopLevelWindows; +wxWindowList wxTopLevelWindows; // List of windows pending deletion -wxList wxPendingDelete; +wxList WXDLLEXPORT wxPendingDelete; + +// List of events pending processing +#if wxUSE_THREADS +wxList *wxPendingEvents = NULL; +wxCriticalSection *wxPendingEventsLocker = NULL; +#endif // Current cursor, in order to hang on to // cursor handle when setting the cursor globally @@ -99,6 +107,7 @@ wxCursor *wxHOURGLASS_CURSOR = NULL; wxCursor *wxCROSS_CURSOR = NULL; // 'Null' objects +wxAcceleratorTable wxNullAcceleratorTable; wxBitmap wxNullBitmap; wxIcon wxNullIcon; wxCursor wxNullCursor; @@ -109,54 +118,51 @@ wxFont wxNullFont; wxColour wxNullColour; // Default window names -const char *wxButtonNameStr = "button"; -const char *wxCanvasNameStr = "canvas"; -const char *wxCheckBoxNameStr = "check"; -const char *wxChoiceNameStr = "choice"; -const char *wxComboBoxNameStr = "comboBox"; -const char *wxDialogNameStr = "dialog"; -const char *wxFrameNameStr = "frame"; -const char *wxGaugeNameStr = "gauge"; -const char *wxStaticBoxNameStr = "groupBox"; -const char *wxListBoxNameStr = "listBox"; -const char *wxStaticTextNameStr = "message"; -const char *wxStaticBitmapNameStr = "message"; -const char *wxMultiTextNameStr = "multitext"; -const char *wxPanelNameStr = "panel"; -const char *wxRadioBoxNameStr = "radioBox"; -const char *wxRadioButtonNameStr = "radioButton"; -const char *wxBitmapRadioButtonNameStr = "radioButton"; -const char *wxScrollBarNameStr = "scrollBar"; -const char *wxSliderNameStr = "slider"; -const char *wxStaticNameStr = "static"; -const char *wxTextCtrlWindowNameStr = "textWindow"; -const char *wxTextCtrlNameStr = "text"; -const char *wxVirtListBoxNameStr = "virtListBox"; -const char *wxButtonBarNameStr = "buttonbar"; -const char *wxEnhDialogNameStr = "Shell"; -const char *wxToolBarNameStr = "toolbar"; -const char *wxStatusLineNameStr = "status_line"; -const char *wxEmptyString = ""; -const char *wxGetTextFromUserPromptStr = "Input Text"; -const char *wxMessageBoxCaptionStr = "Message"; -const char *wxFileSelectorPromptStr = "Select a file"; -const char *wxFileSelectorDefaultWildcardStr = "*.*"; -const char *wxInternalErrorStr = "wxWindows Internal Error"; -const char *wxFatalErrorStr = "wxWindows Fatal Error"; +const wxChar *wxButtonNameStr = _T("button"); +const wxChar *wxCanvasNameStr = _T("canvas"); +const wxChar *wxCheckBoxNameStr = _T("check"); +const wxChar *wxChoiceNameStr = _T("choice"); +const wxChar *wxComboBoxNameStr = _T("comboBox"); +const wxChar *wxDialogNameStr = _T("dialog"); +const wxChar *wxFrameNameStr = _T("frame"); +const wxChar *wxGaugeNameStr = _T("gauge"); +const wxChar *wxStaticBoxNameStr = _T("groupBox"); +const wxChar *wxListBoxNameStr = _T("listBox"); +const wxChar *wxStaticTextNameStr = _T("message"); +const wxChar *wxStaticBitmapNameStr = _T("message"); +const wxChar *wxMultiTextNameStr = _T("multitext"); +const wxChar *wxPanelNameStr = _T("panel"); +const wxChar *wxRadioBoxNameStr = _T("radioBox"); +const wxChar *wxRadioButtonNameStr = _T("radioButton"); +const wxChar *wxBitmapRadioButtonNameStr = _T("radioButton"); +const wxChar *wxScrollBarNameStr = _T("scrollBar"); +const wxChar *wxSliderNameStr = _T("slider"); +const wxChar *wxStaticNameStr = _T("static"); +const wxChar *wxTextCtrlWindowNameStr = _T("textWindow"); +const wxChar *wxTextCtrlNameStr = _T("text"); +const wxChar *wxVirtListBoxNameStr = _T("virtListBox"); +const wxChar *wxButtonBarNameStr = _T("buttonbar"); +const wxChar *wxEnhDialogNameStr = _T("Shell"); +const wxChar *wxToolBarNameStr = _T("toolbar"); +const wxChar *wxStatusLineNameStr = _T("status_line"); +const wxChar *wxEmptyString = _T(""); +const wxChar *wxGetTextFromUserPromptStr = _T("Input Text"); +const wxChar *wxMessageBoxCaptionStr = _T("Message"); +const wxChar *wxFileSelectorPromptStr = _T("Select a file"); +const wxChar *wxFileSelectorDefaultWildcardStr = _T("*.*"); +const wxChar *wxInternalErrorStr = _T("wxWindows Internal Error"); +const wxChar *wxFatalErrorStr = _T("wxWindows Fatal Error"); +const wxChar *wxTreeCtrlNameStr = _T("treeCtrl"); // See wx/utils.h -const char *wxFloatToStringStr = "%.2f"; -const char *wxDoubleToStringStr = "%.2f"; +const wxChar *wxFloatToStringStr = _T("%.2f"); +const wxChar *wxDoubleToStringStr = _T("%.2f"); -#ifdef __WINDOWS__ -const char *wxUserResourceStr = "TEXT"; +#ifdef __WXMSW__ +const wxChar *wxUserResourceStr = _T("TEXT"); #endif -#if USE_POSTSCRIPT -wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; -#endif - -#if USE_SHARED_LIBRARY +#if wxUSE_SHARED_LIBRARY /* * For wxWindows to be made into a dynamic library (e.g. Sun), * all IMPLEMENT_... macros must be in one place. @@ -166,6 +172,7 @@ wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; // Hand-coded IMPLEMENT... macro for wxObject (define static data) wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL); wxClassInfo *wxClassInfo::first = NULL; +wxClassInfo wxClassInfo::classTable(wxKEY_STRING); #include "wx/button.h" #include "wx/bmpbuttn.h" @@ -179,13 +186,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) #include "wx/choice.h" IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) -#if USE_CLIPBOARD +#if wxUSE_CLIPBOARD #include "wx/clipbrd.h" IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject) #endif -#if USE_COMBOBOX +#if wxUSE_COMBOBOX #include "wx/combobox.h" IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) #endif @@ -195,13 +202,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) #include "wx/dcclient.h" #include "wx/dcscreen.h" IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC) IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) +IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC) +IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC) IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) +IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) -#if defined(__WINDOWS__) +#if defined(__WXMSW__) #include "wx/dcprint.h" IMPLEMENT_CLASS(wxPrinterDC, wxDC) #endif @@ -225,7 +232,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject) #include "wx/colordlg.h" #include "wx/fontdlg.h" -#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW +#if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW #include "wx/generic/colordlg.h" #include "wx/generic/fontdlg.h" IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog) @@ -253,10 +260,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList) IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList) IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList) +/* #if (!USE_TYPEDEFS) IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxRealPoint, wxObject) #endif +*/ #include "wx/hash.h" IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject) @@ -264,9 +273,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject) #include "wx/helpbase.h" IMPLEMENT_CLASS(wxHelpControllerBase, wxObject) -#if USE_HELP +#if wxUSE_HELP -#ifdef __WINDOWS__ +#ifdef __WXMSW__ #include "wx/msw/helpwin.h" IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase) #endif @@ -274,7 +283,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase) // Generic wxHelp controller IMPLEMENT_CLASS(wxXLPHelpController, wxHelpControllerBase) -#ifdef __WINDOWS__ +#ifdef __WXMSW__ IMPLEMENT_CLASS(wxXLPHelpClient, wxDDEClient) IMPLEMENT_CLASS(wxXLPHelpConnection, wxDDEConnection) #else @@ -291,7 +300,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList) -#if USE_PRINTING_ARCHITECTURE +#if wxUSE_PRINTING_ARCHITECTURE #include "wx/print.h" IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase, wxObject) @@ -308,16 +317,17 @@ IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) #endif -#if USE_POSTSCRIPT -#include "wx/postscrp.h" +#if wxUSE_POSTSCRIPT +#include "wx/dcps.h" IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject) +#endif + IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList) -#endif -#if USE_WX_RESOURCES +#if wxUSE_WX_RESOURCES #include "wx/resource.h" IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) @@ -327,6 +337,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent) +IMPLEMENT_DYNAMIC_CLASS(wxNotifyEvent, wxCommandEvent) IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent) IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent) IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent) @@ -347,18 +358,22 @@ IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent) IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent) IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent) IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent) +IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) #include "wx/utils.h" IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList) -IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject) +// IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject) -#if USE_TIMEDATE +#include "wx/process.h" +IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) + +#if wxUSE_TIMEDATE #include "wx/date.h" IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) #endif -#if USE_DOC_VIEW_ARCHITECTURE +#if wxUSE_DOC_VIEW_ARCHITECTURE #include "wx/docview.h" //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler) @@ -367,7 +382,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler) IMPLEMENT_CLASS(wxDocChildFrame, wxFrame) IMPLEMENT_CLASS(wxDocParentFrame, wxFrame) -#if USE_PRINTING_ARCHITECTURE +#if wxUSE_PRINTING_ARCHITECTURE IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout) #endif IMPLEMENT_CLASS(wxCommand, wxObject) @@ -375,7 +390,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject) #endif -#if USE_CONSTRAINTS +#if wxUSE_CONSTRAINTS #include "wx/layout.h" IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject) @@ -383,7 +398,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer) #endif -#if USE_TOOLBAR +#if wxUSE_TOOLBAR #include "wx/tbarbase.h" IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl) @@ -391,7 +406,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl) #include "wx/tbarsmpl.h" IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase) -#ifdef __WINDOWS__ +#ifdef __WXMSW__ #include "wx/tbarmsw.h" IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase) @@ -401,16 +416,64 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase) #endif +#if wxUSE_SOCKETS + +#include "wx/sckaddr.h" + +IMPLEMENT_DYNAMIC_CLASS(wxIPV4address, wxSockAddress) +#ifdef ENABLE_IPV6 +IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxSockAddress) +#endif +#ifndef __UNIX__ +IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress) +#endif + +#include "wx/socket.h" + +IMPLEMENT_CLASS(wxSocketBase, wxEvtHandler) +IMPLEMENT_CLASS(wxSocketClient, wxSocketBase) +IMPLEMENT_CLASS(wxSocketServer, wxSocketBase) +IMPLEMENT_CLASS(wxSocketHandler, wxObject) +IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent, wxEvent) + +#include "wx/url.h" + +IMPLEMENT_CLASS(wxProtoInfo, wxObject) +IMPLEMENT_CLASS(wxURL, wxObject) + +#include "wx/protocol/http.h" + +IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol) +IMPLEMENT_PROTOCOL(wxHTTP, "http", "80", TRUE) + +#include "wx/protocol/ftp.h" + +IMPLEMENT_DYNAMIC_CLASS(wxFTP, wxProtocol) +IMPLEMENT_PROTOCOL(wxFTP, "ftp", "21", TRUE) + +#include "wx/protocol/sckfile.h" + +IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol) +IMPLEMENT_PROTOCOL(wxFileProto, "file", NULL, FALSE) + +#include "wx/sckipc.h" + +IMPLEMENT_DYNAMIC_CLASS(wxTCPServer, wxServerBase) +IMPLEMENT_DYNAMIC_CLASS(wxTCPClient, wxClientBase) +IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection, wxConnectionBase) + +#endif + #include "wx/statusbr.h" IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) BEGIN_EVENT_TABLE(wxStatusBar, wxWindow) - EVT_PAINT(wxStatusBar::OnPaint) + EVT_PAINT(wxStatusBar::OnPaint) EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged) END_EVENT_TABLE() -#if USE_TIMEDATE +#if wxUSE_TIMEDATE #include "wx/time.h" IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject) #endif @@ -420,7 +483,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject) #endif -#ifdef __MOTIF__ +#ifdef __WXMOTIF__ IMPLEMENT_DYNAMIC_CLASS(wxXColormap, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxXFont, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxXCursor, wxObject) @@ -435,7 +498,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) // This will presumably be implemented on other platforms too -#ifdef __WINDOWS__ +#ifdef __WXMSW__ IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler) @@ -448,7 +511,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler) #include "wx/statbox.h" IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) -#if USE_IPC +#if wxUSE_IPC #include "wx/dde.h" IMPLEMENT_CLASS(wxServerBase, wxObject) IMPLEMENT_CLASS(wxClientBase, wxObject) @@ -479,7 +542,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler) IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) -#if USE_METAFILE +#if wxUSE_METAFILE #include "wx/metafile.h" IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC) @@ -531,7 +594,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow) #include "wx/dirdlg.h" #include "wx/choicdlg.h" -#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW +#if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW #include "wx/generic/msgdlgg.h" IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) #endif @@ -541,12 +604,12 @@ IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) IMPLEMENT_CLASS(wxFileDialog, wxDialog) IMPLEMENT_CLASS(wxDirDialog, wxDialog) -#ifdef __WINDOWS__ +#ifdef __WXMSW__ IMPLEMENT_CLASS(wxMessageDialog) #endif -#if USE_GAUGE -#ifdef __MOTIF__ +#if wxUSE_GAUGE +#ifdef __WXMOTIF__ #include "../../contrib/xmgauge/gauge.h" #endif #include "wx_gauge.h" @@ -562,14 +625,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid, wxPanel) const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } const wxEventTable wxEvtHandler::sm_eventTable = - { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; + { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } }; BEGIN_EVENT_TABLE(wxFrame, wxWindow) - EVT_ACTIVATE(wxFrame::OnActivate) - EVT_SIZE(wxFrame::OnSize) - EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) + EVT_ACTIVATE(wxFrame::OnActivate) + EVT_SIZE(wxFrame::OnSize) + EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) EVT_IDLE(wxFrame::OnIdle) EVT_CLOSE(wxFrame::OnCloseWindow) @@ -604,12 +667,11 @@ BEGIN_EVENT_TABLE(wxPanel, wxWindow) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) - EVT_CHAR(wxTextCtrl::OnChar) - EVT_DROP_FILES(wxTextCtrl::OnDropFiles) - EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) + EVT_CHAR(wxTextCtrl::OnChar) + EVT_DROP_FILES(wxTextCtrl::OnDropFiles) END_EVENT_TABLE() -#ifdef __WINDOWS__ +#ifdef __WXMSW__ BEGIN_EVENT_TABLE(wxMDIParentWindow, wxFrame) EVT_SIZE(wxMDIParentWindow::OnSize) EVT_ACTIVATE(wxMDIParentWindow::OnActivate) @@ -628,32 +690,32 @@ BEGIN_EVENT_TABLE(wxToolBarBase, wxControl) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase) - EVT_SIZE(wxToolBarSimple::OnSize) - EVT_PAINT(wxToolBarSimple::OnPaint) - EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent) + EVT_SIZE(wxToolBarSimple::OnSize) + EVT_PAINT(wxToolBarSimple::OnPaint) + EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus) + EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent) END_EVENT_TABLE() -#ifdef __WINDOWS__ +#ifdef __WXMSW__ BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase) - EVT_SIZE(wxToolBarMSW::OnSize) - EVT_PAINT(wxToolBarMSW::OnPaint) - EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent) + EVT_SIZE(wxToolBarMSW::OnSize) + EVT_PAINT(wxToolBarMSW::OnPaint) + EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase) - EVT_SIZE(wxToolBar95::OnSize) - EVT_PAINT(wxToolBar95::OnPaint) - EVT_KILL_FOCUS(wxToolBar95::OnKillFocus) - EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent) + EVT_SIZE(wxToolBar95::OnSize) + EVT_PAINT(wxToolBar95::OnPaint) + EVT_KILL_FOCUS(wxToolBar95::OnKillFocus) + EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent) EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged) END_EVENT_TABLE() #endif BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel) - EVT_SIZE(wxGenericGrid::OnSize) - EVT_PAINT(wxGenericGrid::OnPaint) - EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent) + EVT_SIZE(wxGenericGrid::OnSize) + EVT_PAINT(wxGenericGrid::OnPaint) + EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent) EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText) EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll) EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll) @@ -663,30 +725,30 @@ BEGIN_EVENT_TABLE(wxControl, wxWindow) EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground) END_EVENT_TABLE() -#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW +#if !defined(__WXMSW__) || wxUSE_GENERIC_DIALOGS_IN_MSW BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) - EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) - EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) - EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) + EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) + EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) + EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog) - EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom) - EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider) - EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider) - EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider) - EVT_PAINT(wxGenericColourDialog::OnPaint) - EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent) + EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom) + EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider) + EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider) + EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider) + EVT_PAINT(wxGenericColourDialog::OnPaint) + EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog) - EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont) - EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) - EVT_PAINT(wxGenericFontDialog::OnPaint) + EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont) + EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont) + EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont) + EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont) + EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont) + EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) + EVT_PAINT(wxGenericFontDialog::OnPaint) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) @@ -698,25 +760,25 @@ END_EVENT_TABLE() #endif BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) + EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) - EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) + EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) END_EVENT_TABLE() #include "wx/prntbase.h" BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog) - EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel) + EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel) END_EVENT_TABLE() BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow) - EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose) - EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint) - EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious) - EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext) - EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom) + EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose) + EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint) + EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious) + EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext) + EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom) END_EVENT_TABLE() #endif