ReactOS 0.4.15-dev-6703-g6528ab8
gui.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Applications Manager
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: GUI classes for RAPPS
5 * COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com)
6 * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
7 * Copyright 2020 He Yang (1160386205@qq.com)
8 */
9
10#include "rapps.h"
11#include "rosui.h"
12#include "crichedit.h"
13#include "asyncinet.h"
14#include "gui.h"
15#include <shlobj_undoc.h>
16#include <shlguid_undoc.h>
17
18#include <atlbase.h>
19#include <atlcom.h>
20#include <atltypes.h>
21#include <atlwin.h>
22#include <wininet.h>
23#include <shellutils.h>
24#include <ui/rosctrls.h>
25#include <gdiplus.h>
26#include <math.h>
27
28#define SEARCH_TIMER_ID 'SR'
29#define TREEVIEW_ICON_SIZE 24
30
31// **** CSideTreeView ****
32
34 : CUiWindow(),
36{
37}
38
41{
42 return CUiWindow<CTreeView>::AddItem(hParent, const_cast<LPWSTR>(Text.GetString()), Image, SelectedImage, lParam);
43}
44
47{
48 CStringW szText;
49 INT Index = 0;
51
54 if (hIcon)
55 {
58 }
59
60 szText.LoadStringW(TextIndex);
61 return AddItem(hRootItem, szText, Index, Index, TextIndex);
62}
63
66{
68}
69
70VOID
72{
75}
76
78{
80}
81// **** CSideTreeView ****
82
83// **** CMainWindow ****
84
85CMainWindow::CMainWindow(CAppDB *db, BOOL bAppwiz) : m_ClientPanel(NULL), m_Db(db), bAppwizMode(bAppwiz), SelectedEnumType(ENUM_ALL_INSTALLED)
86{
87}
88
90{
92}
93
94VOID
96{
97 HTREEITEM hRootItemAvailable;
98
102
104
106 m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_AUDIO, IDI_CAT_AUDIO);
107 m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_VIDEO, IDI_CAT_VIDEO);
109 m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_GAMES, IDI_CAT_GAMES);
112 m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_DEVEL, IDI_CAT_DEVEL);
113 m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_EDU, IDI_CAT_EDU);
117 m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_TOOLS, IDI_CAT_TOOLS);
119 m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_LIBS, IDI_CAT_LIBS);
121 m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_OTHER, IDI_CAT_OTHER);
122
125 m_TreeView->Expand(hRootItemAvailable, TVE_EXPAND);
126 m_TreeView->SelectItem(bAppwizMode ? hRootItemInstalled : hRootItemAvailable);
127}
128
129BOOL
131{
136
138}
139
140BOOL
142{
147
148 return m_TreeView->Create(m_hWnd) != NULL;
149}
150
151BOOL
153{
154 m_ApplicationView = new CApplicationView(this); // pass this to ApplicationView for callback purpose
158
160}
161
162BOOL
164{
171
172 // TODO: m_MinSecond should be calculate dynamically instead of hard-coded
174 m_VSplitter->m_Pos = 240;
176
177 return m_VSplitter->Create(m_hWnd) != NULL;
178}
179
180BOOL
182{
183 BOOL b = TRUE;
184 bUpdating = TRUE;
185
186 m_ClientPanel = new CUiPanel();
189
190 // Top level
191 b = b && CreateStatusBar();
192 b = b && CreateVSplitter();
193
194 // Inside V Splitter
195 b = b && CreateTreeView();
197
198 if (b)
199 {
200 RECT rBottom;
201
202 /* Size status bar */
203 m_StatusBar->SendMessageW(WM_SIZE, 0, 0);
204
205 ::GetWindowRect(m_StatusBar->m_hWnd, &rBottom);
206
207 m_VSplitter->m_Margin.bottom = rBottom.bottom - rBottom.top;
208 }
209
211 return b;
212}
213
214VOID
216{
217 delete m_TreeView;
218 delete m_ApplicationView;
219 delete m_VSplitter;
220 delete m_StatusBar;
221 return;
222}
223
224BOOL
226{
227 if (CreateLayout())
228 {
231
232 return TRUE;
233 }
234
235 return FALSE;
236}
237
238VOID
240{
241 if (wParam == SIZE_MINIMIZED)
242 return;
243
244 /* Size status bar */
245 m_StatusBar->SendMessage(WM_SIZE, 0, 0);
246
247 RECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
248 HDWP hdwp = NULL;
250
252 if (hdwp)
253 {
254 hdwp = m_ClientPanel->OnParentSize(r, hdwp);
255 if (hdwp)
256 {
257 EndDeferWindowPos(hdwp);
258 }
259 }
260}
261
262BOOL
264{
266 return FALSE;
267
268 CStringW szMsgText, szMsgTitle;
269
270 if (!szMsgText.LoadStringW(IDS_APP_REG_REMOVE) || !szMsgTitle.LoadStringW(IDS_INFORMATION))
271 return FALSE;
272
273 if (MessageBoxW(szMsgText, szMsgTitle, MB_YESNO | MB_ICONQUESTION) == IDYES)
274 {
276 if (!InstalledApp)
277 return FALSE;
278
279 return m_Db->RemoveInstalledAppFromRegistry(InstalledApp);
280 }
281
282 return FALSE;
283}
284
285BOOL
287{
289 return FALSE;
290
292 if (!InstalledApp)
293 return FALSE;
294
295 return InstalledApp->UninstallApplication(bModify);
296}
297
298BOOL
300{
301 theResult = 0;
302 switch (Msg)
303 {
304 case WM_CREATE:
305 if (!InitControls())
307 break;
308
309 case WM_DESTROY:
310 {
313
314 FreeLogs();
315
316 delete m_ClientPanel;
317
319 return 0;
320 }
321
322 case WM_COMMAND:
324 break;
325
326 case WM_NOTIFY:
327 {
329
330 switch (data->code)
331 {
332 case TVN_SELCHANGED:
333 {
334 if (data->hwndFrom == m_TreeView->m_hWnd)
335 {
336 switch (((LPNMTREEVIEW)lParam)->itemNew.lParam)
337 {
338 case IDS_INSTALLED:
340 break;
341
342 case IDS_APPLICATIONS:
344 break;
345
346 case IDS_UPDATES:
348 break;
349
352 break;
353
354 case IDS_CAT_AUDIO:
356 break;
357
358 case IDS_CAT_DEVEL:
360 break;
361
362 case IDS_CAT_DRIVERS:
364 break;
365
366 case IDS_CAT_EDU:
368 break;
369
370 case IDS_CAT_ENGINEER:
372 break;
373
374 case IDS_CAT_FINANCE:
376 break;
377
378 case IDS_CAT_GAMES:
380 break;
381
382 case IDS_CAT_GRAPHICS:
384 break;
385
386 case IDS_CAT_INTERNET:
388 break;
389
390 case IDS_CAT_LIBS:
392 break;
393
394 case IDS_CAT_OFFICE:
396 break;
397
398 case IDS_CAT_OTHER:
400 break;
401
402 case IDS_CAT_SCIENCE:
404 break;
405
406 case IDS_CAT_TOOLS:
408 break;
409
410 case IDS_CAT_VIDEO:
412 break;
413
414 case IDS_CAT_THEMES:
416 break;
417
420 break;
421 }
422 }
423 }
424 break;
425 }
426 }
427 break;
428
429 case WM_SIZE:
431 break;
432
433 case WM_SIZING:
434 {
435 LPRECT pRect = (LPRECT)lParam;
436
437 if (pRect->right - pRect->left < 565)
438 pRect->right = pRect->left + 565;
439
440 if (pRect->bottom - pRect->top < 300)
441 pRect->bottom = pRect->top + 300;
442
443 return TRUE;
444 }
445
447 {
448 /* Forward WM_SYSCOLORCHANGE to common controls */
450 m_TreeView->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
451 }
452 break;
453
454 case WM_TIMER:
455 if (wParam == SEARCH_TIMER_ID)
456 {
458
460 }
461 break;
462 }
463
464 return FALSE;
465}
466
467VOID
469{
470 CStringW szApp;
471 CStringW szAuthors;
472
473 szApp.LoadStringW(IDS_APPTITLE);
474 szAuthors.LoadStringW(IDS_APP_AUTHORS);
475 ShellAboutW(m_hWnd, szApp, szAuthors,
477}
478
479VOID
481{
482 const BOOL bReload = TRUE;
483 WORD wCommand = LOWORD(wParam);
484
485 if (!lParam)
486 {
487 switch (wCommand)
488 {
489 case ID_SETTINGS:
491 break;
492
493 case ID_EXIT:
494 PostMessageW(WM_CLOSE, 0, 0);
495 break;
496
497 case ID_SEARCH:
499 break;
500
501 case ID_INSTALL:
503 {
504 if (!m_Selected.IsEmpty())
505 {
507 {
510 }
511 }
512 else
513 {
515 if (App)
516 {
518 }
519 }
520 }
521 break;
522
523 case ID_UNINSTALL:
526 break;
527
528 case ID_MODIFY:
531 break;
532
533 case ID_REGREMOVE:
536 break;
537
538 case ID_REFRESH:
540 break;
541
542 case ID_RESETDB:
545 break;
546
547 case ID_HELP:
548 MessageBoxW(L"Help not implemented yet", NULL, MB_OK);
549 break;
550
551 case ID_ABOUT:
552 ShowAboutDlg();
553 break;
554
555 case ID_CHECK_ALL:
557 break;
558
562 break;
563 }
564 }
565}
566
567VOID
569{
570 if (m_StatusBar)
571 {
572 CStringW szBuffer;
573
575 m_StatusBar->SetText(szBuffer);
576 }
577}
578
579VOID
581{
582 POSITION CurrentListPosition = List.GetHeadPosition();
583 while (CurrentListPosition)
584 {
585 CAppInfo *Info = List.GetNext(CurrentListPosition);
588 {
589 BOOL bSelected = m_Selected.Find(Info) != NULL;
591 }
592 }
593}
594
595VOID
597{
598 bUpdating = TRUE;
599
600 if (SelectedEnumType != EnumType)
601 SelectedEnumType = EnumType;
602
603 if (bReload)
605
607 if (IsInstalledEnum(EnumType))
608 {
609 if (bReload)
611
612 // set the display type of application-view. this will remove all the item in application-view too.
614
616 m_Db->GetApps(List, EnumType);
618 }
619 else if (IsAvailableEnum(EnumType))
620 {
621 if (bReload)
623
624 // set the display type of application-view. this will remove all the item in application-view too.
626
627 // enum available softwares
628 if (EnumType == ENUM_CAT_SELECTED)
629 {
631 }
632 else
633 {
635 m_Db->GetApps(List, EnumType);
637 }
638 }
639 else
640 {
641 ATLASSERT(0 && "This should be unreachable!");
642 }
644 m_ApplicationView->RedrawWindow(0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN); // force the child window to repaint
646
649 {
650 text.LoadString(IDS_NO_SEARCH_RESULTS);
651 }
653
655}
656
659{
660 DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
661 static ATL::CWndClassInfo wc = {
662 {sizeof(WNDCLASSEX), csStyle, StartWindowProc, 0, 0, NULL,
663 LoadIconW(_AtlBaseModule.GetModuleInstance(), MAKEINTRESOURCEW(IDI_MAIN)), LoadCursorW(NULL, IDC_ARROW),
665 NULL,
666 NULL,
667 IDC_ARROW,
668 TRUE,
669 0,
670 _T("")};
671 return wc;
672}
673
674HWND
676{
677 CStringW szWindowName;
678 szWindowName.LoadStringW(IDS_APPTITLE);
679
680 RECT r = {
684 r.right += r.left;
685 r.bottom += r.top;
686
687 return CWindowImpl::Create(
689}
690
691// this function is called when a item of application-view is checked/unchecked
692// CallbackParam is the param passed to application-view when adding the item (the one getting focus now).
693VOID
695{
696 if (bUpdating)
697 return;
698
699 CAppInfo *Info = (CAppInfo *)CallbackParam;
700
701 if (bChecked)
702 {
704 }
705 else
706 {
708 ATLASSERT(Pos != NULL);
709
710 if (Pos != NULL)
711 {
713 }
714 }
715
717}
718
719// this function is called when one or more application(s) should be installed
720// if Info is not zero, this app should be installed. otherwise those checked apps should be installed
721BOOL
723{
724 if (Info)
725 {
727 {
729 return TRUE;
730 }
731 }
732
733 return FALSE;
734}
735
736BOOL
738{
739 if (szSearchPattern == SearchText)
740 {
741 return FALSE;
742 }
743
744 szSearchPattern = SearchText;
745
746 DWORD dwDelay = 0;
747 SystemParametersInfoW(SPI_GETMENUSHOWDELAY, 0, &dwDelay, 0);
748 SetTimer(SEARCH_TIMER_ID, dwDelay);
749
750 return TRUE;
751}
752
753void
755{
756 ATL::CSimpleArray<HWND> TabOrderHwndList;
757
758 m_TreeView->AppendTabOrderWindow(direction, TabOrderHwndList);
759 m_ApplicationView->AppendTabOrderWindow(direction, TabOrderHwndList);
760
761 if (TabOrderHwndList.GetSize() == 0)
762 {
763 // in case the list is empty
764 return;
765 }
766
767 int FocusIndex;
768
769 if ((FocusIndex = TabOrderHwndList.Find(GetFocus())) == -1)
770 {
771 FocusIndex = 0; // focus the first window in the list
772 }
773 else
774 {
775 FocusIndex += direction;
776 FocusIndex +=
777 TabOrderHwndList.GetSize(); // FocusIndex might be negative. we don't want to mod a negative number
778 FocusIndex %= TabOrderHwndList.GetSize();
779 }
780
781 ::SetFocus(TabOrderHwndList[FocusIndex]);
782 return;
783}
784// **** CMainWindow ****
785
786VOID
788{
789 HACCEL KeyBrd;
790 MSG Msg;
791
792 hMainWnd = wnd->Create();
793 if (!hMainWnd)
794 return;
795
796 /* Maximize it if we must */
798 wnd->UpdateWindow();
799
800 /* Load the menu hotkeys */
802
803 /* Message Loop */
804 while (GetMessageW(&Msg, NULL, 0, 0))
805 {
806 if (!TranslateAcceleratorW(hMainWnd, KeyBrd, &Msg))
807 {
808 if (Msg.message == WM_CHAR && Msg.wParam == VK_TAB)
809 {
810 // Move backwards if shift is held down
811 int direction = (GetKeyState(VK_SHIFT) & 0x8000) ? -1 : 1;
812
813 wnd->HandleTabOrder(direction);
814 continue;
815 }
816
819 }
820 }
821}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
BOOL IsAvailableEnum(INT x)
Definition: appinfo.h:55
BOOL IsInstalledEnum(INT x)
Definition: appinfo.h:61
AppsCategories
Definition: appinfo.h:25
@ ENUM_CAT_LIBS
Definition: appinfo.h:40
@ ENUM_CAT_ENGINEER
Definition: appinfo.h:35
@ ENUM_CAT_VIDEO
Definition: appinfo.h:28
@ ENUM_CAT_FINANCE
Definition: appinfo.h:36
@ ENUM_CAT_OFFICE
Definition: appinfo.h:32
@ ENUM_CAT_EDU
Definition: appinfo.h:34
@ ENUM_CAT_AUDIO
Definition: appinfo.h:27
@ ENUM_CAT_TOOLS
Definition: appinfo.h:38
@ ENUM_UPDATES
Definition: appinfo.h:46
@ ENUM_CAT_SELECTED
Definition: appinfo.h:43
@ ENUM_ALL_AVAILABLE
Definition: appinfo.h:26
@ ENUM_CAT_INTERNET
Definition: appinfo.h:31
@ ENUM_CAT_GAMES
Definition: appinfo.h:30
@ ENUM_CAT_THEMES
Definition: appinfo.h:41
@ ENUM_INSTALLED_APPLICATIONS
Definition: appinfo.h:45
@ ENUM_CAT_GRAPHICS
Definition: appinfo.h:29
@ ENUM_CAT_DEVEL
Definition: appinfo.h:33
@ ENUM_CAT_DRIVERS
Definition: appinfo.h:39
@ ENUM_ALL_INSTALLED
Definition: appinfo.h:44
@ ENUM_CAT_SCIENCE
Definition: appinfo.h:37
@ ENUM_CAT_OTHER
Definition: appinfo.h:42
@ AppViewTypeInstalledApps
Definition: appview.h:72
@ AppViewTypeAvailableApps
Definition: appview.h:71
void SaveSettings(void)
Definition: settings.c:115
#define ID_EXIT
Definition: resource.h:10
#define IDI_MAIN
Definition: resource.h:4
#define IDS_APPTITLE
Definition: resource.h:3
#define IDR_MAINMENU
Definition: resource.h:40
#define ID_HELP
Definition: resource.h:26
#define IDC_STATUSBAR
Definition: resource.h:12
#define ID_REFRESH
Definition: resource.h:16
#define SEARCH_TIMER_ID
Definition: gui.h:21
#define TREEVIEW_ICON_SIZE
Definition: gui.h:22
VOID FreeLogs()
Definition: misc.cpp:218
INT GetSystemColorDepth()
Definition: misc.cpp:321
BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle)
Definition: misc.cpp:372
#define IDS_UPDATES
Definition: resource.h:100
#define IDS_CAT_TOOLS
Definition: resource.h:189
#define ID_REGREMOVE
Definition: resource.h:83
#define IDI_CAT_FINANCE
Definition: resource.h:25
#define IDS_CAT_VIDEO
Definition: resource.h:190
#define IDS_SELECTEDFORINST
Definition: resource.h:117
#define ID_UNINSTALL
Definition: resource.h:75
#define ID_SEARCH
Definition: resource.h:86
#define IDS_CAT_GRAPHICS
Definition: resource.h:183
#define IDI_SELECTEDFORINST
Definition: resource.h:16
#define IDI_CAT_EDU
Definition: resource.h:23
#define IDS_AVAILABLEFORINST
Definition: resource.h:99
#define IDI_CAT_INTERNET
Definition: resource.h:28
#define IDI_CAT_LIBS
Definition: resource.h:29
#define IDS_CAT_AUDIO
Definition: resource.h:176
#define IDS_INFORMATION
Definition: resource.h:106
#define IDS_APPS_COUNT
Definition: resource.h:94
#define IDS_CAT_SCIENCE
Definition: resource.h:188
#define IDS_CAT_ENGINEER
Definition: resource.h:180
#define IDI_CATEGORY
Definition: resource.h:13
#define IDI_CAT_OFFICE
Definition: resource.h:30
#define IDS_CAT_LIBS
Definition: resource.h:185
#define IDS_CAT_OTHER
Definition: resource.h:187
#define IDI_CAT_GRAPHICS
Definition: resource.h:27
#define ID_CHECK_ALL
Definition: resource.h:85
#define IDS_CAT_DEVEL
Definition: resource.h:177
#define IDI_APPS
Definition: resource.h:11
#define IDS_CAT_THEMES
Definition: resource.h:191
#define IDS_APP_AUTHORS
Definition: resource.h:120
#define IDI_CAT_SCIENCE
Definition: resource.h:32
#define IDI_CAT_OTHER
Definition: resource.h:31
#define IDS_CAT_GAMES
Definition: resource.h:182
#define ID_ACTIVATE_APPWIZ
Definition: resource.h:89
#define IDS_CAT_EDU
Definition: resource.h:179
#define ID_MODIFY
Definition: resource.h:78
#define IDS_CAT_INTERNET
Definition: resource.h:184
#define IDS_NO_SEARCH_RESULTS
Definition: resource.h:124
#define IDI_APPUPD
Definition: resource.h:12
#define IDI_CAT_VIDEO
Definition: resource.h:34
#define ID_RESETDB
Definition: resource.h:84
#define IDS_CAT_DRIVERS
Definition: resource.h:178
#define IDI_CAT_DRIVERS
Definition: resource.h:22
#define HOTKEYS
Definition: resource.h:232
#define IDI_CAT_DEVEL
Definition: resource.h:21
#define IDS_CAT_OFFICE
Definition: resource.h:186
#define IDS_CAT_FINANCE
Definition: resource.h:181
#define IDI_CAT_THEMES
Definition: resource.h:35
#define IDS_APP_REG_REMOVE
Definition: resource.h:105
#define IDI_CAT_GAMES
Definition: resource.h:26
#define IDS_APPLICATIONS
Definition: resource.h:101
#define IDI_CAT_ENGINEER
Definition: resource.h:24
#define IDS_INSTALLED
Definition: resource.h:98
#define IDI_CAT_TOOLS
Definition: resource.h:33
#define IDI_CAT_AUDIO
Definition: resource.h:20
#define ID_INSTALL
Definition: resource.h:74
#define ID_SETTINGS
Definition: resource.h:81
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:20
#define ID_ABOUT
Definition: charmap.c:17
bool IsEmpty() const
Definition: atlcoll.h:545
POSITION AddTail(INARGTYPE element)
Definition: atlcoll.h:626
void RemoveAll()
Definition: atlcoll.h:727
POSITION Find(INARGTYPE element, _In_opt_ POSITION posStartAfter=NULL) const
Definition: atlcoll.h:773
size_t GetCount() const
Definition: atlcoll.h:539
void RemoveAt(_In_ POSITION pos)
Definition: atlcoll.h:748
int GetSize() const
Definition: atlsimpcoll.h:104
int Find(const T &t) const
Definition: atlsimpcoll.h:82
bool IsEmpty() const
Definition: atlsimpstr.h:389
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:818
static LRESULT CALLBACK StartWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1619
HWND Create(HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: atlwin.h:1734
HWND SetFocus()
Definition: atlwin.h:1198
BOOL UpdateWindow()
Definition: atlwin.h:1345
HWND m_hWnd
Definition: atlwin.h:273
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1333
Definition: appdb.h:9
VOID UpdateAvailable()
Definition: appdb.cpp:121
VOID UpdateInstalled()
Definition: appdb.cpp:145
VOID GetApps(CAtlList< CAppInfo * > &List, AppsCategories Type) const
Definition: appdb.cpp:53
BOOL RemoveInstalledAppFromRegistry(const CAppInfo *Info)
Definition: appdb.cpp:266
VOID RemoveCached()
Definition: appdb.cpp:242
virtual BOOL UninstallApplication(BOOL bModify)=0
PVOID GetFocusedItemData()
Definition: appview.cpp:1874
HWND Create(HWND hwndParent)
Definition: appview.cpp:1808
BOOL AddApplication(CAppInfo *InstAppInfo, BOOL InitialCheckState)
Definition: appview.cpp:1856
BOOL SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
Definition: appview.cpp:1818
void SetFocusOnSearchBar()
Definition: appview.cpp:1612
void SetRedraw(BOOL bRedraw)
Definition: appview.cpp:1605
VOID AppendTabOrderWindow(int Direction, ATL::CSimpleArray< HWND > &TabOrderList)
Definition: appview.cpp:1886
VOID SetWatermark(const CStringW &Text)
Definition: appview.cpp:1862
BOOL RemoveSelectedAppFromRegistry()
Definition: gui.cpp:263
AppsCategories SelectedEnumType
Definition: gui.h:64
HTREEITEM hRootItemInstalled
Definition: gui.h:61
VOID UpdateStatusBarText()
Definition: gui.cpp:568
BOOL CreateLayout()
Definition: gui.cpp:181
BOOL CreateTreeView()
Definition: gui.cpp:141
CSideTreeView * m_TreeView
Definition: gui.h:51
CStringW szSearchPattern
Definition: gui.h:63
CUiSplitPanel * m_VSplitter
Definition: gui.h:49
VOID AddApplicationsToView(CAtlList< CAppInfo * > &List)
Definition: gui.cpp:580
BOOL CreateVSplitter()
Definition: gui.cpp:163
BOOL SearchTextChanged(CStringW &SearchText)
Definition: gui.cpp:737
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: winproc.cpp:518
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: gui.cpp:658
BOOL bAppwizMode
Definition: gui.h:60
BOOL bUpdating
Definition: gui.h:59
~CMainWindow()
Definition: gui.cpp:89
CMainWindow()
Definition: winproc.h:30
void HandleTabOrder(int direction)
Definition: gui.cpp:754
BOOL InstallApplication(CAppInfo *Info)
Definition: gui.cpp:722
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: winproc.cpp:589
CAtlList< CAppInfo * > m_Selected
Definition: gui.h:57
VOID ShowAboutDlg()
Definition: gui.cpp:468
BOOL InitControls()
Definition: gui.cpp:225
VOID InitCategoriesList()
Definition: gui.cpp:95
VOID UpdateApplicationsList(AppsCategories EnumType, BOOL bReload=FALSE)
Definition: gui.cpp:596
VOID ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam)
Definition: gui.cpp:694
CAppDB * m_Db
Definition: gui.h:56
CUiWindow< CStatusBar > * m_StatusBar
Definition: gui.h:52
HWND Create()
Definition: gui.cpp:675
BOOL ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: gui.cpp:299
CUiPanel * m_ClientPanel
Definition: gui.h:48
VOID LayoutCleanup()
Definition: gui.cpp:215
BOOL CreateStatusBar()
Definition: gui.cpp:130
BOOL UninstallSelectedApp(BOOL bModify)
Definition: gui.cpp:286
BOOL CreateApplicationView()
Definition: gui.cpp:152
CApplicationView * m_ApplicationView
Definition: gui.h:54
INT Append(T *ptr)
Definition: rosui.h:87
HIMAGELIST hImageTreeView
Definition: gui.h:26
CSideTreeView()
Definition: gui.cpp:33
HTREEITEM AddCategory(HTREEITEM hRootItem, UINT TextIndex, UINT IconIndex)
Definition: gui.cpp:46
HTREEITEM AddItem(HTREEITEM hParent, CStringW &Text, INT Image, INT SelectedImage, LPARAM lParam)
Definition: gui.cpp:40
~CSideTreeView()
Definition: gui.cpp:77
VOID DestroyImageList()
Definition: gui.cpp:71
HIMAGELIST SetImageList()
Definition: gui.cpp:65
VOID SetText(LPCWSTR lpszText)
Definition: rosctrls.h:457
HWND Create(HWND hwndParent, HMENU hMenu)
Definition: rosctrls.h:462
BOOL Expand(HTREEITEM item, DWORD action)
Definition: rosctrls.h:599
HWND Create(HWND hwndParent)
Definition: rosctrls.h:483
BOOL SelectItem(HTREEITEM item, DWORD action=TVGN_CARET)
Definition: rosctrls.h:604
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:257
CUiAlignment m_VerticalAlignment
Definition: rosui.h:258
CUiMargin m_Margin
Definition: rosui.h:255
CUiCollection & Children()
Definition: rosui.h:384
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:439
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:454
INT m_Pos
Definition: rosui.h:584
BOOL m_Horizontal
Definition: rosui.h:585
CUiCollection & First()
Definition: rosui.h:618
BOOL m_DynamicFirst
Definition: rosui.h:586
CUiCollection & Second()
Definition: rosui.h:623
INT m_MinSecond
Definition: rosui.h:588
HWND Create(HWND hwndParent)
Definition: rosui.h:867
INT m_MinFirst
Definition: rosui.h:587
virtual VOID AppendTabOrderWindow(int Direction, ATL::CSimpleArray< HWND > &TabOrderList)
Definition: rosui.h:546
struct @1611 Msg[]
WPARAM wParam
Definition: combotst.c:138
char * Text
Definition: combotst.c:136
LPARAM lParam
Definition: combotst.c:139
ush Pos
Definition: deflate.h:92
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
const WCHAR * text
Definition: package.c:1799
static const WCHAR IconIndex[]
Definition: install.c:52
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
VOID MainWindowLoop(CMainWindow *wnd, INT nShowCmd)
Definition: gui.cpp:787
#define TREEVIEW_ICON_SIZE
Definition: gui.cpp:29
#define b
Definition: ke_i.h:79
HWND hMainWnd
Definition: magnifier.c:32
const TCHAR szWindowClass[]
Definition: magnifier.c:28
static HICON
Definition: imagelist.c:84
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define TVN_SELCHANGED
Definition: commctrl.h:3735
#define TVSIL_NORMAL
Definition: commctrl.h:3443
#define LPNMTREEVIEW
Definition: commctrl.h:3643
#define TVE_EXPAND
Definition: commctrl.h:3423
#define TVI_ROOT
Definition: commctrl.h:3368
#define ImageList_AddIcon(himl, hicon)
Definition: commctrl.h:415
#define ILC_MASK
Definition: commctrl.h:351
BOOL DownloadApplication(CAppInfo *pAppInfo)
Definition: loaddlg.cpp:1079
VOID CreateSettingsDlg(HWND hwnd)
BOOL DownloadListOfApplications(const CAtlList< CAppInfo * > &AppsList, BOOL bIsModal)
Definition: loaddlg.cpp:1060
#define WM_NOTIFY
Definition: richedit.h:61
@ UiAlign_Stretch
Definition: rosui.h:249
@ UiAlign_RightBtm
Definition: rosui.h:248
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
BOOL Maximized
Definition: settings.h:13
BOOL bSaveWndPos
Definition: settings.h:7
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
#define AddItem
Definition: userenv.h:209
#define _T(x)
Definition: vfdio.h:22
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
#define LPRECT
Definition: precomp.h:28
_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
HWND WINAPI GetFocus(void)
Definition: window.c:1894
#define CS_VREDRAW
Definition: winuser.h:653
#define SW_HIDE
Definition: winuser.h:762
#define WM_CLOSE
Definition: winuser.h:1611
#define VK_TAB
Definition: winuser.h:2189
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IMAGE_ICON
Definition: winuser.h:212
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WM_CREATE
Definition: winuser.h:1598
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SIZE
Definition: winuser.h:1601
#define LR_CREATEDIBSECTION
Definition: winuser.h:1092
#define WM_COMMAND
Definition: winuser.h:1730
#define CS_HREDRAW
Definition: winuser.h:648
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2172
#define IDC_ARROW
Definition: winuser.h:682
#define SIZE_MINIMIZED
Definition: winuser.h:2496
#define MB_YESNO
Definition: winuser.h:811
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1616
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define RDW_ALLCHILDREN
Definition: winuser.h:1211
#define WM_TIMER
Definition: winuser.h:1732
struct tagNMHDR * LPNMHDR
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5709
#define MB_OK
Definition: winuser.h:784
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
#define WM_CHAR
Definition: winuser.h:1707
#define CW_USEDEFAULT
Definition: winuser.h:225
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define WM_SIZING
Definition: winuser.h:1797
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define MB_ICONQUESTION
Definition: winuser.h:783
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
#define VK_SHIFT
Definition: winuser.h:2192
#define WM_DESTROY
Definition: winuser.h:1599
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define IDYES
Definition: winuser.h:829
#define SW_MAXIMIZE
Definition: winuser.h:766
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define MAKEINTRESOURCE
Definition: winuser.h:591
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2044
#define RDW_INVALIDATE
Definition: winuser.h:1204
SHORT WINAPI GetKeyState(_In_ int)
#define COLOR_BTNFACE
Definition: winuser.h:922
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
WCHAR * LPWSTR
Definition: xmlstorage.h:184