]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/taskbar.h
do platform-specific checks after ensuring that the symbols we use are defined; extra...
[wxWidgets.git] / include / wx / taskbar.h
index 1992d92eb90204977b10ada38fb58276e45137a9..ab10e8b5fe393b7562a386ac478669d1041e3652 100644 (file)
 
 #include "wx/defs.h"
 
-#ifdef wxHAS_TASK_BAR_ICON
+#if wxUSE_TASKBARICON
 
 #include "wx/event.h"
 
-class WXDLLIMPEXP_ADV wxTaskBarIconEvent;
+class WXDLLIMPEXP_FWD_ADV wxTaskBarIconEvent;
 
 // ----------------------------------------------------------------------------
 // wxTaskBarIconBase: define wxTaskBarIcon interface
@@ -109,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 // wxUSE_TASKBARICON
+
+#endif // _WX_TASKBAR_H_BASE_