X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/25250d335f869088a3551db226f25079c28f65fb..67badd5753e70eb50de5ae43ff454e7c1f311e50:/include/wx/event.h diff --git a/include/wx/event.h b/include/wx/event.h index 7bc5cd914f..a1676933ff 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -69,7 +69,7 @@ typedef int wxEventType; // this is used to make the event table entry type safe, so that for an event // handler only a function with proper parameter list can be given. -#define wxStaticCastEvent(type, val) wx_static_cast(type, val) +#define wxStaticCastEvent(type, val) static_cast(val) #define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \ wxEventTableEntry(type, winid, idLast, fn, obj) @@ -908,10 +908,13 @@ public: // example) wxKeyEvent& operator=(const wxKeyEvent& evt) { - if (&evt != this) + if ( &evt != this ) { wxEvent::operator=(evt); - wxKeyboardState::operator=(evt); + + // Borland C++ 5.82 doesn't compile an explicit call to an + // implicitly defined operator=() so need to do it this way: + *static_cast(this) = evt; m_x = evt.m_x; m_y = evt.m_y; @@ -2294,21 +2297,21 @@ public: // winid and event type void Connect(int winid, int lastId, - int eventType, + wxEventType eventType, wxObjectEventFunction func, wxObject *userData = (wxObject *) NULL, wxEvtHandler *eventSink = (wxEvtHandler *) NULL); // Convenience function: take just one id void Connect(int winid, - int eventType, + wxEventType eventType, wxObjectEventFunction func, wxObject *userData = (wxObject *) NULL, wxEvtHandler *eventSink = (wxEvtHandler *) NULL) { Connect(winid, wxID_ANY, eventType, func, userData, eventSink); } // Even more convenient: without id (same as using id of wxID_ANY) - void Connect(int eventType, + void Connect(wxEventType eventType, wxObjectEventFunction func, wxObject *userData = (wxObject *) NULL, wxEvtHandler *eventSink = (wxEvtHandler *) NULL) @@ -2419,8 +2422,6 @@ protected: // Is event handler enabled? bool m_enabled; - // Avoid adding events from another thread during dtor - bool m_beingDeleted; // The user data: either an object which will be deleted by the container @@ -3079,9 +3080,9 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent& // list containing event handlers with pending events for them // // notice that each event handler should occur at most once in this list -extern WXDLLIMPEXP_BASE wxList *wxPendingEvents; +extern WXDLLIMPEXP_BASE wxList *wxHandlersWithPendingEvents; #if wxUSE_THREADS - extern WXDLLIMPEXP_BASE wxCriticalSection *wxPendingEventsLocker; + extern WXDLLIMPEXP_BASE wxCriticalSection *wxHandlersWithPendingEventsLocker; #endif // ----------------------------------------------------------------------------