ReactOS 0.4.16-dev-297-gc569aee
gui.h
Go to the documentation of this file.
1#pragma once
2
3#include "rapps.h"
4#include "rosui.h"
5#include "crichedit.h"
6#include "asyncinet.h"
7#include "appview.h"
8#include <shlobj_undoc.h>
9#include <shlguid_undoc.h>
10
11#include <atlbase.h>
12#include <atlcom.h>
13#include <atltypes.h>
14#include <atlwin.h>
15#include <wininet.h>
16#include <shellutils.h>
17#include <ui/rosctrls.h>
18#include <gdiplus.h>
19#include <math.h>
20
21#define SEARCH_TIMER_ID 'SR'
22#define TREEVIEW_ICON_SIZE 24
23
24class CSideTreeView : public CUiWindow<CTreeView>
25{
27
28 public:
30
32 AddItem(HTREEITEM hParent, CStringW &Text, INT Image, INT SelectedImage, LPARAM lParam);
33
35 AddCategory(HTREEITEM hRootItem, UINT TextIndex, UINT IconIndex);
36
39
40 VOID
42
44};
45
46class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits>
47{
50
53
55 friend class CApplicationView;
56
59
63
66
67 public:
68 explicit CMainWindow(CAppDB *db, BOOL bAppwiz = FALSE);
69
71
72 private:
73 VOID
75
76 BOOL
78 BOOL
80 BOOL
82 BOOL
84 BOOL
86 VOID
88 BOOL
90
91 VOID
93
94 VOID
96
97 BOOL
99 BOOL
100 UninstallSelectedApp(BOOL bModify);
101
102 BOOL
104 VOID
105 ShowAboutDlg();
106 VOID
108 VOID
110
111 VOID
112 UpdateApplicationsList(AppsCategories EnumType, BOOL bReload = FALSE, BOOL bCheckAvailable = FALSE);
113 VOID
115
116 public:
117 static ATL::CWndClassInfo &
119
120 HWND
121 Create();
122
123 // this function is called when a item of application-view is checked/unchecked
124 // CallbackParam is the param passed to application-view when adding the item (the one getting focus now).
125 VOID
126 ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam);
127
128 // this function is called when application-view is asked to install an application
129 // if Info is not zero, this app should be installed. otherwise those checked apps should be installed
130 BOOL
132
133 // this function is called when search text is changed
134 BOOL
135 SearchTextChanged(CStringW &SearchText);
136
137 void
138 HandleTabOrder(int direction);
139};
140
141// Main window
142VOID
143MainWindowLoop(CMainWindow *wnd, INT nShowCmd);
AppsCategories
Definition: appinfo.h:25
VOID MainWindowLoop(CMainWindow *wnd, INT nShowCmd)
Definition: gui.cpp:874
Definition: appdb.h:9
BOOL RemoveSelectedAppFromRegistry()
Definition: gui.cpp:269
AppsCategories SelectedEnumType
Definition: gui.h:65
BOOL m_bAppwizMode
Definition: gui.h:61
HTREEITEM hRootItemInstalled
Definition: gui.h:62
VOID UpdateStatusBarText()
Definition: gui.cpp:619
BOOL CreateLayout()
Definition: gui.cpp:187
BOOL CreateTreeView()
Definition: gui.cpp:147
CSideTreeView * m_TreeView
Definition: gui.h:51
CStringW szSearchPattern
Definition: gui.h:64
CUiSplitPanel * m_VSplitter
Definition: gui.h:49
VOID AddApplicationsToView(CAtlList< CAppInfo * > &List)
Definition: gui.cpp:639
BOOL CreateVSplitter()
Definition: gui.cpp:169
BOOL SearchTextChanged(CStringW &SearchText)
Definition: gui.cpp:824
VOID CheckAvailable()
Definition: gui.cpp:303
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:656
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: gui.cpp:746
BOOL bUpdating
Definition: gui.h:60
~CMainWindow()
Definition: gui.cpp:89
CMainWindow()
Definition: main.h:30
void HandleTabOrder(int direction)
Definition: gui.cpp:841
BOOL InstallApplication(CAppInfo *Info)
Definition: gui.cpp:809
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:819
CAtlList< CAppInfo * > m_Selected
Definition: gui.h:58
VOID ShowAboutDlg()
Definition: gui.cpp:519
BOOL InitControls()
Definition: gui.cpp:231
VOID InitCategoriesList()
Definition: gui.cpp:95
VOID ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam)
Definition: gui.cpp:781
CAppDB * m_Db
Definition: gui.h:57
CUiWindow< CStatusBar > * m_StatusBar
Definition: gui.h:52
HWND Create()
Definition: gui.cpp:763
BOOL ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: gui.cpp:313
CUiPanel * m_ClientPanel
Definition: gui.h:48
VOID LayoutCleanup()
Definition: gui.cpp:221
BOOL CreateStatusBar()
Definition: gui.cpp:136
BOOL UninstallSelectedApp(BOOL bModify)
Definition: gui.cpp:290
BOOL CreateApplicationView()
Definition: gui.cpp:158
CApplicationView * m_ApplicationView
Definition: gui.h:54
HIMAGELIST hImageTreeView
Definition: gui.h:26
CSideTreeView()
Definition: gui.cpp:33
HTREEITEM AddCategory(HTREEITEM hRootItem, UINT TextIndex, UINT IconIndex)
Definition: gui.cpp:46
~CSideTreeView()
Definition: gui.cpp:77
VOID DestroyImageList()
Definition: gui.cpp:71
HIMAGELIST SetImageList()
Definition: gui.cpp:65
WPARAM wParam
Definition: combotst.c:138
char * Text
Definition: combotst.c:136
struct @1640 Msg[]
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
static const WCHAR IconIndex[]
Definition: install.c:52
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned int UINT
Definition: ndis.h:50
int32_t INT
Definition: typedefs.h:58
#define AddItem
Definition: userenv.h:209
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
_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