X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fa03f04345b620d1a14529b05961116b20a1297..55fbde1232bff0ed44c23775911574ac1b2f8a0a:/include/wx/taskbar.h diff --git a/include/wx/taskbar.h b/include/wx/taskbar.h index 202aae6f78..799792b7bb 100644 --- a/include/wx/taskbar.h +++ b/include/wx/taskbar.h @@ -1,3 +1,14 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/taskbar.h +// Purpose: wxTaskBarIcon base header and class +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// RCS-ID: $Id$ +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + #ifndef _WX_TASKBAR_H_BASE_ #define _WX_TASKBAR_H_BASE_ @@ -7,7 +18,7 @@ #include "wx/event.h" -class WXDLLIMPEXP_ADV wxTaskBarIconEvent; +class WXDLLIMPEXP_FWD_ADV wxTaskBarIconEvent; // ---------------------------------------------------------------------------- // wxTaskBarIconBase: define wxTaskBarIcon interface @@ -85,7 +96,7 @@ BEGIN_DECLARE_EVENT_TYPES() END_DECLARE_EVENT_TYPES() #define wxTaskBarIconEventHandler(func) \ - (wxObjectEventFunction)wxStaticCastEvent(wxTaskBarIconEventFunction, &func) + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxTaskBarIconEventFunction, &func) #define wx__DECLARE_TASKBAREVT(evt, fn) \ wx__DECLARE_EVT0(wxEVT_TASKBAR_ ## evt, wxTaskBarIconEventHandler(fn)) @@ -98,8 +109,16 @@ END_DECLARE_EVENT_TYPES() #define EVT_TASKBAR_LEFT_DCLICK(fn) wx__DECLARE_TASKBAREVT(LEFT_DCLICK, fn) #define EVT_TASKBAR_RIGHT_DCLICK(fn) wx__DECLARE_TASKBAREVT(RIGHT_DCLICK, fn) +// taskbar menu is shown on right button press under all platforms except MSW +// where it's shown on right button release, using this event type and macro +// allows to write code which works correctly on all platforms +#ifdef __WXMSW__ + #define wxEVT_TASKBAR_CLICK wxEVT_TASKBAR_RIGHT_UP +#else + #define wxEVT_TASKBAR_CLICK wxEVT_TASKBAR_RIGHT_DOWN #endif - // wxHAS_TASK_BAR_ICON +#define EVT_TASKBAR_CLICK(fn) wx__DECLARE_TASKBAREVT(CLICK, fn) -#endif - // _WX_TASKBAR_H_BASE_ +#endif // wxHAS_TASK_BAR_ICON + +#endif // _WX_TASKBAR_H_BASE_