ReactOS
0.4.16-dev-13-ge2fc578
startmenu.h
Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
19
20
//
21
// Explorer and Desktop clone
22
//
23
// startmenu.h
24
//
25
// Martin Fuchs, 16.08.2003
26
//
27
28
29
#define CLASSNAME_STARTMENU TEXT("ReactOSStartmenuClass"
)
30
#define TITLE_STARTMENU TEXT("Start Menu"
)
31
32
33
#define STARTMENU_WIDTH_MIN 120
34
#define STARTMENU_LINE_HEIGHT(icon_size) (icon_size+4)
35
#define STARTMENU_SEP_HEIGHT(icon_size) (STARTMENU_LINE_HEIGHT(icon_size)/2)
36
#define STARTMENU_TOP_BTN_SPACE 8
37
38
39
// private message constants
40
#define PM_STARTMENU_CLOSED (WM_APP+0x11)
41
#define PM_STARTENTRY_LAUNCHED (WM_APP+0x12)
42
43
#ifndef _LIGHT_STARTMENU
44
#define PM_STARTENTRY_FOCUSED (WM_APP+0x13)
45
#endif
46
47
#define PM_UPDATE_ICONS (WM_APP+0x14)
48
#define PM_SELECT_ENTRY (WM_APP+0x15)
49
50
52
struct
StartMenuDirectory
53
{
54
StartMenuDirectory
(
const
ShellDirectory
&
dir
,
const
String
& ignore=
""
)
55
:
_dir
(
dir
),
_ignore
(ignore)
56
{
57
}
58
59
~StartMenuDirectory
()
60
{
61
_dir
.
free_subentries
();
62
}
63
64
ShellDirectory
_dir
;
65
String
_ignore
;
66
};
67
68
typedef
list<StartMenuDirectory>
StartMenuShellDirs
;
69
typedef
set<Entry*>
ShellEntrySet
;
70
72
struct
StartMenuEntry
73
{
74
StartMenuEntry
() :
_icon_id
(
ICID_UNKNOWN
) {}
75
76
String
_title
;
77
ICON_ID
_icon_id
;
78
ShellEntrySet
_entries
;
79
};
80
81
82
extern
int
GetStartMenuBtnTextWidth
(
HDC
hdc
,
LPCTSTR
title
,
HWND
hwnd
);
83
84
85
#ifndef _LIGHT_STARTMENU
86
90
struct
StartMenuButton
:
public
OwnerdrawnButton
91
{
92
typedef
OwnerdrawnButton
super
;
93
94
StartMenuButton
(
HWND
hwnd
,
ICON_ID
icon_id,
bool
hasSubmenu)
95
:
super
(
hwnd
), _hIcon(
hIcon
),
_hasSubmenu
(hasSubmenu) {}
96
97
protected
:
98
LRESULT
WndProc
(
UINT
nmsg,
WPARAM
wparam
,
LPARAM
lparam
);
99
virtual
void
DrawItem
(
LPDRAWITEMSTRUCT
dis);
100
101
ICON_ID
_icon_id
;
102
bool
_hasSubmenu
;
103
};
104
105
109
struct
StartMenuCtrl
:
public
Button
110
{
111
StartMenuCtrl
(
HWND
parent
,
int
x
,
int
y
,
int
w
,
LPCTSTR
title
,
112
UINT
id
,
HICON
hIcon
=0,
bool
hasSubmenu=
false
,
DWORD
style
=
WS_VISIBLE
|
WS_CHILD
|
BS_OWNERDRAW
,
DWORD
exStyle=0)
113
:
Button
(
parent
,
title
,
x
,
y
,
w
,
STARTMENU_LINE_HEIGHT
(
icon_size
),
id
,
style
, exStyle)
114
{
115
*
new
StartMenuButton
(_hwnd,
hIcon
, hasSubmenu);
116
117
SetWindowFont
(_hwnd,
GetStockFont
(
DEFAULT_GUI_FONT
),
FALSE
);
118
}
119
};
120
121
123
struct
StartMenuSeparator
:
public
Static
124
{
125
StartMenuSeparator
(
HWND
parent
,
int
x
,
int
y
,
int
w
,
DWORD
style
=
WS_VISIBLE
|
WS_CHILD
|
WS_DISABLED
|
SS_ETCHEDHORZ
,
DWORD
exStyle=0)
126
:
Static
(
parent
,
NULL
,
x
,
y
+
STARTMENU_SEP_HEIGHT
(
icon_size
)/2-1,
w
, 2, -1,
style
, exStyle)
127
{
128
}
129
};
130
131
#endif
132
133
134
typedef
list<ShellPath>
StartMenuFolders
;
135
137
struct
StartMenuCreateInfo
138
{
139
StartMenuCreateInfo
() :
_border_top
(0) {}
140
141
StartMenuFolders
_folders
;
142
int
_border_top
;
143
String
_title
;
144
Window::CREATORFUNC_INFO
_creator
;
145
void
*
_info
;
146
String
_filter
;
147
};
148
149
#define STARTMENU_CREATOR(WND_CLASS) WINDOW_CREATOR_INFO(WND_CLASS, StartMenuCreateInfo)
150
151
typedef
map<int, StartMenuEntry>
ShellEntryMap
;
152
153
154
#ifdef _LIGHT_STARTMENU
155
156
struct
SMBtnInfo
157
{
158
SMBtnInfo(
const
StartMenuEntry
&
entry
,
int
id
,
bool
hasSubmenu=
false
,
bool
enabled
=
true
)
159
: _title(
entry
._title),
160
_icon_id(
entry
._icon_id),
161
_id(
id
),
162
_hasSubmenu(hasSubmenu),
163
_enabled(
enabled
)
164
{
165
}
166
167
SMBtnInfo(
LPCTSTR
title
,
ICON_ID
icon_id,
int
id
,
bool
hasSubmenu=
false
,
bool
enabled
=
true
)
168
: _title(
title
),
169
_icon_id(icon_id),
170
_id(
id
),
171
_hasSubmenu(hasSubmenu),
172
_enabled(
enabled
)
173
{
174
}
175
176
String
_title;
177
ICON_ID
_icon_id;
178
int
_id;
179
bool
_hasSubmenu;
180
bool
_enabled;
181
};
182
183
typedef
vector<SMBtnInfo>
SMBtnVector;
184
185
extern
void
DrawStartMenuButton
(
HDC
hdc
,
const
RECT
&
rect
,
LPCTSTR
title
,
const
SMBtnInfo& btn,
bool
has_focus,
bool
pushed,
int
icon_size
);
186
187
#else
188
189
extern
void
DrawStartMenuButton
(
HDC
hdc
,
const
RECT
&
rect
,
LPCTSTR
title
,
HICON
hIcon
,
190
bool
hasSubmenu,
bool
enabled
,
bool
has_focus,
bool
pushed,
int
icon_size
);
191
192
#endif
193
194
199
struct
StartMenu
:
200
#ifdef _LIGHT_STARTMENU
201
public
ExtContextMenuHandlerT
<OwnerDrawParent<Window> >
202
#else
203
public
ExtContextMenuHandlerT
<OwnerDrawParent<DialogWindow> >
204
#endif
205
{
206
#ifdef _LIGHT_STARTMENU
207
typedef
ExtContextMenuHandlerT<OwnerDrawParent<Window>
>
super
;
208
#else
209
typedef
ExtContextMenuHandlerT<OwnerDrawParent<DialogWindow>
>
super
;
210
#endif
211
212
StartMenu
(
HWND
hwnd
,
int
icon_size
=
ICON_SIZE_SMALL
);
213
StartMenu
(
HWND
hwnd
,
const
StartMenuCreateInfo
& create_info,
int
icon_size
=
ICON_SIZE_SMALL
);
214
~StartMenu
();
215
216
static
HWND
Create
(
int
x
,
int
y
,
const
StartMenuFolders
&,
HWND
hwndParent
,
LPCTSTR
title
,
217
CREATORFUNC_INFO
creator=
s_def_creator
,
void
*
info
=
NULL
,
const
String
&
filter
=
""
);
218
static
CREATORFUNC_INFO
s_def_creator
;
219
220
protected
:
221
// overridden member functions
222
LRESULT
Init
(
LPCREATESTRUCT
pcs);
223
LRESULT
WndProc
(
UINT
nmsg,
WPARAM
wparam
,
LPARAM
lparam
);
224
int
Command
(
int
id
,
int
code
);
225
226
// window class
227
static
BtnWindowClass
&
GetWndClasss
();
228
229
// data members
230
int
_next_id
;
231
ShellEntryMap
_entries
;
232
StartMenuShellDirs
_dirs
;
233
234
int
_submenu_id
;
235
WindowHandle
_submenu
;
236
237
int
_border_left
;
// left border in pixels
238
int
_border_top
;
// top border in pixels
239
int
_bottom_max
;
// limit display area for long start menus
240
241
bool
_floating_btn
;
242
bool
_arrow_btns
;
243
244
POINT
_last_pos
;
245
enum
SCROLL_MODE
{
SCROLL_NOT
,
SCROLL_UP
,
SCROLL_DOWN
}
_scroll_mode
;
246
int
_scroll_pos
;
247
int
_invisible_lines
;
248
249
StartMenuCreateInfo
_create_info
;
// copy of the original create info
250
251
int
_icon_size
;
252
253
#ifdef _LIGHT_STARTMENU
254
SMBtnVector _buttons;
255
int
_selected_id;
256
LPARAM
_last_mouse_pos;
257
258
void
ResizeToButtons();
259
int
ButtonHitTest(
POINT
pt
);
260
void
InvalidateSelection();
261
const
SMBtnInfo* GetButtonInfo(
int
id
)
const
;
262
bool
SelectButton(
int
id
,
bool
open_sub=
true
);
263
bool
SelectButtonIndex(
int
idx
,
bool
open_sub=
true
);
264
int
GetSelectionIndex();
265
virtual
void
ProcessKey(
int
vk
);
266
bool
Navigate(
int
step);
267
bool
OpenSubmenu(
bool
select_first=
false
);
268
bool
JumpToNextShortcut(
char
c
);
269
#endif
270
271
// member functions
272
void
ResizeButtons
(
int
cx
);
273
274
virtual
void
AddEntries
();
275
276
ShellEntryMap::iterator
AddEntry
(
const
String
&
title
,
ICON_ID
icon_id,
Entry
*
entry
);
277
ShellEntryMap::iterator
AddEntry
(
const
String
&
title
,
ICON_ID
icon_id=
ICID_NONE
,
int
id
=-1);
278
ShellEntryMap::iterator
AddEntry
(
const
ShellFolder
folder
,
ShellEntry
*
entry
);
279
ShellEntryMap::iterator
AddEntry
(
const
ShellFolder
folder
,
Entry
*
entry
);
280
281
void
AddShellEntries
(
const
ShellDirectory
&
dir
,
int
max
=-1,
const
String
& ignore=
""
);
282
283
void
AddButton
(
LPCTSTR
title
,
ICON_ID
icon_id=
ICID_NONE
,
bool
hasSubmenu=
false
,
int
id
=-1,
bool
enabled
=
true
);
284
void
AddSeparator
();
285
286
bool
CloseSubmenus
() {
return
CloseOtherSubmenus
();}
287
bool
CloseOtherSubmenus
(
int
id
=0);
288
void
CreateSubmenu
(
int
id
,
LPCTSTR
title
,
CREATORFUNC_INFO
creator=
s_def_creator
,
void
*
info
=
NULL
);
289
bool
CreateSubmenu
(
int
id
,
int
folder
,
LPCTSTR
title
,
CREATORFUNC_INFO
creator=
s_def_creator
,
void
*
info
=
NULL
);
290
bool
CreateSubmenu
(
int
id
,
int
folder1,
int
folder2,
LPCTSTR
title
,
CREATORFUNC_INFO
creator=
s_def_creator
,
void
*
info
=
NULL
);
291
void
CreateSubmenu
(
int
id
,
const
StartMenuFolders
& new_folders,
LPCTSTR
title
,
CREATORFUNC_INFO
creator=
s_def_creator
,
void
*
info
=
NULL
);
292
void
ActivateEntry
(
int
id
,
const
ShellEntrySet
& entries);
293
virtual
void
CloseStartMenu
(
int
id
=0);
294
295
bool
GetButtonRect
(
int
id
,
PRECT
prect)
const
;
296
297
void
DrawFloatingButton
(
HDC
hdc
);
298
void
GetFloatingButtonRect
(
LPRECT
prect);
299
void
GetArrowButtonRects
(
LPRECT
prect_up,
LPRECT
prect_down,
int
icon_size
);
300
301
void
DrawArrows
(
HDC
hdc
,
int
icon_size
);
302
303
void
Paint
(PaintCanvas& canvas);
304
void
UpdateIcons
(
/*int idx*/
);
305
};
306
307
308
// declare shell32's "Run..." dialog export function
309
typedef
void
(
WINAPI
*
RUNFILEDLG
)(
HWND
hwndOwner,
HICON
hIcon
,
LPCSTR
lpstrDirectory,
LPCSTR
lpstrTitle,
LPCSTR
lpstrDescription,
UINT
uFlags
);
310
311
//
312
// Flags for RunFileDlg
313
//
314
315
#define RFF_NOBROWSE 0x01
// Removes the browse button.
316
#define RFF_NODEFAULT 0x02
// No default item selected.
317
#define RFF_CALCDIRECTORY 0x04
// Calculates the working directory from the file name.
318
#define RFF_NOLABEL 0x08
// Removes the edit box label.
319
#define RFF_NOSEPARATEMEM 0x20
// Removes the Separate Memory Space check box (Windows NT only).
320
321
322
// declare more previously undocumented shell32 functions
323
typedef
void
(
WINAPI
*
EXITWINDOWSDLG
)(
HWND
hwndOwner);
324
typedef
int
(
WINAPI
*
LOGOFFWINDOWSDIALOG
)(
UINT
flags
);
325
typedef
int
(
WINAPI
*
RESTARTWINDOWSDLG
)(
HWND
hwndOwner,
LPCWSTR
reason
,
UINT
flags
);
326
typedef
int
(
WINAPI
*
RESTARTWINDOWSDLGEX
)(
HWND
hWndOwner,
LPCWSTR
lpwstrReason,
DWORD
uFlags
,
DWORD
uReason);
327
typedef
BOOL
(
WINAPI
*
SHFINDFILES
)(
LPCITEMIDLIST
pidlRoot,
LPCITEMIDLIST
pidlSavedSearch);
328
typedef
BOOL
(
WINAPI
*
SHFINDCOMPUTER
)(
LPCITEMIDLIST
pidlRoot,
LPCITEMIDLIST
pidlSavedSearch);
329
330
332
struct
StartMenuHandler
:
public
StartMenu
333
{
334
typedef
StartMenu
super
;
335
336
StartMenuHandler
(
HWND
hwnd
,
int
icon_size
=
ICON_SIZE_SMALL
)
337
:
super
(
hwnd
,
icon_size
)
338
{
339
}
340
341
StartMenuHandler
(
HWND
hwnd
,
const
StartMenuCreateInfo
& create_info,
int
icon_size
=
ICON_SIZE_SMALL
)
342
:
super
(
hwnd
, create_info,
icon_size
)
343
{
344
}
345
346
protected
:
347
int
Command
(
int
id
,
int
code
);
348
349
static
void
ShowLaunchDialog
(
HWND
hwndOwner);
350
static
void
ShowLogoffDialog
(
HWND
hwndOwner);
351
static
void
ShowRestartDialog
(
HWND
hwndOwner,
UINT
flags
);
352
static
void
ShowSearchDialog
();
353
static
void
ShowSearchComputer
();
354
};
355
356
357
struct
StartMenuRootCreateInfo
358
{
359
int
_icon_size
;
360
};
361
362
364
struct
StartMenuRoot
:
public
StartMenuHandler
365
{
366
typedef
StartMenuHandler
super
;
367
368
StartMenuRoot
(
HWND
hwnd
,
const
StartMenuRootCreateInfo
&
info
);
369
370
static
HWND
Create
(
HWND
hwndDesktopBar,
int
icon_size
);
371
void
TrackStartmenu
();
372
void
CloseStartMenu
(
int
id
=0);
373
bool
IsStartMenuVisible
()
const
;
374
int
Command
(
int
id
,
int
code
);
375
376
HWND
_hwndStartButton
;
377
378
protected
:
379
LRESULT
Init
(
LPCREATESTRUCT
pcs);
380
LRESULT
WndProc
(
UINT
nmsg,
WPARAM
wparam
,
LPARAM
lparam
);
381
382
SIZE
_logo_size
;
383
384
virtual
void
AddEntries
();
385
virtual
void
ProcessKey
(
int
vk
);
386
387
void
Paint
(PaintCanvas& canvas);
388
389
390
void
ReadLogoSize
();
391
UINT
GetLogoResId
();
392
};
393
394
396
struct
SettingsMenu
:
public
StartMenuHandler
397
{
398
typedef
StartMenuHandler
super
;
399
400
SettingsMenu
(
HWND
hwnd
,
const
StartMenuCreateInfo
& create_info)
401
:
super
(
hwnd
, create_info)
402
{
403
}
404
405
protected
:
406
virtual
void
AddEntries
();
407
};
408
409
411
struct
BrowseMenu
:
public
StartMenuHandler
412
{
413
typedef
StartMenuHandler
super
;
414
415
BrowseMenu
(
HWND
hwnd
,
const
StartMenuCreateInfo
& create_info)
416
:
super
(
hwnd
, create_info)
417
{
418
}
419
420
protected
:
421
virtual
void
AddEntries
();
422
};
423
424
426
struct
SearchMenu
:
public
StartMenuHandler
427
{
428
typedef
StartMenuHandler
super
;
429
430
SearchMenu
(
HWND
hwnd
,
const
StartMenuCreateInfo
& create_info)
431
:
super
(
hwnd
, create_info)
432
{
433
}
434
435
protected
:
436
virtual
void
AddEntries
();
437
};
438
439
440
#define RECENT_DOCS_COUNT 20
441
443
struct
RecentStartMenu
:
public
StartMenu
444
{
445
typedef
StartMenu
super
;
446
447
RecentStartMenu
(
HWND
hwnd
,
const
StartMenuCreateInfo
& create_info)
448
:
super
(
hwnd
, create_info)
449
{
450
}
451
452
protected
:
453
virtual
void
AddEntries
();
454
};
455
456
457
#ifndef _SHELL32_FAVORITES
458
459
typedef
map<int, BookmarkNode>
BookmarkMap
;
460
462
struct
FavoritesMenu
:
public
StartMenu
463
{
464
typedef
StartMenu
super
;
465
466
FavoritesMenu
(
HWND
hwnd
,
const
StartMenuCreateInfo
& create_info)
467
:
super
(
hwnd
, create_info),
468
_bookmarks
(*(
BookmarkList
*)create_info._info)
469
{
470
}
471
472
protected
:
473
virtual
int
Command
(
int
id
,
int
code
);
474
virtual
void
AddEntries
();
475
476
BookmarkList
_bookmarks
;
477
BookmarkMap
_entries
;
478
};
479
480
#endif
lparam
@ lparam
Definition:
SystemMenu.c:31
wparam
@ wparam
Definition:
SystemMenu.c:30
style
Arabic default style
Definition:
afstyles.h:94
dir
unsigned int dir
Definition:
maze.c:112
Create
@ Create
Definition:
registry.c:563
Init
Definition:
stterm-test.cc:47
list
Definition:
list.h:37
map
Definition:
_map.h:48
map< int, StartMenuEntry >::iterator
_Rep_type::iterator iterator
Definition:
_map.h:85
set
Definition:
_set.h:50
hwndParent
static HWND hwndParent
Definition:
cryptui.c:300
NULL
#define NULL
Definition:
types.h:112
FALSE
#define FALSE
Definition:
types.h:117
idx
unsigned int idx
Definition:
utils.c:41
uFlags
UINT uFlags
Definition:
api.c:59
reason
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition:
object.c:1904
int
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition:
typeof.h:31
pt
#define pt(x, y)
Definition:
drawing.c:79
parent
r parent
Definition:
btrfs.c:3010
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
x
GLint GLint GLint GLint GLint x
Definition:
gl.h:1548
y
GLint GLint GLint GLint GLint GLint y
Definition:
gl.h:1548
enabled
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition:
glext.h:7750
c
const GLubyte * c
Definition:
glext.h:8905
filter
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition:
glext.h:7005
flags
GLbitfield flags
Definition:
glext.h:7161
w
GLubyte GLubyte GLubyte GLubyte w
Definition:
glext.h:6102
id
GLuint id
Definition:
glext.h:5910
void
Definition:
nsiface.idl:2307
entry
uint32_t entry
Definition:
isohybrid.c:63
ICON_ID
ICON_ID
Definition:
globals.h:62
ICID_UNKNOWN
@ ICID_UNKNOWN
Definition:
globals.h:63
ICID_NONE
@ ICID_NONE
Definition:
globals.h:64
ICON_SIZE_SMALL
#define ICON_SIZE_SMALL
Definition:
globals.h:169
hdc
HDC hdc
Definition:
main.c:9
HDC
static HDC
Definition:
imagelist.c:88
HICON
static HICON
Definition:
imagelist.c:80
vk
WORD vk
Definition:
input.c:77
hIcon
HICON hIcon
Definition:
msconfig.c:44
UINT
unsigned int UINT
Definition:
ndis.h:50
BOOL
#define BOOL
Definition:
nt_native.h:43
WS_CHILD
#define WS_CHILD
Definition:
pedump.c:617
WS_VISIBLE
#define WS_VISIBLE
Definition:
pedump.c:620
BS_OWNERDRAW
#define BS_OWNERDRAW
Definition:
pedump.c:661
WS_DISABLED
#define WS_DISABLED
Definition:
pedump.c:621
title
static char title[]
Definition:
ps.c:92
cx
_Out_opt_ int * cx
Definition:
commctrl.h:585
LPCITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition:
shtypes.idl:42
icon_size
iconPos iconPos icon_size
Definition:
startmenu.cpp:1416
rect
& rect
Definition:
startmenu.cpp:1413
RESTARTWINDOWSDLGEX
int(WINAPI * RESTARTWINDOWSDLGEX)(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, DWORD uReason)
Definition:
startmenu.h:326
SHFINDFILES
BOOL(WINAPI * SHFINDFILES)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch)
Definition:
startmenu.h:327
BookmarkMap
map< int, BookmarkNode > BookmarkMap
Definition:
startmenu.h:459
SHFINDCOMPUTER
BOOL(WINAPI * SHFINDCOMPUTER)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch)
Definition:
startmenu.h:328
GetStartMenuBtnTextWidth
int GetStartMenuBtnTextWidth(HDC hdc, LPCTSTR title, HWND hwnd)
Definition:
startmenu.cpp:1371
ShellEntrySet
set< Entry * > ShellEntrySet
Definition:
startmenu.h:69
StartMenuShellDirs
list< StartMenuDirectory > StartMenuShellDirs
Definition:
startmenu.h:68
RESTARTWINDOWSDLG
int(WINAPI * RESTARTWINDOWSDLG)(HWND hwndOwner, LPCWSTR reason, UINT flags)
Definition:
startmenu.h:325
StartMenuFolders
list< ShellPath > StartMenuFolders
Definition:
startmenu.h:134
STARTMENU_SEP_HEIGHT
#define STARTMENU_SEP_HEIGHT(icon_size)
Definition:
startmenu.h:35
ShellEntryMap
map< int, StartMenuEntry > ShellEntryMap
Definition:
startmenu.h:151
DrawStartMenuButton
void DrawStartMenuButton(HDC hdc, const RECT &rect, LPCTSTR title, HICON hIcon, bool hasSubmenu, bool enabled, bool has_focus, bool pushed, int icon_size)
STARTMENU_LINE_HEIGHT
#define STARTMENU_LINE_HEIGHT(icon_size)
Definition:
startmenu.h:34
RUNFILEDLG
void(WINAPI * RUNFILEDLG)(HWND hwndOwner, HICON hIcon, LPCSTR lpstrDirectory, LPCSTR lpstrTitle, LPCSTR lpstrDescription, UINT uFlags)
Definition:
startmenu.h:309
EXITWINDOWSDLG
void(WINAPI * EXITWINDOWSDLG)(HWND hwndOwner)
Definition:
startmenu.h:323
LOGOFFWINDOWSDIALOG
int(WINAPI * LOGOFFWINDOWSDIALOG)(UINT flags)
Definition:
startmenu.h:324
BookmarkList
Definition:
favorites.h:77
BrowseMenu
"Browse Files..." sub-start menu
Definition:
startmenu.h:412
BrowseMenu::super
StartMenuHandler super
Definition:
startmenu.h:413
BrowseMenu::BrowseMenu
BrowseMenu(HWND hwnd, const StartMenuCreateInfo &create_info)
Definition:
startmenu.h:415
BrowseMenu::AddEntries
virtual void AddEntries()
Definition:
startmenu.cpp:2173
BtnWindowClass
window class with gray background color
Definition:
window.h:249
Button
Definition:
window.h:573
Command
Definition:
shell.h:41
Entry
base of all file and directory entries
Definition:
entries.h:83
Entry::free_subentries
void free_subentries()
Definition:
entries.cpp:743
ExtContextMenuHandlerT
Definition:
shellclasses.h:1122
FavoritesMenu
Bookmarks sub-startmenu.
Definition:
startmenu.h:463
FavoritesMenu::_bookmarks
BookmarkList _bookmarks
Definition:
startmenu.h:476
FavoritesMenu::AddEntries
virtual void AddEntries()
Definition:
startmenu.cpp:2224
FavoritesMenu::_entries
BookmarkMap _entries
Definition:
startmenu.h:477
FavoritesMenu::super
StartMenu super
Definition:
startmenu.h:464
FavoritesMenu::FavoritesMenu
FavoritesMenu(HWND hwnd, const StartMenuCreateInfo &create_info)
Definition:
startmenu.h:466
OwnerdrawnButton
Definition:
window.h:657
RecentStartMenu
"Recent Files" sub-start menu
Definition:
startmenu.h:444
RecentStartMenu::AddEntries
virtual void AddEntries()
Definition:
startmenu.cpp:2200
RecentStartMenu::super
StartMenu super
Definition:
startmenu.h:445
RecentStartMenu::RecentStartMenu
RecentStartMenu(HWND hwnd, const StartMenuCreateInfo &create_info)
Definition:
startmenu.h:447
SearchMenu
Search sub-startmenu.
Definition:
startmenu.h:427
SearchMenu::super
StartMenuHandler super
Definition:
startmenu.h:428
SearchMenu::AddEntries
virtual void AddEntries()
Definition:
startmenu.cpp:2187
SearchMenu::SearchMenu
SearchMenu(HWND hwnd, const StartMenuCreateInfo &create_info)
Definition:
startmenu.h:430
SettingsMenu
Settings sub-startmenu.
Definition:
startmenu.h:397
SettingsMenu::SettingsMenu
SettingsMenu(HWND hwnd, const StartMenuCreateInfo &create_info)
Definition:
startmenu.h:400
SettingsMenu::super
StartMenuHandler super
Definition:
startmenu.h:398
SettingsMenu::AddEntries
virtual void AddEntries()
Definition:
startmenu.cpp:2148
ShellDirectory
shell folder entry
Definition:
shellfs.h:54
ShellEntry
shell file/directory entry
Definition:
shellfs.h:31
ShellFolder
IShellFolder smart pointer.
Definition:
shellclasses.h:594
StartMenuButton
Definition:
startmenu.h:91
StartMenuButton::_icon_id
ICON_ID _icon_id
Definition:
startmenu.h:101
StartMenuButton::StartMenuButton
StartMenuButton(HWND hwnd, ICON_ID icon_id, bool hasSubmenu)
Definition:
startmenu.h:94
StartMenuButton::super
OwnerdrawnButton super
Definition:
startmenu.h:92
StartMenuButton::DrawItem
virtual void DrawItem(LPDRAWITEMSTRUCT dis)
Definition:
startmenu.cpp:1541
StartMenuButton::WndProc
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition:
startmenu.cpp:1517
StartMenuButton::_hasSubmenu
bool _hasSubmenu
Definition:
startmenu.h:102
StartMenuCreateInfo
structor containing information for creating of start menus
Definition:
startmenu.h:138
StartMenuCreateInfo::_info
void * _info
Definition:
startmenu.h:145
StartMenuCreateInfo::_folders
StartMenuFolders _folders
Definition:
startmenu.h:141
StartMenuCreateInfo::_creator
Window::CREATORFUNC_INFO _creator
Definition:
startmenu.h:144
StartMenuCreateInfo::_filter
String _filter
Definition:
startmenu.h:146
StartMenuCreateInfo::StartMenuCreateInfo
StartMenuCreateInfo()
Definition:
startmenu.h:139
StartMenuCreateInfo::_border_top
int _border_top
Definition:
startmenu.h:142
StartMenuCreateInfo::_title
String _title
Definition:
startmenu.h:143
StartMenuCtrl
Definition:
startmenu.h:110
StartMenuCtrl::StartMenuCtrl
StartMenuCtrl(HWND parent, int x, int y, int w, LPCTSTR title, UINT id, HICON hIcon=0, bool hasSubmenu=false, DWORD style=WS_VISIBLE|WS_CHILD|BS_OWNERDRAW, DWORD exStyle=0)
Definition:
startmenu.h:111
StartMenuDirectory
StartMenuDirectory is used to store the base directory of start menus.
Definition:
startmenu.h:53
StartMenuDirectory::~StartMenuDirectory
~StartMenuDirectory()
Definition:
startmenu.h:59
StartMenuDirectory::StartMenuDirectory
StartMenuDirectory(const ShellDirectory &dir, const String &ignore="")
Definition:
startmenu.h:54
StartMenuDirectory::_ignore
String _ignore
Definition:
startmenu.h:65
StartMenuDirectory::_dir
ShellDirectory _dir
Definition:
startmenu.h:64
StartMenuEntry
structure holding information about one start menu entry
Definition:
startmenu.h:73
StartMenuEntry::_icon_id
ICON_ID _icon_id
Definition:
startmenu.h:77
StartMenuEntry::StartMenuEntry
StartMenuEntry()
Definition:
startmenu.h:74
StartMenuEntry::_entries
ShellEntrySet _entries
Definition:
startmenu.h:78
StartMenuEntry::_title
String _title
Definition:
startmenu.h:76
StartMenuHandler
Handling of standard start menu commands.
Definition:
startmenu.h:333
StartMenuHandler::super
StartMenu super
Definition:
startmenu.h:334
StartMenuHandler::ShowLaunchDialog
static void ShowLaunchDialog(HWND hwndOwner)
Definition:
startmenu.cpp:2107
StartMenuHandler::ShowRestartDialog
static void ShowRestartDialog(HWND hwndOwner, UINT flags)
Definition:
startmenu.cpp:2138
StartMenuHandler::StartMenuHandler
StartMenuHandler(HWND hwnd, int icon_size=ICON_SIZE_SMALL)
Definition:
startmenu.h:336
StartMenuHandler::ShowSearchComputer
static void ShowSearchComputer()
Definition:
startmenu.cpp:2068
StartMenuHandler::StartMenuHandler
StartMenuHandler(HWND hwnd, const StartMenuCreateInfo &create_info, int icon_size=ICON_SIZE_SMALL)
Definition:
startmenu.h:341
StartMenuHandler::ShowSearchDialog
static void ShowSearchDialog()
Definition:
startmenu.cpp:2056
StartMenuHandler::ShowLogoffDialog
static void ShowLogoffDialog(HWND hwndOwner)
Definition:
startmenu.cpp:2113
StartMenuRootCreateInfo
Definition:
startmenu.h:358
StartMenuRootCreateInfo::_icon_size
int _icon_size
Definition:
startmenu.h:359
StartMenuRoot
Startmenu root window.
Definition:
startmenu.h:365
StartMenuRoot::ReadLogoSize
void ReadLogoSize()
Definition:
startmenu.cpp:1581
StartMenuRoot::AddEntries
virtual void AddEntries()
Definition:
startmenu.cpp:1757
StartMenuRoot::GetLogoResId
UINT GetLogoResId()
Definition:
startmenu.cpp:1806
StartMenuRoot::CloseStartMenu
void CloseStartMenu(int id=0)
close all windows of the start menu popup
Definition:
startmenu.cpp:1821
StartMenuRoot::IsStartMenuVisible
bool IsStartMenuVisible() const
Definition:
startmenu.cpp:1829
StartMenuRoot::_logo_size
SIZE _logo_size
Definition:
startmenu.h:382
StartMenuRoot::ProcessKey
virtual void ProcessKey(int vk)
Definition:
startmenu.cpp:1834
StartMenuRoot::Paint
void Paint(PaintCanvas &canvas)
Definition:
startmenu.cpp:1785
StartMenuRoot::super
StartMenuHandler super
Definition:
startmenu.h:366
StartMenuRoot::_hwndStartButton
HWND _hwndStartButton
Definition:
startmenu.h:376
StartMenuRoot::TrackStartmenu
void TrackStartmenu()
Definition:
startmenu.cpp:1624
StartMenuRoot::WndProc
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition:
startmenu.cpp:1765
StartMenuSeparator
separator between start menu entries
Definition:
startmenu.h:124
StartMenuSeparator::StartMenuSeparator
StartMenuSeparator(HWND parent, int x, int y, int w, DWORD style=WS_VISIBLE|WS_CHILD|WS_DISABLED|SS_ETCHEDHORZ, DWORD exStyle=0)
Definition:
startmenu.h:125
StartMenu
Definition:
startmenu.h:205
StartMenu::~StartMenu
~StartMenu()
Definition:
startmenu.cpp:100
StartMenu::CreateSubmenu
void CreateSubmenu(int id, LPCTSTR title, CREATORFUNC_INFO creator=s_def_creator, void *info=NULL)
Definition:
startmenu.cpp:1217
StartMenu::super
ExtContextMenuHandlerT< OwnerDrawParent< DialogWindow > > super
Definition:
startmenu.h:209
StartMenu::_bottom_max
int _bottom_max
Definition:
startmenu.h:239
StartMenu::WndProc
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition:
startmenu.cpp:299
StartMenu::_dirs
StartMenuShellDirs _dirs
Definition:
startmenu.h:232
StartMenu::CloseOtherSubmenus
bool CloseOtherSubmenus(int id=0)
Definition:
startmenu.cpp:1197
StartMenu::_next_id
int _next_id
Definition:
startmenu.h:230
StartMenu::AddEntry
ShellEntryMap::iterator AddEntry(const String &title, ICON_ID icon_id, Entry *entry)
Definition:
startmenu.cpp:1068
StartMenu::ResizeButtons
void ResizeButtons(int cx)
Definition:
startmenu.cpp:1019
StartMenu::_submenu
WindowHandle _submenu
Definition:
startmenu.h:235
StartMenu::_scroll_mode
enum StartMenu::SCROLL_MODE _scroll_mode
StartMenu::GetButtonRect
bool GetButtonRect(int id, PRECT prect) const
Definition:
startmenu.cpp:781
StartMenu::SCROLL_MODE
SCROLL_MODE
Definition:
startmenu.h:245
StartMenu::SCROLL_NOT
@ SCROLL_NOT
Definition:
startmenu.h:245
StartMenu::SCROLL_DOWN
@ SCROLL_DOWN
Definition:
startmenu.h:245
StartMenu::SCROLL_UP
@ SCROLL_UP
Definition:
startmenu.h:245
StartMenu::CloseStartMenu
virtual void CloseStartMenu(int id=0)
close all windows of the start menu popup
Definition:
startmenu.cpp:1361
StartMenu::AddSeparator
void AddSeparator()
Definition:
startmenu.cpp:1173
StartMenu::_invisible_lines
int _invisible_lines
Definition:
startmenu.h:247
StartMenu::_create_info
StartMenuCreateInfo _create_info
Definition:
startmenu.h:249
StartMenu::_last_pos
POINT _last_pos
Definition:
startmenu.h:244
StartMenu::AddShellEntries
void AddShellEntries(const ShellDirectory &dir, int max=-1, const String &ignore="")
Definition:
startmenu.cpp:243
StartMenu::_scroll_pos
int _scroll_pos
Definition:
startmenu.h:246
StartMenu::Paint
void Paint(PaintCanvas &canvas)
Definition:
startmenu.cpp:870
StartMenu::AddButton
void AddButton(LPCTSTR title, ICON_ID icon_id=ICID_NONE, bool hasSubmenu=false, int id=-1, bool enabled=true)
Definition:
startmenu.cpp:1137
StartMenu::_arrow_btns
bool _arrow_btns
Definition:
startmenu.h:242
StartMenu::_icon_size
int _icon_size
Definition:
startmenu.h:251
StartMenu::DrawArrows
void DrawArrows(HDC hdc, int icon_size)
Definition:
startmenu.cpp:835
StartMenu::GetArrowButtonRects
void GetArrowButtonRects(LPRECT prect_up, LPRECT prect_down, int icon_size)
Definition:
startmenu.cpp:849
StartMenu::_border_top
int _border_top
Definition:
startmenu.h:238
StartMenu::GetFloatingButtonRect
void GetFloatingButtonRect(LPRECT prect)
Definition:
startmenu.cpp:825
StartMenu::DrawFloatingButton
void DrawFloatingButton(HDC hdc)
Definition:
startmenu.cpp:816
StartMenu::ActivateEntry
void ActivateEntry(int id, const ShellEntrySet &entries)
Definition:
startmenu.cpp:1292
StartMenu::_entries
ShellEntryMap _entries
Definition:
startmenu.h:231
StartMenu::_border_left
int _border_left
Definition:
startmenu.h:237
StartMenu::_floating_btn
bool _floating_btn
Definition:
startmenu.h:241
StartMenu::CloseSubmenus
bool CloseSubmenus()
Definition:
startmenu.h:286
StartMenu::GetWndClasss
static BtnWindowClass & GetWndClasss()
Definition:
startmenu.cpp:108
StartMenu::AddEntries
virtual void AddEntries()
Definition:
startmenu.cpp:209
StartMenu::s_def_creator
static CREATORFUNC_INFO s_def_creator
Definition:
startmenu.h:218
StartMenu::_submenu_id
int _submenu_id
Definition:
startmenu.h:234
StartMenu::UpdateIcons
void UpdateIcons()
Static
Definition:
window.h:585
Window::CREATORFUNC_INFO
Window *(* CREATORFUNC_INFO)(HWND, const void *)
Definition:
window.h:67
_SIZE
Definition:
kdterminal.h:26
code
Definition:
inflate.c:139
folder
Definition:
fci.c:116
info
Definition:
notification.c:61
tagCREATESTRUCTA
Definition:
winuser.h:2942
tagDRAWITEMSTRUCT
Definition:
winuser.h:3087
tagPOINT
Definition:
polytest.cpp:47
tagRECT
Definition:
windef.h:305
vector
Definition:
dbghelp_private.h:65
max
#define max(a, b)
Definition:
svc.c:63
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
WINAPI
#define WINAPI
Definition:
msvc.h:6
SetWindowFont
#define SetWindowFont(hwnd, hfont, fRedraw)
Definition:
windowsx.h:533
GetStockFont
#define GetStockFont(i)
Definition:
windowsx.h:308
DEFAULT_GUI_FONT
#define DEFAULT_GUI_FONT
Definition:
wingdi.h:909
SS_ETCHEDHORZ
#define SS_ETCHEDHORZ
Definition:
winuser.h:343
LPCSTR
const char * LPCSTR
Definition:
xmlstorage.h:183
LPCTSTR
const CHAR * LPCTSTR
Definition:
xmlstorage.h:193
LPCWSTR
const WCHAR * LPCWSTR
Definition:
xmlstorage.h:185
modules
rosapps
applications
explorer-old
taskbar
startmenu.h
Generated on Fri Sep 13 2024 06:06:03 for ReactOS by
1.9.6