]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/common/taskbarcmn.cpp
native wxBitmapComboBox implementation for MSW (patch 1941399)
[wxWidgets.git] / src / common / taskbarcmn.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////
2// File: src/common/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#ifdef __BORLANDC__
16 #pragma hdrstop
17#endif
18
19#if wxUSE_TASKBARICON
20
21#ifndef WX_PRECOMP
22 #include "wx/app.h"
23 #include "wx/list.h"
24 #include "wx/menu.h"
25#endif
26
27extern WXDLLIMPEXP_DATA_CORE(wxList) wxPendingDelete;
28
29// DLL options compatibility check:
30WX_CHECK_BUILD_OPTIONS("wxAdvanced")
31
32#include "wx/taskbar.h"
33
34DEFINE_EVENT_TYPE( wxEVT_TASKBAR_MOVE )
35DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DOWN )
36DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_UP )
37DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DOWN )
38DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_UP )
39DEFINE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DCLICK )
40DEFINE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DCLICK )
41DEFINE_EVENT_TYPE( wxEVT_TASKBAR_BALLOON_TIMEOUT )
42DEFINE_EVENT_TYPE( wxEVT_TASKBAR_BALLOON_CLICK )
43
44
45BEGIN_EVENT_TABLE(wxTaskBarIconBase, wxEvtHandler)
46 EVT_TASKBAR_CLICK(wxTaskBarIconBase::OnRightButtonDown)
47END_EVENT_TABLE()
48
49void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))
50{
51 wxMenu *menu = CreatePopupMenu();
52 if (menu)
53 {
54 PopupMenu(menu);
55 delete menu;
56 }
57}
58
59void wxTaskBarIconBase::Destroy()
60{
61 wxPendingDelete.Append(this);
62}
63
64#endif // wxUSE_TASKBARICON