X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/803ef874920f97ef6ff49996ead5d62bc7052215..7491d644e6103afc2a69b750ca255218181b63a3:/include/wx/event.h diff --git a/include/wx/event.h b/include/wx/event.h index a5242d2890..24a0d2b4f1 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -19,6 +19,9 @@ #include "wx/defs.h" #include "wx/object.h" #include "wx/gdicmn.h" +#if wxUSE_THREADS +#include "wx/thread.h" +#endif /* * Event types @@ -346,8 +349,8 @@ public: int GetSelection() const { return m_commandInt; } // Set/Get listbox/choice selection string - void SetString(char* s) { m_commandString = s; } - char *GetString() const { return m_commandString; } + void SetString(const wxString& s) { m_commandString = s; } + wxString GetString() const { return m_commandString; } // Get checkbox value bool Checked() const { return (m_commandInt != 0); } @@ -362,7 +365,7 @@ public: long GetInt() const { return m_commandInt ; } public: - char* m_commandString; // String event argument + wxString m_commandString; // String event argument int m_commandInt; long m_extraLong; // Additional information (e.g. select/deselect) void* m_clientData; // Arbitrary client data @@ -1170,6 +1173,10 @@ public: virtual bool OnClose(); #endif +#if wxUSE_THREADS + bool ProcessThreadEvent(wxEvent& event); + void ProcessPendingEvents(); +#endif virtual bool ProcessEvent(wxEvent& event); virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); @@ -1196,10 +1203,14 @@ protected: virtual const wxEventTable *GetEventTable() const; protected: - wxEvtHandler* m_nextHandler; - wxEvtHandler* m_previousHandler; - bool m_enabled; // Is event handler enabled? - wxList* m_dynamicEvents; + wxEvtHandler* m_nextHandler; + wxEvtHandler* m_previousHandler; + bool m_enabled; // Is event handler enabled? + wxList* m_dynamicEvents; + wxList* m_pendingEvents; +#if wxUSE_THREADS + wxCriticalSection* m_eventsLocker; +#endif // optimization: instead of using costly IsKindOf() to decide whether we're // a window (which is true in 99% of cases), use this flag