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(); }
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)
};
return (*this);
}
-// ==========================================================================
-// wxSocketEvent
-// ==========================================================================
-
-wxSocketEvent::wxSocketEvent(int id) : wxEvent(id)
-{
- SetEventType( (wxEventType)wxEVT_SOCKET );
-}
-
-void wxSocketEvent::CopyObject(wxObject& object_dest) const
-{
- wxSocketEvent *event = (wxSocketEvent *)&object_dest;
-
- wxEvent::CopyObject(object_dest);
-
- event->m_event = m_event;
- event->m_clientData = m_clientData;
-}
-
// ==========================================================================
// wxSocketModule
// ==========================================================================