ReactOS
0.4.16-dev-91-g764881a
taskbar.h
Go to the documentation of this file.
1
/*
2
* Copyright 2003, 2004, 2005 Martin Fuchs
3
*
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
19
20
//
21
// Explorer and Desktop clone
22
//
23
// taskbar.h
24
//
25
// Martin Fuchs, 16.08.2003
26
//
27
28
29
//#include "shellhook.h"
30
31
32
#define CLASSNAME_TASKBAR TEXT("MSTaskSwWClass"
)
33
#define TITLE_TASKBAR TEXT("Running Applications"
)
34
35
#define IDC_FIRST_APP 0x2000
36
37
//#define TASKBAR_AT_TOP
38
39
#define TASKBUTTONWIDTH_MIN 38
40
#define TASKBUTTONWIDTH_MAX 160
41
42
43
#define IDW_TASKTOOLBAR 100
44
45
46
#define PM_GET_LAST_ACTIVE (WM_APP+0x1D)
47
48
50
struct
TaskBarEntry
51
{
52
TaskBarEntry
();
53
54
int
_id
;
// ID for WM_COMMAND
55
HBITMAP
_hbmp
;
56
int
_bmp_idx
;
57
int
_used
;
58
int
_btn_idx
;
59
String
_title
;
60
BYTE
_fsState
;
61
};
62
64
struct
TaskBarMap
:
public
map
<HWND, TaskBarEntry>
65
{
66
~TaskBarMap
();
67
68
iterator
find_id
(
int
id
);
69
};
70
71
73
struct
TaskBar
:
public
Window
74
{
75
typedef
Window
super
;
76
77
TaskBar
(
HWND
hwnd
);
78
~TaskBar
();
79
80
static
HWND
Create
(
HWND
hwndParent
);
81
82
protected
:
83
WindowHandle
_htoolbar
;
84
TaskBarMap
_map
;
85
int
_next_id
;
86
WindowHandle
_last_foreground_wnd
;
87
int
_last_btn_width
;
88
MINIMIZEDMETRICS
_mmMetrics_org
;
89
90
const
UINT
WM_SHELLHOOK
;
91
92
LRESULT
Init
(
LPCREATESTRUCT
pcs);
93
LRESULT
WndProc
(
UINT
nmsg,
WPARAM
wparam
,
LPARAM
lparam
);
94
int
Command
(
int
id
,
int
code
);
95
int
Notify
(
int
id
,
NMHDR
* pnmh);
96
97
void
ActivateApp
(
TaskBarMap::iterator
it,
bool
can_minimize=
true
,
bool
can_restore=
true
);
98
void
ShowAppSystemMenu
(
TaskBarMap::iterator
it);
99
100
static
BOOL
CALLBACK
EnumWndProc
(
HWND
hwnd
,
LPARAM
lparam
);
101
102
void
Refresh
();
103
void
ResizeButtons
();
104
};
lparam
@ lparam
Definition:
SystemMenu.c:31
wparam
@ wparam
Definition:
SystemMenu.c:30
Create
@ Create
Definition:
registry.c:563
Init
Definition:
stterm-test.cc:47
map
Definition:
_map.h:48
map< HWND, TaskBarEntry >::iterator
_Rep_type::iterator iterator
Definition:
_map.h:85
hwndParent
static HWND hwndParent
Definition:
cryptui.c:300
CALLBACK
#define CALLBACK
Definition:
compat.h:35
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
void
Definition:
nsiface.idl:2307
HBITMAP
static HBITMAP
Definition:
button.c:44
UINT
unsigned int UINT
Definition:
ndis.h:50
Command
Definition:
shell.h:41
TaskBarEntry
internal task bar button management entry
Definition:
taskbar.h:51
TaskBarEntry::_hbmp
HBITMAP _hbmp
Definition:
taskbar.h:55
TaskBarEntry::TaskBarEntry
TaskBarEntry()
Definition:
taskbar.cpp:50
TaskBarEntry::_bmp_idx
int _bmp_idx
Definition:
taskbar.h:56
TaskBarEntry::_id
int _id
Definition:
taskbar.h:54
TaskBarEntry::_fsState
BYTE _fsState
Definition:
taskbar.h:60
TaskBarEntry::_used
int _used
Definition:
taskbar.h:57
TaskBarEntry::_btn_idx
int _btn_idx
Definition:
taskbar.h:58
TaskBarEntry::_title
String _title
Definition:
taskbar.h:59
TaskBarMap
map for managing the task bar buttons, mapped by application window handle
Definition:
taskbar.h:65
TaskBarMap::find_id
iterator find_id(int id)
Definition:
taskbar.cpp:561
TaskBarMap::~TaskBarMap
~TaskBarMap()
Definition:
taskbar.cpp:60
TaskBar
Taskbar window.
Definition:
taskbar.h:74
TaskBar::ActivateApp
void ActivateApp(TaskBarMap::iterator it, bool can_minimize=true, bool can_restore=true)
Definition:
taskbar.cpp:280
TaskBar::_last_btn_width
int _last_btn_width
Definition:
taskbar.h:87
TaskBar::_htoolbar
WindowHandle _htoolbar
Definition:
taskbar.h:83
TaskBar::EnumWndProc
static BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lparam)
Definition:
taskbar.cpp:374
TaskBar::_last_foreground_wnd
WindowHandle _last_foreground_wnd
Definition:
taskbar.h:86
TaskBar::ResizeButtons
void ResizeButtons()
Definition:
taskbar.cpp:570
TaskBar::_next_id
int _next_id
Definition:
taskbar.h:85
TaskBar::_map
TaskBarMap _map
Definition:
taskbar.h:84
TaskBar::ShowAppSystemMenu
void ShowAppSystemMenu(TaskBarMap::iterator it)
Definition:
taskbar.cpp:305
TaskBar::WM_SHELLHOOK
const UINT WM_SHELLHOOK
Definition:
taskbar.h:90
TaskBar::_mmMetrics_org
MINIMIZEDMETRICS _mmMetrics_org
Definition:
taskbar.h:88
TaskBar::~TaskBar
~TaskBar()
Definition:
taskbar.cpp:91
TaskBar::Refresh
void Refresh()
Definition:
taskbar.cpp:488
TaskBar::WndProc
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition:
taskbar.cpp:179
TaskBar::Notify
int Notify(int id, NMHDR *pnmh)
Definition:
taskbar.cpp:243
TaskBar::super
Window super
Definition:
taskbar.h:75
Window
Definition:
window.c:28
code
Definition:
inflate.c:139
iterator
Definition:
_iterator_base.h:59
tagCREATESTRUCTA
Definition:
winuser.h:2942
tagMINIMIZEDMETRICS
Definition:
winuser.h:3402
tagNMHDR
Definition:
winuser.h:3159
String
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition:
wdfdevice.h:2433
hwnd
_In_ LONG _In_ HWND hwnd
Definition:
winddi.h:4023
LPARAM
LONG_PTR LPARAM
Definition:
windef.h:208
LRESULT
LONG_PTR LRESULT
Definition:
windef.h:209
WPARAM
UINT_PTR WPARAM
Definition:
windef.h:207
BYTE
unsigned char BYTE
Definition:
xxhash.c:193
modules
rosapps
applications
explorer-old
taskbar
taskbar.h
Generated on Sun Oct 6 2024 06:06:02 for ReactOS by
1.9.6