]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/taskbar.h
Sorry, should be a __UNIX__ test
[wxWidgets.git] / include / wx / msw / taskbar.h
1 /////////////////////////////////////////////////////////////////////////
2 // File: wx/msw/taskbar.h
3 // Purpose: Defines wxTaskBarIcon class for manipulating icons on the
4 // Windows task bar.
5 // Author: Julian Smart
6 // Modified by: Vaclav Slavik
7 // Created: 24/3/98
8 // RCS-ID: $Id$
9 // Copyright: (c) Julian Smart
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////
12
13 #ifndef _TASKBAR_H_
14 #define _TASKBAR_H_
15
16 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
17 #pragma interface "taskbar.h"
18 #endif
19
20 #include "wx/icon.h"
21
22 // private helper class:
23 class WXDLLIMPEXP_ADV wxTaskBarIconWindow;
24
25 class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase
26 {
27 DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon)
28 public:
29 wxTaskBarIcon();
30 virtual ~wxTaskBarIcon();
31
32 // Accessors
33 inline bool IsOk() const { return true; }
34 inline bool IsIconInstalled() const { return m_iconAdded; }
35
36 // Operations
37 bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
38 bool RemoveIcon(void);
39 bool PopupMenu(wxMenu *menu); //, int x, int y);
40
41 #if WXWIN_COMPATIBILITY_2_4
42 wxDEPRECATED( bool IsOK() const );
43
44 // Overridables
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&);
52 #endif
53
54 // Implementation
55 protected:
56 friend class wxTaskBarIconWindow;
57 long WindowProc(unsigned int msg, unsigned int wParam, long lParam);
58 void RegisterWindowMessages();
59
60 // Data members
61 protected:
62 wxTaskBarIconWindow *m_win;
63 bool m_iconAdded;
64 wxIcon m_icon;
65 wxString m_strTooltip;
66
67 #if WXWIN_COMPATIBILITY_2_4
68 // non-virtual default event handlers to forward events to the virtuals
69 void _OnMouseMove(wxTaskBarIconEvent&);
70 void _OnLButtonDown(wxTaskBarIconEvent&);
71 void _OnLButtonUp(wxTaskBarIconEvent&);
72 void _OnRButtonDown(wxTaskBarIconEvent&);
73 void _OnRButtonUp(wxTaskBarIconEvent&);
74 void _OnLButtonDClick(wxTaskBarIconEvent&);
75 void _OnRButtonDClick(wxTaskBarIconEvent&);
76
77 DECLARE_EVENT_TABLE()
78 #endif
79 };
80
81 #if WXWIN_COMPATIBILITY_2_4
82 inline bool wxTaskBarIcon::IsOK() const { return IsOk(); }
83 #endif
84
85 #endif
86 // _TASKBAR_H_