]> git.saurik.com Git - wxWidgets.git/blame - src/common/taskbarcmn.cpp
Allow absent checkbox when transferring dimension data
[wxWidgets.git] / src / common / taskbarcmn.cpp
CommitLineData
3eae0c0b 1/////////////////////////////////////////////////////////////////////////
8898456d 2// File: src/common/taskbarcmn.cpp
3eae0c0b
VS
3// Purpose: Common parts of wxTaskBarIcon class
4// Author: Julian Smart
5// Modified by:
6// Created: 04/04/2003
3eae0c0b 7// Copyright: (c) Julian Smart, 2003
65571936 8// Licence: wxWindows licence
3eae0c0b
VS
9/////////////////////////////////////////////////////////////////////////
10
3eae0c0b
VS
11// For compilers that support precompilation, includes "wx.h".
12#include "wx/wxprec.h"
13
8898456d
WS
14#ifdef __BORLANDC__
15 #pragma hdrstop
16#endif
63dfd606 17
4f167b46 18#if wxUSE_TASKBARICON
63dfd606 19
65391c8f
PC
20#include "wx/taskbar.h"
21
8898456d
WS
22#ifndef WX_PRECOMP
23 #include "wx/app.h"
39f0cb54 24 #include "wx/list.h"
3b3dc801 25 #include "wx/menu.h"
8898456d
WS
26#endif
27
39f0cb54
VZ
28extern WXDLLIMPEXP_DATA_CORE(wxList) wxPendingDelete;
29
34fdf762 30// DLL options compatibility check:
34fdf762
VS
31WX_CHECK_BUILD_OPTIONS("wxAdvanced")
32
9b11752c
VZ
33wxDEFINE_EVENT( wxEVT_TASKBAR_MOVE, wxTaskBarIconEvent );
34wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_DOWN, wxTaskBarIconEvent );
35wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_UP, wxTaskBarIconEvent );
36wxDEFINE_EVENT( wxEVT_TASKBAR_RIGHT_DOWN, wxTaskBarIconEvent );
37wxDEFINE_EVENT( wxEVT_TASKBAR_RIGHT_UP, wxTaskBarIconEvent );
38wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_DCLICK, wxTaskBarIconEvent );
39wxDEFINE_EVENT( wxEVT_TASKBAR_RIGHT_DCLICK, wxTaskBarIconEvent );
40wxDEFINE_EVENT( wxEVT_TASKBAR_BALLOON_TIMEOUT, wxTaskBarIconEvent );
41wxDEFINE_EVENT( wxEVT_TASKBAR_BALLOON_CLICK, wxTaskBarIconEvent );
c41b6496 42
dae73d74
VS
43
44BEGIN_EVENT_TABLE(wxTaskBarIconBase, wxEvtHandler)
9fcf8144 45 EVT_TASKBAR_CLICK(wxTaskBarIconBase::OnRightButtonDown)
dae73d74
VS
46END_EVENT_TABLE()
47
6466d41e 48void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))
dae73d74
VS
49{
50 wxMenu *menu = CreatePopupMenu();
51 if (menu)
52 {
53 PopupMenu(menu);
54 delete menu;
55 }
56}
cb719f2e 57
39f0cb54
VZ
58void wxTaskBarIconBase::Destroy()
59{
60 wxPendingDelete.Append(this);
61}
62
4f167b46 63#endif // wxUSE_TASKBARICON