X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2ca375c5620209d77a88d2d378bdcdedbc82e7e..57e2b887a0e798ab5ab2921cdeba550f322b000c:/include/wx/event.h?ds=sidebyside diff --git a/include/wx/event.h b/include/wx/event.h index 3a9feb32c6..f86816198d 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -155,6 +155,9 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EVENT_TYPE(wxEVT_COMMAND_TOOL_ENTER, 17) DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPINCTRL_UPDATED, 18) + // Toolbar dropdown arrows + DECLARE_EVENT_TYPE(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, 19) + // Sockets and timers send events, too DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_SOCKET, 50) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_TIMER , 80) @@ -2065,6 +2068,8 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxContextMenuEvent) }; +#endif // wxUSE_GUI + // Idle event /* wxEVT_IDLE @@ -2084,7 +2089,7 @@ enum wxIdleMode wxIDLE_PROCESS_SPECIFIED }; -class WXDLLIMPEXP_CORE wxIdleEvent : public wxEvent +class WXDLLIMPEXP_BASE wxIdleEvent : public wxEvent { public: wxIdleEvent() @@ -2109,9 +2114,6 @@ public: // Returns the idle event mode static wxIdleMode GetMode() { return sm_idleMode; } - // Can we send an idle event? - static bool CanSend(wxWindow* win); - protected: bool m_requestMore; static wxIdleMode sm_idleMode; @@ -2120,8 +2122,6 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent) }; -#endif // wxUSE_GUI - /* TODO wxEVT_MOUSE_CAPTURE_CHANGED, wxEVT_SETTING_CHANGED, // WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95) @@ -2285,8 +2285,10 @@ public: // Clear table void Clear(); +#if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING // Clear all tables static void ClearAll(); +#endif // __WXDEBUG__ && wxUSE_MEMORY_TRACING protected: // Init the hash table with the entries of the static event table. @@ -2335,12 +2337,12 @@ public: virtual bool ProcessEvent(wxEvent& event); // add an event to be processed later - virtual void AddPendingEvent(wxEvent& event); + virtual void AddPendingEvent(const wxEvent& event); void ProcessPendingEvents(); #if wxUSE_THREADS - bool ProcessThreadEvent(wxEvent& event); + bool ProcessThreadEvent(const wxEvent& event); #endif // Dynamic association of a member function handler with the event handler, @@ -2496,7 +2498,7 @@ private: // Post a message to the given eventhandler which will be processed during the // next event loop iteration -inline void wxPostEvent(wxEvtHandler *dest, wxEvent& event) +inline void wxPostEvent(wxEvtHandler *dest, const wxEvent& event) { wxCHECK_RET( dest, wxT("need an object to post event to in wxPostEvent") ); @@ -2988,6 +2990,7 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent& #define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_VLBOX_SELECTED, winid, wxCommandEventHandler(func)) #define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_SELECTED, winid, wxCommandEventHandler(func)) #define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_CLICKED, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, winid, wxCommandEventHandler(func)) #define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_CLICKED, id1, id2, wxCommandEventHandler(func)) #define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_RCLICKED, winid, wxCommandEventHandler(func)) #define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func))