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