]>
Commit | Line | Data |
---|---|---|
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 | ||
19 | class WXDLLEXPORT wxIcon; | |
20 | class WXDLLEXPORT wxMenu; | |
21 | ||
22 | class WXDLLEXPORT wxTaskBarIcon : public wxTaskBarIconBase | |
23 | { | |
24 | public: | |
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 | 52 | protected: |
f2641bc2 | 53 | wxTaskBarIconType m_nType; |
cc3388ae | 54 | void* m_pEventHandlerRef; |
607667fd | 55 | wxMenu* m_pMenu; |
f2641bc2 RD |
56 | bool m_iconAdded; |
57 | ||
8cf73271 SC |
58 | DECLARE_DYNAMIC_CLASS(wxTaskBarIcon) |
59 | }; | |
8cf73271 SC |
60 | #endif |
61 | // _TASKBAR_H_ |