X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c9eff305505d6e3a63026c542004d518d997d2a..7183fd726e0f2e493bf60e8e623990e5f34a2476:/include/wx/socket.h diff --git a/include/wx/socket.h b/include/wx/socket.h index 0b955b128d..aa1452743f 100644 --- a/include/wx/socket.h +++ b/include/wx/socket.h @@ -323,10 +323,11 @@ public: class WXDLLEXPORT wxSocketEvent : public wxEvent { - DECLARE_DYNAMIC_CLASS(wxSocketEvent) - public: - wxSocketEvent(int id = 0); + wxSocketEvent(int id = 0) + : wxEvent(id, wxEVT_SOCKET) + { + } wxSocketNotify GetSocketEvent() const { return m_event; } wxSocketBase *GetSocket() const { return (wxSocketBase *) GetEventObject(); } @@ -338,19 +339,24 @@ public: wxSocketBase *Socket() const { return (wxSocketBase *) GetEventObject(); } #endif // WXWIN_COMPATIBILITY_2 - void CopyObject(wxObject& object_dest) const; + virtual wxEvent *Clone() const { return new wxSocketEvent(*this); } public: wxSocketNotify m_event; void *m_clientData; + + DECLARE_DYNAMIC_CLASS(wxSocketEvent) }; typedef void (wxEvtHandler::*wxSocketEventFunction)(wxSocketEvent&); -#define EVT_SOCKET(id, func) { wxEVT_SOCKET, id, -1, \ - (wxObjectEventFunction) (wxEventFunction) (wxSocketEventFunction) & func, \ - (wxObject *) NULL }, +#define EVT_SOCKET(id, func) \ + DECLARE_EVENT_TABLE_ENTRY( wxEVT_SOCKET, id, -1, \ + (wxObjectEventFunction) \ + (wxEventFunction) \ + (wxSocketEventFunction) & func, \ + (wxObject *) NULL ), #endif