1 /////////////////////////////////////////////////////////////////////////
2 // File: wx/msw/taskbar.h
3 // Purpose: Defines wxTaskBarIcon class for manipulating icons on the
5 // Author: Julian Smart
6 // Modified by: Vaclav Slavik
9 // Copyright: (c) Julian Smart
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////
18 // private helper class:
19 class WXDLLIMPEXP_ADV wxTaskBarIconWindow
;
21 class WXDLLIMPEXP_ADV wxTaskBarIcon
: public wxTaskBarIconBase
23 DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon
)
26 virtual ~wxTaskBarIcon();
29 inline bool IsOk() const { return true; }
30 inline bool IsIconInstalled() const { return m_iconAdded
; }
33 bool SetIcon(const wxIcon
& icon
, const wxString
& tooltip
= wxEmptyString
);
34 bool RemoveIcon(void);
35 bool PopupMenu(wxMenu
*menu
); //, int x, int y);
37 #if WXWIN_COMPATIBILITY_2_4
38 wxDEPRECATED( bool IsOK() const );
41 virtual void OnMouseMove(wxEvent
&);
42 virtual void OnLButtonDown(wxEvent
&);
43 virtual void OnLButtonUp(wxEvent
&);
44 virtual void OnRButtonDown(wxEvent
&);
45 virtual void OnRButtonUp(wxEvent
&);
46 virtual void OnLButtonDClick(wxEvent
&);
47 virtual void OnRButtonDClick(wxEvent
&);
52 friend class wxTaskBarIconWindow
;
53 long WindowProc(unsigned int msg
, unsigned int wParam
, long lParam
);
54 void RegisterWindowMessages();
58 wxTaskBarIconWindow
*m_win
;
61 wxString m_strTooltip
;
63 #if WXWIN_COMPATIBILITY_2_4
64 // non-virtual default event handlers to forward events to the virtuals
65 void _OnMouseMove(wxTaskBarIconEvent
&);
66 void _OnLButtonDown(wxTaskBarIconEvent
&);
67 void _OnLButtonUp(wxTaskBarIconEvent
&);
68 void _OnRButtonDown(wxTaskBarIconEvent
&);
69 void _OnRButtonUp(wxTaskBarIconEvent
&);
70 void _OnLButtonDClick(wxTaskBarIconEvent
&);
71 void _OnRButtonDClick(wxTaskBarIconEvent
&);
77 #if WXWIN_COMPATIBILITY_2_4
78 inline bool wxTaskBarIcon::IsOK() const { return IsOk(); }