]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/taskbarosx.h
cgimagecreate from wxbitmap crashes 10.2 - turn off. Put in right click handler to...
[wxWidgets.git] / include / wx / mac / carbon / taskbarosx.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////
2// File: wx/mac/taskbarosx.h
3// Purpose: Defines wxTaskBarIcon class for OSX
4// Author: Ryan Norton
5// Modified by:
6// Created: 04/04/2003
7// RCS-ID: $Id$
8// Copyright: (c) Ryan Norton, 2003
65571936 9// Licence: wxWindows licence
8cf73271
SC
10/////////////////////////////////////////////////////////////////////////
11
12#ifndef _TASKBAR_H_
13#define _TASKBAR_H_
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16#pragma interface "taskbarosx.h"
17#endif
18
19class WXDLLEXPORT wxIcon;
20class WXDLLEXPORT wxMenu;
21
22class WXDLLEXPORT wxTaskBarIcon : public wxTaskBarIconBase
23{
24public:
f2641bc2 25 //type of taskbar item to create
607667fd 26 //TODO: currently only DOCK is implemented
f2641bc2
RD
27 enum wxTaskBarIconType
28 {
29 DOCK,
30 STATUSITEM,
31 MENUEXTRA
32 };
33
8cf73271
SC
34 wxTaskBarIcon(const wxTaskBarIconType& nType = DOCK);
35 virtual ~wxTaskBarIcon();
36
f2641bc2
RD
37 inline bool IsOk() const { return true; }
38 inline bool IsIconInstalled() const { return m_iconAdded; }
39
607667fd 40 //TODO: not tested extensively
8cf73271
SC
41 bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
42 bool RemoveIcon();
607667fd
RN
43 //TODO: end not tested extensively
44
45 //pops up the menu
8cf73271
SC
46 bool PopupMenu(wxMenu *menu);
47
a45beea1 48 //internal functions - don't call
607667fd 49 wxMenu* GetCurrentMenu();
a45beea1 50 wxMenu* DoCreatePopupMenu();
607667fd 51
8cf73271 52protected:
f2641bc2 53 wxTaskBarIconType m_nType;
cc3388ae 54 void* m_pEventHandlerRef;
607667fd 55 wxMenu* m_pMenu;
af7e08a4 56 WXHMENU m_theLastMenu;
f2641bc2 57 bool m_iconAdded;
b14ba1f1
RN
58
59 void OnRightDown(wxTaskBarIconEvent& evt);
60
8cf73271
SC
61 DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
62};
8cf73271
SC
63#endif
64 // _TASKBAR_H_