ReactOS 0.4.15-dev-8109-gd7be748
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
58
62
65
66 public:
67 explicit CMainWindow(CAppDB *db, BOOL bAppwiz = FALSE);
68
70
71 private:
72 VOID
74
75 BOOL
77 BOOL
79 BOOL
81 BOOL
83 BOOL
85 VOID
87 BOOL
89
90 VOID
92
93 VOID
95
96 BOOL
98 BOOL
100
101 BOOL
103 VOID
104 ShowAboutDlg();
105 VOID
107 VOID
109
110 VOID
111 UpdateApplicationsList(AppsCategories EnumType, BOOL bReload = FALSE, BOOL bCheckAvailable = FALSE);
112 VOID
114
115 public:
116 static ATL::CWndClassInfo &
118
119 HWND
120 Create();
121
122 // this function is called when a item of application-view is checked/unchecked
123 // CallbackParam is the param passed to application-view when adding the item (the one getting focus now).
124 VOID
125 ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam);
126
127 // this function is called when application-view is asked to install an application
128 // if Info is not zero, this app should be installed. otherwise those checked apps should be installed
129 BOOL
131
132 // this function is called when search text is changed
133 BOOL
134 SearchTextChanged(CStringW &SearchText);
135
136 void
137 HandleTabOrder(int direction);
138};
139
140// Main window
141VOID
142MainWindowLoop(CMainWindow *wnd, INT nShowCmd);
AppsCategories
Definition: appinfo.h:25
VOID MainWindowLoop(CMainWindow *wnd, INT nShowCmd)
Definition: gui.cpp:798
Definition: appdb.h:9
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
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
struct @1637 Msg[]
WPARAM wParam
Definition: combotst.c:138
char * Text
Definition: combotst.c:136
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