]>
Commit | Line | Data |
---|---|---|
2bda0e17 | 1 | ///////////////////////////////////////////////////////////////////////// |
fa1c12bd VZ |
2 | // File: wx/msw/taskbar.h |
3 | // Purpose: Defines wxTaskBarIcon class for manipulating icons on the | |
2bda0e17 KB |
4 | // Windows task bar. |
5 | // Author: Julian Smart | |
1e6d9c20 | 6 | // Modified by: Vaclav Slavik |
2bda0e17 KB |
7 | // Created: 24/3/98 |
8 | // RCS-ID: $Id$ | |
fa1c12bd | 9 | // Copyright: (c) Julian Smart |
77ffb593 | 10 | // Licence: wxWidgets licence |
2bda0e17 KB |
11 | ///////////////////////////////////////////////////////////////////////// |
12 | ||
13 | #ifndef _TASKBAR_H_ | |
14 | #define _TASKBAR_H_ | |
15 | ||
12028905 | 16 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
2bda0e17 KB |
17 | #pragma interface "taskbar.h" |
18 | #endif | |
19 | ||
d162a7ee VZ |
20 | #include "wx/icon.h" |
21 | ||
1e6d9c20 VS |
22 | // private helper class: |
23 | class WXDLLIMPEXP_ADV wxTaskBarIconWindow; | |
2bda0e17 | 24 | |
131f235d | 25 | class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase |
6af507f7 | 26 | { |
fc7a2a60 | 27 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon) |
2bda0e17 | 28 | public: |
1e6d9c20 VS |
29 | wxTaskBarIcon(); |
30 | virtual ~wxTaskBarIcon(); | |
2bda0e17 KB |
31 | |
32 | // Accessors | |
1e6d9c20 | 33 | inline bool IsOk() const { return true; } |
2bda0e17 KB |
34 | inline bool IsIconInstalled() const { return m_iconAdded; } |
35 | ||
36 | // Operations | |
2b5f62a0 | 37 | bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString); |
2bda0e17 | 38 | bool RemoveIcon(void); |
69ecd30f | 39 | bool PopupMenu(wxMenu *menu); //, int x, int y); |
2bda0e17 | 40 | |
6af507f7 VS |
41 | #if WXWIN_COMPATIBILITY_2_4 |
42 | wxDEPRECATED( bool IsOK() const ); | |
43 | ||
2bda0e17 | 44 | // Overridables |
56194595 RD |
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&); | |
6af507f7 | 52 | #endif |
2bda0e17 KB |
53 | |
54 | // Implementation | |
1e6d9c20 VS |
55 | protected: |
56 | friend class wxTaskBarIconWindow; | |
dda36afd | 57 | long WindowProc(unsigned int msg, unsigned int wParam, long lParam); |
1e6d9c20 | 58 | void RegisterWindowMessages(); |
2bda0e17 KB |
59 | |
60 | // Data members | |
61 | protected: | |
1e6d9c20 VS |
62 | wxTaskBarIconWindow *m_win; |
63 | bool m_iconAdded; | |
64 | wxIcon m_icon; | |
65 | wxString m_strTooltip; | |
56194595 | 66 | |
6af507f7 | 67 | #if WXWIN_COMPATIBILITY_2_4 |
69ecd30f RD |
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&); | |
76 | ||
6164d85e | 77 | DECLARE_EVENT_TABLE() |
6af507f7 | 78 | #endif |
2bda0e17 KB |
79 | }; |
80 | ||
6af507f7 VS |
81 | #if WXWIN_COMPATIBILITY_2_4 |
82 | inline bool wxTaskBarIcon::IsOK() const { return IsOk(); } | |
83 | #endif | |
69ecd30f | 84 | |
2bda0e17 KB |
85 | #endif |
86 | // _TASKBAR_H_ |