]> git.saurik.com Git - wxWidgets.git/blob - src/common/taskbarcmn.cpp
Ambiguous overload fix for gcc
[wxWidgets.git] / src / common / taskbarcmn.cpp
1 /////////////////////////////////////////////////////////////////////////
2 // File: taskbarcmn.cpp
3 // Purpose: Common parts of wxTaskBarIcon class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/04/2003
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart, 2003
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #include "wx/defs.h"
16
17 #ifdef wxHAS_TASK_BAR_ICON
18
19 // DLL options compatibility check:
20 #include "wx/app.h"
21 WX_CHECK_BUILD_OPTIONS("wxAdvanced")
22
23
24 #include "wx/menu.h"
25 #include "wx/taskbar.h"
26
27 DEFINE_EVENT_TYPE( wxEVT_TASKBAR_MOVE )
28 DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DOWN )
29 DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_UP )
30 DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DOWN )
31 DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_UP )
32 DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DCLICK )
33 DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DCLICK )
34
35
36 BEGIN_EVENT_TABLE(wxTaskBarIconBase, wxEvtHandler)
37 EVT_TASKBAR_RIGHT_DOWN(wxTaskBarIconBase::OnRightButtonDown)
38 END_EVENT_TABLE()
39
40 void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))
41 {
42 wxMenu *menu = CreatePopupMenu();
43 if (menu)
44 {
45 PopupMenu(menu);
46 delete menu;
47 }
48 }
49
50 #endif // defined(wxHAS_TASK_BAR_ICON)