]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/taskbar.h
Resize fine tuning
[wxWidgets.git] / include / wx / msw / taskbar.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////
2// File: taskbar.h
3// Purpose: Defines wxTaskBarIcon class for manipulating icons on the
4// Windows task bar.
5// Author: Julian Smart
6// Modified by:
7// Created: 24/3/98
8// RCS-ID: $Id$
9// Copyright: (c)
10// Licence: wxWindows licence
11/////////////////////////////////////////////////////////////////////////
12
13#ifndef _TASKBAR_H_
14#define _TASKBAR_H_
15
16#ifdef __GNUG__
17#pragma interface "taskbar.h"
18#endif
19
56194595 20#include <wx/event.h>
2bda0e17
KB
21#include <wx/list.h>
22#include <wx/icon.h>
23
56194595
RD
24class wxTaskBarIcon: public wxEvtHandler {
25 DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
2bda0e17 26public:
56194595
RD
27 wxTaskBarIcon(void);
28 virtual ~wxTaskBarIcon(void);
2bda0e17
KB
29
30// Accessors
31 inline WXHWND GetHWND() const { return m_hWnd; }
32 inline bool IsOK() const { return (m_hWnd != 0) ; }
33 inline bool IsIconInstalled() const { return m_iconAdded; }
34
35// Operations
36 bool SetIcon(const wxIcon& icon, const wxString& tooltip = "");
37 bool RemoveIcon(void);
38
39// Overridables
56194595
RD
40 virtual void OnMouseMove(wxEvent&);
41 virtual void OnLButtonDown(wxEvent&);
42 virtual void OnLButtonUp(wxEvent&);
43 virtual void OnRButtonDown(wxEvent&);
44 virtual void OnRButtonUp(wxEvent&);
45 virtual void OnLButtonDClick(wxEvent&);
46 virtual void OnRButtonDClick(wxEvent&);
2bda0e17
KB
47
48// Implementation
49 static wxTaskBarIcon* FindObjectForHWND(WXHWND hWnd);
50 static void AddObject(wxTaskBarIcon* obj);
51 static void RemoveObject(wxTaskBarIcon* obj);
52 static bool RegisterWindowClass();
53 static WXHWND CreateTaskBarWindow();
54 long WindowProc( WXHWND hWnd, unsigned int msg, unsigned int wParam, long lParam );
55
56// Data members
57protected:
58 WXHWND m_hWnd;
59 bool m_iconAdded;
60 static wxList sm_taskBarIcons;
61 static bool sm_registeredClass;
62 static unsigned int sm_taskbarMsg;
56194595 63
6164d85e 64 DECLARE_EVENT_TABLE()
2bda0e17
KB
65};
66
56194595
RD
67
68
69const wxEventType wxEVT_TASKBAR_MOVE = wxEVT_FIRST + 1550;
70const wxEventType wxEVT_TASKBAR_LEFT_DOWN = wxEVT_FIRST + 1551;
71const wxEventType wxEVT_TASKBAR_LEFT_UP = wxEVT_FIRST + 1552;
72const wxEventType wxEVT_TASKBAR_RIGHT_DOWN = wxEVT_FIRST + 1553;
73const wxEventType wxEVT_TASKBAR_RIGHT_UP = wxEVT_FIRST + 1554;
74const wxEventType wxEVT_TASKBAR_LEFT_DCLICK = wxEVT_FIRST + 1555;
75const wxEventType wxEVT_TASKBAR_RIGHT_DCLICK = wxEVT_FIRST + 1556;
76
77
78#define EVT_TASKBAR_MOVE(fn) { wxEVT_TASKBAR_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL },
79#define EVT_TASKBAR_LEFT_DOWN(fn) { wxEVT_TASKBAR_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL },
80#define EVT_TASKBAR_LEFT_UP(fn) { wxEVT_TASKBAR_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL },
81#define EVT_TASKBAR_RIGHT_DOWN(fn) { wxEVT_TASKBAR_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL },
82#define EVT_TASKBAR_RIGHT_UP(fn) { wxEVT_TASKBAR_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL },
83#define EVT_TASKBAR_LEFT_DCLICK(fn) { wxEVT_TASKBAR_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL },
84#define EVT_TASKBAR_RIGHT_DCLICK(fn) { wxEVT_TASKBAR_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL },
85
2bda0e17
KB
86#endif
87 // _TASKBAR_H_
88
56194595
RD
89
90
91
92