]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/common/taskbarcmn.cpp
reuse Clear() instead of duplicating its code in Close()
[wxWidgets.git] / src / common / taskbarcmn.cpp
... / ...
CommitLineData
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"
21WX_CHECK_BUILD_OPTIONS("wxAdvanced")
22
23
24#include "wx/menu.h"
25#include "wx/taskbar.h"
26
27DEFINE_EVENT_TYPE( wxEVT_TASKBAR_MOVE )
28DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DOWN )
29DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_UP )
30DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DOWN )
31DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_UP )
32DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DCLICK )
33DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DCLICK )
34
35
36BEGIN_EVENT_TABLE(wxTaskBarIconBase, wxEvtHandler)
37 EVT_TASKBAR_RIGHT_DOWN(wxTaskBarIconBase::OnRightButtonDown)
38END_EVENT_TABLE()
39
40void 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)