update for HEAD-2003091401
[reactos.git] / subsys / system / explorer / taskbar / quicklaunch.h
1 /*
2  * Copyright 2003 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  // quicklaunch.h
24  //
25  // Martin Fuchs, 22.08.2003
26  //
27
28
29 #define QUICKLAUNCH_WIDTH       208
30
31 #define IDW_QUICKLAUNCHBAR      101
32
33 #define PM_REFRESH                      (WM_APP+0x14)
34
35 #define IDC_FIRST_QUICK_ID      0x4000
36
37
38 #define QUICKLAUNCH_FOLDER      _T("Microsoft\\Internet Explorer\\Quick Launch")
39
40
41  /// quick launch bar shortcut
42 struct QuickLaunchEntry
43 {       
44         QuickLaunchEntry();
45
46         HBITMAP _hbmp;
47         String  _title;
48         ShellEntry* _entry;
49 };
50
51  /// map for managing the task bar buttons
52 struct QuickLaunchMap : public map<int, QuickLaunchEntry>
53 {
54         ~QuickLaunchMap();
55 };
56
57
58  /// quick launch bar window
59 struct QuickLaunchBar : public SubclassedWindow
60 {
61         typedef SubclassedWindow super;
62
63         QuickLaunchBar(HWND hwnd);
64         ~QuickLaunchBar();
65
66         static HWND     Create(HWND hwndParent);
67
68 protected:
69         LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
70         int             Command(int id, int code);
71         int             Notify(int id, NMHDR* pnmh);
72
73         ShellDirectory* _dir;
74
75         int                             _next_id;
76         QuickLaunchMap  _entries;
77
78         void    AddShortcuts();
79 };