added EVT_TASKBAR_CLICK and use it to show taskbar icon menu on right button release, not press, under MSW (bug 1623761)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-01-07 19:44:14 +00:00
parent 52b222fe31
commit 9fcf8144d9
4 changed files with 17 additions and 4 deletions

View File

@@ -103,6 +103,7 @@ All:
wxMSW:
- Fixed compilation with Borland C++ in Unicode mode but without MSLU
- Show taskbar icon menu on right button release, not press
wxGTK:

View File

@@ -51,6 +51,10 @@ wxEVT\_TASKBAR\_RIGHT\_UP event.}
wxEVT\_TASKBAR\_LEFT\_DCLICK event.}
\twocolitem{{\bf EVT\_TASKBAR\_RIGHT\_DCLICK(func)}}{Process a
wxEVT\_TASKBAR\_RIGHT\_DCLICK event.}
\twocolitem{{\bf EVT\_TASKBAR\_CLICK(func)}}{This is a synonym for either
EVT\_TASKBAR\_RIGHT\_DOWN or UP depending on the platform, use this event macro
to catch the event which should result in the menu being displayed on the
current platform.}
\end{twocollist}%
\latexignore{\rtfignore{\wxheading{Members}}}

View File

@@ -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 // wxHAS_TASK_BAR_ICON
#endif // _WX_TASKBAR_H_BASE_

View File

@@ -38,7 +38,7 @@ DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DCLICK )
BEGIN_EVENT_TABLE(wxTaskBarIconBase, wxEvtHandler)
EVT_TASKBAR_RIGHT_DOWN(wxTaskBarIconBase::OnRightButtonDown)
EVT_TASKBAR_CLICK(wxTaskBarIconBase::OnRightButtonDown)
END_EVENT_TABLE()
void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))