1 /////////////////////////////////////////////////////////////////////////
2 // File: wx/msw/taskbar.h
3 // Purpose: Defines wxTaskBarIcon class for manipulating icons on the
5 // Author: Julian Smart
9 // Copyright: (c) Julian Smart
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////
17 #pragma interface "taskbar.h"
25 WX_DECLARE_LIST_WITH_DECL(wxTaskBarIcon
, wxTaskBarIconList
,
26 class WXDLLIMPEXP_ADV
);
28 class WXDLLIMPEXP_ADV wxTaskBarIcon
: public wxTaskBarIconBase
30 DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon
)
33 virtual ~wxTaskBarIcon(void);
36 inline WXHWND
GetHWND() const { return m_hWnd
; }
37 inline bool IsOk() const { return (m_hWnd
!= 0) ; }
38 inline bool IsIconInstalled() const { return m_iconAdded
; }
41 bool SetIcon(const wxIcon
& icon
, const wxString
& tooltip
= wxEmptyString
);
42 bool RemoveIcon(void);
43 bool PopupMenu(wxMenu
*menu
); //, int x, int y);
45 #if WXWIN_COMPATIBILITY_2_4
46 wxDEPRECATED( bool IsOK() const );
49 virtual void OnMouseMove(wxEvent
&);
50 virtual void OnLButtonDown(wxEvent
&);
51 virtual void OnLButtonUp(wxEvent
&);
52 virtual void OnRButtonDown(wxEvent
&);
53 virtual void OnRButtonUp(wxEvent
&);
54 virtual void OnLButtonDClick(wxEvent
&);
55 virtual void OnRButtonDClick(wxEvent
&);
59 static wxTaskBarIcon
* FindObjectForHWND(WXHWND hWnd
);
60 static void AddObject(wxTaskBarIcon
* obj
);
61 static void RemoveObject(wxTaskBarIcon
* obj
);
62 static bool RegisterWindowClass();
63 static WXHWND
CreateTaskBarWindow();
64 long WindowProc( WXHWND hWnd
, unsigned int msg
, unsigned int wParam
, long lParam
);
71 wxString m_strTooltip
;
73 static wxTaskBarIconList sm_taskBarIcons
;
75 #if WXWIN_COMPATIBILITY_2_4
76 // non-virtual default event handlers to forward events to the virtuals
77 void _OnMouseMove(wxEvent
&);
78 void _OnLButtonDown(wxEvent
&);
79 void _OnLButtonUp(wxEvent
&);
80 void _OnRButtonDown(wxEvent
&);
81 void _OnRButtonUp(wxEvent
&);
82 void _OnLButtonDClick(wxEvent
&);
83 void _OnRButtonDClick(wxEvent
&);
89 #if WXWIN_COMPATIBILITY_2_4
90 inline bool wxTaskBarIcon::IsOK() const { return IsOk(); }