]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/taskbarosx.h
Added C/wxString array constructors to wxArrayString
[wxWidgets.git] / include / wx / mac / carbon / taskbarosx.h
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
9 // Licence: wxWindows licence
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
19 class WXDLLEXPORT wxIcon;
20 class WXDLLEXPORT wxMenu;
21
22 class WXDLLEXPORT wxTaskBarIcon : public wxTaskBarIconBase
23 {
24 public:
25 //type of taskbar item to create
26 //TODO: currently only DOCK is implemented
27 enum wxTaskBarIconType
28 {
29 DOCK,
30 STATUSITEM,
31 MENUEXTRA
32 };
33
34 wxTaskBarIcon(const wxTaskBarIconType& nType = DOCK);
35 virtual ~wxTaskBarIcon();
36
37 inline bool IsOk() const { return true; }
38 inline bool IsIconInstalled() const { return m_iconAdded; }
39
40 //TODO: not tested extensively
41 bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
42 bool RemoveIcon();
43 //TODO: end not tested extensively
44
45 //pops up the menu
46 bool PopupMenu(wxMenu *menu);
47
48 //internal functions - don't call
49 wxMenu* GetCurrentMenu();
50 wxMenu* DoCreatePopupMenu();
51
52 protected:
53 wxTaskBarIconType m_nType;
54 void* m_pEventHandlerRef;
55 wxMenu* m_pMenu;
56 WXHMENU m_theLastMenu;
57 bool m_iconAdded;
58
59 void OnRightDown(wxTaskBarIconEvent& evt);
60
61 DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
62 };
63 #endif
64 // _TASKBAR_H_