Copy wininet to branch
[reactos.git] / reactos / subsys / system / explorer / taskbar / desktopbar.h
1 /*
2 * Copyright 2003, 2004 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19
20 //
21 // Explorer and Desktop clone
22 //
23 // desktopbar.h
24 //
25 // Martin Fuchs, 22.08.2003
26 //
27
28
29 #define CLASSNAME_EXPLORERBAR TEXT("Shell_TrayWnd")
30 #define TITLE_EXPLORERBAR TEXT("") // use an empty window title, so windows taskmanager does not show the window in its application list
31
32
33 #define DESKTOPBARBAR_HEIGHT 29
34
35
36 #define IDC_START 0x1000
37 #define IDC_LOGOFF 0x1001
38 #define IDC_SHUTDOWN 0x1002
39 #define IDC_LAUNCH 0x1003
40 #define IDC_START_HELP 0x1004
41 #define IDC_SEARCH_FILES 0x1005
42 #define IDC_SEARCH_COMPUTER 0x1006
43 #define IDC_SETTINGS 0x1007
44 #define IDC_ADMIN 0x1008
45 #define IDC_DOCUMENTS 0x1009
46 #define IDC_RECENT 0x100A
47 #define IDC_FAVORITES 0x100B
48 #define IDC_PROGRAMS 0x100C
49 #define IDC_EXPLORE 0x100D
50 #define IDC_NETWORK 0x100E
51 #define IDC_CONNECTIONS 0x100F
52 #define IDC_DRIVES 0x1010
53 #define IDC_CONTROL_PANEL 0x1011
54 #define IDC_SETTINGS_MENU 0x1012
55 #define IDC_PRINTERS 0x1013
56 #define IDC_PRINTERS_MENU 0x1014
57 #define IDC_BROWSE 0x1015
58 #define IDC_SEARCH_PROGRAM 0x1016
59 #define IDC_SEARCH 0x1017
60 #define IDC_TERMINATE 0x1018
61
62 #define IDC_FIRST_MENU 0x3000
63
64
65 /// desktop bar window, also known as "system tray"
66 struct DesktopBar : public
67 #ifdef _ROS_
68 TrayIconControllerTemplate<
69 OwnerDrawParent<Window> >
70 #else
71 OwnerDrawParent<Window>
72 #endif
73 {
74 #ifdef _ROS_
75 typedef TrayIconControllerTemplate<
76 OwnerDrawParent<Window> > super;
77 #else
78 typedef OwnerDrawParent<Window> super;
79 #endif
80
81 DesktopBar(HWND hwnd);
82 ~DesktopBar();
83
84 static HWND Create();
85
86 protected:
87 RECT _work_area_org;
88 int _taskbar_pos;
89
90 LRESULT Init(LPCREATESTRUCT pcs);
91 LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
92 int Command(int id, int code);
93
94 void Resize(int cx, int cy);
95 void RegisterHotkeys();
96 void ProcessHotKey(int id_hotkey);
97 void ShowStartMenu();
98 LRESULT ProcessCopyData(COPYDATASTRUCT* pcd);
99
100 WindowHandle _hwndTaskBar;
101 WindowHandle _hwndNotify;
102 WindowHandle _hwndQuickLaunch;
103 WindowHandle _hwndrebar;
104
105 struct StartMenuRoot* _startMenuRoot;
106
107 #ifdef _ROS_
108 TrayIcon _trayIcon;
109
110 void AddTrayIcons();
111 virtual void TrayClick(UINT id, int btn);
112 virtual void TrayDblClick(UINT id, int btn);
113 #else
114 const UINT WM_TASKBARCREATED;
115 #endif
116 };