ReactOS 0.4.15-dev-7906-g1b85a5f
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
274 if (!InstalledApp)
275 return FALSE;
276
277 if (MessageBoxW(szMsgText, szMsgTitle, MB_YESNO | MB_ICONQUESTION) == IDYES)
278 return m_Db->RemoveInstalledAppFromRegistry(InstalledApp);
279
280 return FALSE;
281}
282
283BOOL
285{
287 return FALSE;
288
290 if (!InstalledApp)
291 return FALSE;
292
293 return InstalledApp->UninstallApplication(bModify);
294}
295
296VOID
298{
299 if (m_Db->GetAvailableCount() == 0)
300 {
303 }
304}
305
306BOOL
308{
309 theResult = 0;
310 switch (Msg)
311 {
312 case WM_CREATE:
313 if (!InitControls())
315 break;
316
317 case WM_DESTROY:
318 {
321
322 FreeLogs();
323
324 delete m_ClientPanel;
325
327 return 0;
328 }
329
330 case WM_COMMAND:
332 break;
333
334 case WM_NOTIFY:
335 {
337
338 switch (data->code)
339 {
340 case TVN_SELCHANGED:
341 {
342 if (data->hwndFrom == m_TreeView->m_hWnd)
343 {
344 switch (((LPNMTREEVIEW)lParam)->itemNew.lParam)
345 {
346 case IDS_INSTALLED:
348 break;
349
350 case IDS_APPLICATIONS:
352 break;
353
354 case IDS_UPDATES:
356 break;
357
360 break;
361
362 case IDS_CAT_AUDIO:
364 break;
365
366 case IDS_CAT_DEVEL:
368 break;
369
370 case IDS_CAT_DRIVERS:
372 break;
373
374 case IDS_CAT_EDU:
376 break;
377
378 case IDS_CAT_ENGINEER:
380 break;
381
382 case IDS_CAT_FINANCE:
384 break;
385
386 case IDS_CAT_GAMES:
388 break;
389
390 case IDS_CAT_GRAPHICS:
392 break;
393
394 case IDS_CAT_INTERNET:
396 break;
397
398 case IDS_CAT_LIBS:
400 break;
401
402 case IDS_CAT_OFFICE:
404 break;
405
406 case IDS_CAT_OTHER:
408 break;
409
410 case IDS_CAT_SCIENCE:
412 break;
413
414 case IDS_CAT_TOOLS:
416 break;
417
418 case IDS_CAT_VIDEO:
420 break;
421
422 case IDS_CAT_THEMES:
424 break;
425
428 break;
429 }
430 }
431 }
432 break;
433 }
434 }
435 break;
436
437 case WM_SIZE:
439 break;
440
441 case WM_SIZING:
442 {
443 LPRECT pRect = (LPRECT)lParam;
444
445 if (pRect->right - pRect->left < 565)
446 pRect->right = pRect->left + 565;
447
448 if (pRect->bottom - pRect->top < 300)
449 pRect->bottom = pRect->top + 300;
450
451 return TRUE;
452 }
453
455 {
456 /* Forward WM_SYSCOLORCHANGE to common controls */
458 m_TreeView->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
459 }
460 break;
461
462 case WM_TIMER:
463 if (wParam == SEARCH_TIMER_ID)
464 {
466
468 }
469 break;
470 }
471
472 return FALSE;
473}
474
475VOID
477{
478 CStringW szApp;
479 CStringW szAuthors;
480
481 szApp.LoadStringW(IDS_APPTITLE);
482 szAuthors.LoadStringW(IDS_APP_AUTHORS);
483 ShellAboutW(m_hWnd, szApp, szAuthors,
485}
486
487VOID
489{
490 const BOOL bReload = TRUE;
491 WORD wCommand = LOWORD(wParam);
492
493 if (!lParam)
494 {
495 switch (wCommand)
496 {
497 case ID_SETTINGS:
499 break;
500
501 case ID_EXIT:
502 PostMessageW(WM_CLOSE, 0, 0);
503 break;
504
505 case ID_SEARCH:
507 break;
508
509 case ID_INSTALL:
511 {
512 if (!m_Selected.IsEmpty())
513 {
515 {
518 }
519 }
520 else
521 {
523 if (App)
524 {
526 }
527 }
528 }
529 break;
530
531 case ID_UNINSTALL:
534 break;
535
536 case ID_MODIFY:
539 break;
540
541 case ID_REGREMOVE:
544 break;
545
546 case ID_REFRESH:
548 break;
549
550 case ID_RESETDB:
553 break;
554
555 case ID_HELP:
556 MessageBoxW(L"Help not implemented yet", NULL, MB_OK);
557 break;
558
559 case ID_ABOUT:
560 ShowAboutDlg();
561 break;
562
563 case ID_CHECK_ALL:
565 break;
566
570 break;
571 }
572 }
573}
574
575VOID
577{
578 if (m_StatusBar)
579 {
580 CStringW szBuffer;
581
583 m_StatusBar->SetText(szBuffer);
584 }
585}
586
587VOID
589{
590 POSITION CurrentListPosition = List.GetHeadPosition();
591 while (CurrentListPosition)
592 {
593 CAppInfo *Info = List.GetNext(CurrentListPosition);
596 {
597 BOOL bSelected = m_Selected.Find(Info) != NULL;
599 }
600 }
601}
602
603VOID
605{
606 bUpdating = TRUE;
607
608 if (bCheckAvailable)
610
611 if (SelectedEnumType != EnumType)
612 SelectedEnumType = EnumType;
613
614 if (bReload)
616
618 if (IsInstalledEnum(EnumType))
619 {
620 if (bReload)
622
623 // set the display type of application-view. this will remove all the item in application-view too.
625
627 m_Db->GetApps(List, EnumType);
629 }
630 else if (IsAvailableEnum(EnumType))
631 {
632 if (bReload)
634
635 // set the display type of application-view. this will remove all the item in application-view too.
637
638 // enum available softwares
639 if (EnumType == ENUM_CAT_SELECTED)
640 {
642 }
643 else
644 {
646 m_Db->GetApps(List, EnumType);
648 }
649 }
650 else
651 {
652 ATLASSERT(0 && "This should be unreachable!");
653 }
655 m_ApplicationView->RedrawWindow(0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN); // force the child window to repaint
657
660 {
661 text.LoadString(IDS_NO_SEARCH_RESULTS);
662 }
664
666}
667
670{
671 DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
672 static ATL::CWndClassInfo wc = {
673 {sizeof(WNDCLASSEX), csStyle, StartWindowProc, 0, 0, NULL,
674 LoadIconW(_AtlBaseModule.GetModuleInstance(), MAKEINTRESOURCEW(IDI_MAIN)), LoadCursorW(NULL, IDC_ARROW),
676 NULL,
677 NULL,
678 IDC_ARROW,
679 TRUE,
680 0,
681 _T("")};
682 return wc;
683}
684
685HWND
687{
688 CStringW szWindowName;
689 szWindowName.LoadStringW(IDS_APPTITLE);
690
691 RECT r = {
695 r.right += r.left;
696 r.bottom += r.top;
697
698 return CWindowImpl::Create(
700}
701
702// this function is called when a item of application-view is checked/unchecked
703// CallbackParam is the param passed to application-view when adding the item (the one getting focus now).
704VOID
706{
707 if (bUpdating)
708 return;
709
710 CAppInfo *Info = (CAppInfo *)CallbackParam;
711
712 if (bChecked)
713 {
715 }
716 else
717 {
719 ATLASSERT(Pos != NULL);
720
721 if (Pos != NULL)
722 {
724 }
725 }
726
728}
729
730// this function is called when one or more application(s) should be installed
731// if Info is not zero, this app should be installed. otherwise those checked apps should be installed
732BOOL
734{
735 if (Info)
736 {
738 {
740 return TRUE;
741 }
742 }
743
744 return FALSE;
745}
746
747BOOL
749{
750 if (szSearchPattern == SearchText)
751 {
752 return FALSE;
753 }
754
755 szSearchPattern = SearchText;
756
757 DWORD dwDelay = 0;
758 SystemParametersInfoW(SPI_GETMENUSHOWDELAY, 0, &dwDelay, 0);
759 SetTimer(SEARCH_TIMER_ID, dwDelay);
760
761 return TRUE;
762}
763
764void
766{
767 ATL::CSimpleArray<HWND> TabOrderHwndList;
768
769 m_TreeView->AppendTabOrderWindow(direction, TabOrderHwndList);
770 m_ApplicationView->AppendTabOrderWindow(direction, TabOrderHwndList);
771
772 if (TabOrderHwndList.GetSize() == 0)
773 {
774 // in case the list is empty
775 return;
776 }
777
778 int FocusIndex;
779
780 if ((FocusIndex = TabOrderHwndList.Find(GetFocus())) == -1)
781 {
782 FocusIndex = 0; // focus the first window in the list
783 }
784 else
785 {
786 FocusIndex += direction;
787 FocusIndex +=
788 TabOrderHwndList.GetSize(); // FocusIndex might be negative. we don't want to mod a negative number
789 FocusIndex %= TabOrderHwndList.GetSize();
790 }
791
792 ::SetFocus(TabOrderHwndList[FocusIndex]);
793 return;
794}
795// **** CMainWindow ****
796
797VOID
799{
800 HACCEL KeyBrd;
801 MSG Msg;
802
803 hMainWnd = wnd->Create();
804 if (!hMainWnd)
805 return;
806
807 /* Maximize it if we must */
809 wnd->UpdateWindow();
810
811 /* Load the menu hotkeys */
813
814 /* Message Loop */
815 while (GetMessageW(&Msg, NULL, 0, 0))
816 {
817 if (!TranslateAcceleratorW(hMainWnd, KeyBrd, &Msg))
818 {
819 if (Msg.message == WM_CHAR && Msg.wParam == VK_TAB)
820 {
821 // Move backwards if shift is held down
822 int direction = (GetKeyState(VK_SHIFT) & 0x8000) ? -1 : 1;
823
824 wnd->HandleTabOrder(direction);
825 continue;
826 }
827
830 }
831 }
832}
#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 IDI_MAIN
Definition: resource.h:4
#define ID_EXIT
Definition: resource.h:10
#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 noexcept
Definition: atlsimpstr.h:394
PXSTR GetString() noexcept
Definition: atlsimpstr.h:367
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
size_t GetAvailableCount() const
Definition: appdb.h:36
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:576
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:588
BOOL CreateVSplitter()
Definition: gui.cpp:163
BOOL SearchTextChanged(CStringW &SearchText)
Definition: gui.cpp:748
VOID CheckAvailable()
Definition: gui.cpp:297
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:767
VOID UpdateApplicationsList(AppsCategories EnumType, BOOL bReload=FALSE, BOOL bCheckAvailable=FALSE)
Definition: gui.cpp:604
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: gui.cpp:669
BOOL bAppwizMode
Definition: gui.h:60
BOOL bUpdating
Definition: gui.h:59
~CMainWindow()
Definition: gui.cpp:89
CMainWindow()
Definition: main.h:30
void HandleTabOrder(int direction)
Definition: gui.cpp:765
BOOL InstallApplication(CAppInfo *Info)
Definition: gui.cpp:733
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:819
CAtlList< CAppInfo * > m_Selected
Definition: gui.h:57
VOID ShowAboutDlg()
Definition: gui.cpp:476
BOOL InitControls()
Definition: gui.cpp:225
VOID InitCategoriesList()
Definition: gui.cpp:95
VOID ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam)
Definition: gui.cpp:705
CAppDB * m_Db
Definition: gui.h:56
CUiWindow< CStatusBar > * m_StatusBar
Definition: gui.h:52
HWND Create()
Definition: gui.cpp:686
BOOL ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: gui.cpp:307
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:284
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 @1632 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:798
#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:1108
VOID CreateSettingsDlg(HWND hwnd)
BOOL DownloadListOfApplications(const CAtlList< CAppInfo * > &AppsList, BOOL bIsModal)
Definition: loaddlg.cpp:1089
#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:1893
#define CS_VREDRAW
Definition: winuser.h:658
#define SW_HIDE
Definition: winuser.h:768
#define WM_CLOSE
Definition: winuser.h:1621
#define VK_TAB
Definition: winuser.h:2199
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:1608
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SIZE
Definition: winuser.h:1611
#define LR_CREATEDIBSECTION
Definition: winuser.h:1098
#define WM_COMMAND
Definition: winuser.h:1740
#define CS_HREDRAW
Definition: winuser.h:653
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:2203
#define IDC_ARROW
Definition: winuser.h:687
#define SIZE_MINIMIZED
Definition: winuser.h:2506
#define MB_YESNO
Definition: winuser.h:817
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1626
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2105
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:1221
#define WM_TIMER
Definition: winuser.h:1742
struct tagNMHDR * LPNMHDR
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5719
#define MB_OK
Definition: winuser.h:790
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
#define WM_CHAR
Definition: winuser.h:1717
#define CW_USEDEFAULT
Definition: winuser.h:225
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define WM_SIZING
Definition: winuser.h:1807
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define MB_ICONQUESTION
Definition: winuser.h:789
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
#define VK_SHIFT
Definition: winuser.h:2202
#define WM_DESTROY
Definition: winuser.h:1609
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define IDYES
Definition: winuser.h:835
#define SW_MAXIMIZE
Definition: winuser.h:772
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:2075
#define RDW_INVALIDATE
Definition: winuser.h:1214
SHORT WINAPI GetKeyState(_In_ int)
#define COLOR_BTNFACE
Definition: winuser.h:928
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2053
WCHAR * LPWSTR
Definition: xmlstorage.h:184