ReactOS 0.4.15-dev-7788-g1ad9096
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
51{
53
54 int _id; // ID for WM_COMMAND
57 int _used;
61};
62
64struct TaskBarMap : public map<HWND, TaskBarEntry>
65{
67
68 iterator find_id(int id);
69};
70
71
73struct TaskBar : public Window
74{
75 typedef Window super;
76
78 ~TaskBar();
79
80 static HWND Create(HWND hwndParent);
81
82protected:
83 WindowHandle _htoolbar;
89
91
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);
99
101
102 void Refresh();
103 void ResizeButtons();
104};
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
@ Create
Definition: registry.c:563
Definition: _map.h:48
_Rep_type::iterator iterator
Definition: _map.h:85
static HWND hwndParent
Definition: cryptui.c:300
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
static HBITMAP
Definition: button.c:44
unsigned int UINT
Definition: ndis.h:50
Definition: shell.h:41
internal task bar button management entry
Definition: taskbar.h:51
HBITMAP _hbmp
Definition: taskbar.h:55
int _bmp_idx
Definition: taskbar.h:56
BYTE _fsState
Definition: taskbar.h:60
int _used
Definition: taskbar.h:57
int _btn_idx
Definition: taskbar.h:58
String _title
Definition: taskbar.h:59
map for managing the task bar buttons, mapped by application window handle
Definition: taskbar.h:65
iterator find_id(int id)
Definition: taskbar.cpp:561
~TaskBarMap()
Definition: taskbar.cpp:60
Taskbar window.
Definition: taskbar.h:74
void ActivateApp(TaskBarMap::iterator it, bool can_minimize=true, bool can_restore=true)
Definition: taskbar.cpp:280
int _last_btn_width
Definition: taskbar.h:87
WindowHandle _htoolbar
Definition: taskbar.h:83
static BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lparam)
Definition: taskbar.cpp:374
WindowHandle _last_foreground_wnd
Definition: taskbar.h:86
void ResizeButtons()
Definition: taskbar.cpp:570
int _next_id
Definition: taskbar.h:85
TaskBarMap _map
Definition: taskbar.h:84
void ShowAppSystemMenu(TaskBarMap::iterator it)
Definition: taskbar.cpp:305
const UINT WM_SHELLHOOK
Definition: taskbar.h:90
MINIMIZEDMETRICS _mmMetrics_org
Definition: taskbar.h:88
~TaskBar()
Definition: taskbar.cpp:91
void Refresh()
Definition: taskbar.cpp:488
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: taskbar.cpp:179
int Notify(int id, NMHDR *pnmh)
Definition: taskbar.cpp:243
Window super
Definition: taskbar.h:75
Definition: window.c:28
Definition: inflate.c:139
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
unsigned char BYTE
Definition: xxhash.c:193