]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/taskbar.h
Applied patch [ 740012 ] GetKeyState returns 16-Bit value on WindowsNT
[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
16#ifdef __GNUG__
17#pragma interface "taskbar.h"
18#endif
19
d162a7ee
VZ
20#include "wx/list.h"
21#include "wx/icon.h"
22
23class wxTaskBarIcon;
24
cca78463 25WX_DECLARE_EXPORTED_LIST(wxTaskBarIcon, wxTaskBarIconList);
2bda0e17 26
6af507f7
VS
27class WXDLLEXPORT wxTaskBarIcon: public wxTaskBarIconBase
28{
56194595 29 DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
2bda0e17 30public:
56194595
RD
31 wxTaskBarIcon(void);
32 virtual ~wxTaskBarIcon(void);
2bda0e17
KB
33
34// Accessors
35 inline WXHWND GetHWND() const { return m_hWnd; }
6af507f7 36 inline bool IsOk() const { return (m_hWnd != 0) ; }
2bda0e17
KB
37 inline bool IsIconInstalled() const { return m_iconAdded; }
38
39// Operations
2b5f62a0 40 bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
2bda0e17 41 bool RemoveIcon(void);
69ecd30f 42 bool PopupMenu(wxMenu *menu); //, int x, int y);
2bda0e17 43
6af507f7
VS
44#if WXWIN_COMPATIBILITY_2_4
45 wxDEPRECATED( bool IsOK() const );
46
2bda0e17 47// Overridables
56194595
RD
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&);
6af507f7 55#endif
2bda0e17
KB
56
57// Implementation
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 );
64
65// Data members
66protected:
67 WXHWND m_hWnd;
68 bool m_iconAdded;
4d0d77af
VZ
69 wxIcon m_icon;
70 wxString m_strTooltip;
71
d162a7ee 72 static wxTaskBarIconList sm_taskBarIcons;
56194595 73
6af507f7 74#if WXWIN_COMPATIBILITY_2_4
69ecd30f
RD
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&);
83
6164d85e 84 DECLARE_EVENT_TABLE()
6af507f7 85#endif
2bda0e17
KB
86};
87
6af507f7
VS
88#if WXWIN_COMPATIBILITY_2_4
89inline bool wxTaskBarIcon::IsOK() const { return IsOk(); }
90#endif
69ecd30f 91
2bda0e17
KB
92#endif
93 // _TASKBAR_H_
94
56194595
RD
95
96
97
98