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: wxWidgets licence
11 /////////////////////////////////////////////////////////////////////////
16 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
17 #pragma interface "taskbar.h"
22 // private helper class:
23 class WXDLLIMPEXP_ADV wxTaskBarIconWindow
;
25 class WXDLLIMPEXP_ADV wxTaskBarIcon
: public wxTaskBarIconBase
27 DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon
)
30 virtual ~wxTaskBarIcon();
33 inline bool IsOk() const { return true; }
34 inline bool IsIconInstalled() const { return m_iconAdded
; }
37 bool SetIcon(const wxIcon
& icon
, const wxString
& tooltip
= wxEmptyString
);
38 bool RemoveIcon(void);
39 bool PopupMenu(wxMenu
*menu
); //, int x, int y);
41 #if WXWIN_COMPATIBILITY_2_4
42 wxDEPRECATED( bool IsOK() const );
45 virtual void OnMouseMove(wxEvent
&);
46 virtual void OnLButtonDown(wxEvent
&);
47 virtual void OnLButtonUp(wxEvent
&);
48 virtual void OnRButtonDown(wxEvent
&);
49 virtual void OnRButtonUp(wxEvent
&);
50 virtual void OnLButtonDClick(wxEvent
&);
51 virtual void OnRButtonDClick(wxEvent
&);
56 friend class wxTaskBarIconWindow
;
57 long WindowProc(unsigned int msg
, unsigned int wParam
, long lParam
);
58 void RegisterWindowMessages();
62 wxTaskBarIconWindow
*m_win
;
65 wxString m_strTooltip
;
67 #if WXWIN_COMPATIBILITY_2_4
68 // non-virtual default event handlers to forward events to the virtuals
69 void _OnMouseMove(wxEvent
&);
70 void _OnLButtonDown(wxEvent
&);
71 void _OnLButtonUp(wxEvent
&);
72 void _OnRButtonDown(wxEvent
&);
73 void _OnRButtonUp(wxEvent
&);
74 void _OnLButtonDClick(wxEvent
&);
75 void _OnRButtonDClick(wxEvent
&);
81 #if WXWIN_COMPATIBILITY_2_4
82 inline bool wxTaskBarIcon::IsOK() const { return IsOk(); }