]>
Commit | Line | Data |
---|---|---|
f1d9e1ec DE |
1 | ///////////////////////////////////////////////////////////////////////// |
2 | // File: wx/cocoa/taskbar.h | |
3 | // Purpose: Defines wxTaskBarIcon class | |
4 | // Author: David Elliott | |
5 | // Modified by: | |
6 | // Created: 2004/01/24 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2004 David Elliott | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_COCOA_TASKBAR_H__ | |
13 | #define _WX_COCOA_TASKBAR_H__ | |
14 | ||
15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) | |
16 | #pragma interface "taskbar.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/icon.h" | |
20 | ||
21 | class WXDLLEXPORT wxIcon; | |
22 | class WXDLLEXPORT wxMenu; | |
23 | ||
24 | class wxTaskBarIconCocoaImpl; | |
f1d9e1ec DE |
25 | |
26 | class WXDLLEXPORT wxTaskBarIcon : public wxTaskBarIconBase | |
27 | { | |
4092a275 | 28 | friend class wxTaskBarIconCocoaImpl; |
f1d9e1ec DE |
29 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon) |
30 | public: | |
31 | //type of taskbar item to create (currently only DOCK is implemented) | |
32 | enum wxTaskBarIconType | |
33 | { DOCK | |
34 | , CUSTOM_STATUSITEM | |
35 | // , STATUSITEM // TODO: Implement using NSStatusItem w/o custom NSView | |
36 | // , MENUEXTRA // Menu extras require undocumented hacks | |
37 | , DEFAULT_TYPE = CUSTOM_STATUSITEM | |
38 | }; | |
39 | ||
40 | // Only one wxTaskBarIcon can be of the Dock type so by default | |
41 | // create NSStatusItem for maximum source compatibility. | |
42 | wxTaskBarIcon(wxTaskBarIconType iconType = DEFAULT_TYPE); | |
43 | virtual ~wxTaskBarIcon(); | |
44 | ||
45 | bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString); | |
46 | bool RemoveIcon(); | |
47 | bool PopupMenu(wxMenu *menu); //, int x, int y); | |
48 | protected: | |
49 | wxTaskBarIconCocoaImpl *m_impl; | |
50 | }; | |
51 | ||
52 | #endif // _WX_COCOA_TASKBAR_H__ |