X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6164d85e896743b16a0cf8b0610f5d17ceb47f36..277480474552707c27c7466bb5e5d1738a16372b:/include/wx/msw/taskbar.h diff --git a/include/wx/msw/taskbar.h b/include/wx/msw/taskbar.h index 6b177b4697..bb3a9db3f5 100644 --- a/include/wx/msw/taskbar.h +++ b/include/wx/msw/taskbar.h @@ -21,7 +21,7 @@ #include #include -class wxTaskBarIcon: public wxEvtHandler { +class WXDLLEXPORT wxTaskBarIcon: public wxEvtHandler { DECLARE_DYNAMIC_CLASS(wxTaskBarIcon) public: wxTaskBarIcon(void); @@ -35,6 +35,7 @@ public: // Operations bool SetIcon(const wxIcon& icon, const wxString& tooltip = ""); bool RemoveIcon(void); + bool PopupMenu(wxMenu *menu); //, int x, int y); // Overridables virtual void OnMouseMove(wxEvent&); @@ -61,6 +62,16 @@ protected: static bool sm_registeredClass; static unsigned int sm_taskbarMsg; + // non-virtual default event handlers to forward events to the virtuals + void _OnMouseMove(wxEvent&); + void _OnLButtonDown(wxEvent&); + void _OnLButtonUp(wxEvent&); + void _OnRButtonDown(wxEvent&); + void _OnRButtonUp(wxEvent&); + void _OnLButtonDClick(wxEvent&); + void _OnRButtonDClick(wxEvent&); + + DECLARE_EVENT_TABLE() }; @@ -75,13 +86,14 @@ const wxEventType wxEVT_TASKBAR_LEFT_DCLICK = wxEVT_FIRST + 1555; const wxEventType wxEVT_TASKBAR_RIGHT_DCLICK = wxEVT_FIRST + 1556; -#define EVT_TASKBAR_MOVE(fn) { wxEVT_TASKBAR_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL }, -#define EVT_TASKBAR_LEFT_DOWN(fn) { wxEVT_TASKBAR_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL }, -#define EVT_TASKBAR_LEFT_UP(fn) { wxEVT_TASKBAR_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL }, -#define EVT_TASKBAR_RIGHT_DOWN(fn) { wxEVT_TASKBAR_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL }, -#define EVT_TASKBAR_RIGHT_UP(fn) { wxEVT_TASKBAR_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL }, -#define EVT_TASKBAR_LEFT_DCLICK(fn) { wxEVT_TASKBAR_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL }, -#define EVT_TASKBAR_RIGHT_DCLICK(fn) { wxEVT_TASKBAR_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL }, +#define EVT_TASKBAR_MOVE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), +#define EVT_TASKBAR_LEFT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), +#define EVT_TASKBAR_LEFT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), +#define EVT_TASKBAR_RIGHT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), +#define EVT_TASKBAR_RIGHT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), +#define EVT_TASKBAR_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), +#define EVT_TASKBAR_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), + #endif // _TASKBAR_H_