]>
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 | |
f1d9e1ec DE |
7 | // Copyright: (c) 2004 David Elliott |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_COCOA_TASKBAR_H__ | |
12 | #define _WX_COCOA_TASKBAR_H__ | |
13 | ||
f1d9e1ec DE |
14 | #include "wx/icon.h" |
15 | ||
b5dbe15d VS |
16 | class WXDLLIMPEXP_FWD_CORE wxIcon; |
17 | class WXDLLIMPEXP_FWD_CORE wxMenu; | |
f1d9e1ec DE |
18 | |
19 | class wxTaskBarIconCocoaImpl; | |
f1d9e1ec | 20 | |
163b3ad7 | 21 | class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase |
f1d9e1ec | 22 | { |
4092a275 | 23 | friend class wxTaskBarIconCocoaImpl; |
f1d9e1ec DE |
24 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon) |
25 | public: | |
26 | //type of taskbar item to create (currently only DOCK is implemented) | |
27 | enum wxTaskBarIconType | |
28 | { DOCK | |
29 | , CUSTOM_STATUSITEM | |
30 | // , STATUSITEM // TODO: Implement using NSStatusItem w/o custom NSView | |
31 | // , MENUEXTRA // Menu extras require undocumented hacks | |
32 | , DEFAULT_TYPE = CUSTOM_STATUSITEM | |
33 | }; | |
34 | ||
35 | // Only one wxTaskBarIcon can be of the Dock type so by default | |
36 | // create NSStatusItem for maximum source compatibility. | |
37 | wxTaskBarIcon(wxTaskBarIconType iconType = DEFAULT_TYPE); | |
38 | virtual ~wxTaskBarIcon(); | |
39 | ||
40 | bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString); | |
41 | bool RemoveIcon(); | |
42 | bool PopupMenu(wxMenu *menu); //, int x, int y); | |
43 | protected: | |
44 | wxTaskBarIconCocoaImpl *m_impl; | |
45 | }; | |
46 | ||
47 | #endif // _WX_COCOA_TASKBAR_H__ |