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_EXPORTED_LIST(wxTaskBarIcon
, wxTaskBarIconList
);
27 class WXDLLEXPORT wxTaskBarIcon
: public wxTaskBarIconBase
29 DECLARE_DYNAMIC_CLASS(wxTaskBarIcon
)
32 virtual ~wxTaskBarIcon(void);
35 inline WXHWND
GetHWND() const { return m_hWnd
; }
36 inline bool IsOk() const { return (m_hWnd
!= 0) ; }
37 inline bool IsIconInstalled() const { return m_iconAdded
; }
40 bool SetIcon(const wxIcon
& icon
, const wxString
& tooltip
= wxEmptyString
);
41 bool RemoveIcon(void);
42 bool PopupMenu(wxMenu
*menu
); //, int x, int y);
44 #if WXWIN_COMPATIBILITY_2_4
45 wxDEPRECATED( bool IsOK() const );
48 virtual void OnMouseMove(wxEvent
&);
49 virtual void OnLButtonDown(wxEvent
&);
50 virtual void OnLButtonUp(wxEvent
&);
51 virtual void OnRButtonDown(wxEvent
&);
52 virtual void OnRButtonUp(wxEvent
&);
53 virtual void OnLButtonDClick(wxEvent
&);
54 virtual void OnRButtonDClick(wxEvent
&);
58 static wxTaskBarIcon
* FindObjectForHWND(WXHWND hWnd
);
59 static void AddObject(wxTaskBarIcon
* obj
);
60 static void RemoveObject(wxTaskBarIcon
* obj
);
61 static bool RegisterWindowClass();
62 static WXHWND
CreateTaskBarWindow();
63 long WindowProc( WXHWND hWnd
, unsigned int msg
, unsigned int wParam
, long lParam
);
70 wxString m_strTooltip
;
72 static wxTaskBarIconList sm_taskBarIcons
;
74 #if WXWIN_COMPATIBILITY_2_4
75 // non-virtual default event handlers to forward events to the virtuals
76 void _OnMouseMove(wxEvent
&);
77 void _OnLButtonDown(wxEvent
&);
78 void _OnLButtonUp(wxEvent
&);
79 void _OnRButtonDown(wxEvent
&);
80 void _OnRButtonUp(wxEvent
&);
81 void _OnLButtonDClick(wxEvent
&);
82 void _OnRButtonDClick(wxEvent
&);
88 #if WXWIN_COMPATIBILITY_2_4
89 inline bool wxTaskBarIcon::IsOK() const { return IsOk(); }