]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/taskbar.h
part of SF patch #904166 (DMC fix)
[wxWidgets.git] / include / wx / msw / taskbar.h
CommitLineData
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
6// Modified by:
7// Created: 24/3/98
8// RCS-ID: $Id$
fa1c12bd
VZ
9// Copyright: (c) Julian Smart
10// Licence: wxWindows 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/list.h"
21#include "wx/icon.h"
22
c31c4e16 23class WXDLLIMPEXP_ADV wxTaskBarIcon;
d162a7ee 24
131f235d
VS
25WX_DECLARE_LIST_WITH_DECL(wxTaskBarIcon, wxTaskBarIconList,
26 class WXDLLIMPEXP_ADV);
2bda0e17 27
131f235d 28class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase
6af507f7 29{
fc7a2a60 30 DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon)
2bda0e17 31public:
56194595
RD
32 wxTaskBarIcon(void);
33 virtual ~wxTaskBarIcon(void);
2bda0e17
KB
34
35// Accessors
36 inline WXHWND GetHWND() const { return m_hWnd; }
6af507f7 37 inline bool IsOk() const { return (m_hWnd != 0) ; }
2bda0e17
KB
38 inline bool IsIconInstalled() const { return m_iconAdded; }
39
40// Operations
2b5f62a0 41 bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
2bda0e17 42 bool RemoveIcon(void);
69ecd30f 43 bool PopupMenu(wxMenu *menu); //, int x, int y);
2bda0e17 44
6af507f7
VS
45#if WXWIN_COMPATIBILITY_2_4
46 wxDEPRECATED( bool IsOK() const );
47
2bda0e17 48// Overridables
56194595
RD
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&);
6af507f7 56#endif
2bda0e17
KB
57
58// Implementation
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 );
65
66// Data members
67protected:
68 WXHWND m_hWnd;
69 bool m_iconAdded;
4d0d77af
VZ
70 wxIcon m_icon;
71 wxString m_strTooltip;
72
d162a7ee 73 static wxTaskBarIconList sm_taskBarIcons;
56194595 74
6af507f7 75#if WXWIN_COMPATIBILITY_2_4
69ecd30f
RD
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&);
84
6164d85e 85 DECLARE_EVENT_TABLE()
6af507f7 86#endif
2bda0e17
KB
87};
88
6af507f7
VS
89#if WXWIN_COMPATIBILITY_2_4
90inline bool wxTaskBarIcon::IsOK() const { return IsOk(); }
91#endif
69ecd30f 92
2bda0e17
KB
93#endif
94 // _TASKBAR_H_
95
56194595
RD
96
97
98
99