mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:33:00 +00:00
[RAPPS] listview refactor (#2970)
This makes it easier to maintain the listview, and better separates the application list and listview. * [RAPPS] fix memory leak when cleanup. some renaming are also done * [RAPPS] move the code adding apps info inside class CAppsListView * [RAPPS] add table view, create listview and AppInfoDisplay inside it * [RAPPS] rename INSTALLED_INFO as CInstalledApplicationInfo now it corresponds with CAvailableApplicationInfo * [RAPPS] add CInstalledApps * [RAPPS] optimize the speed when refreshing listview * [RAPPS] correctly handle Enum for InstalledApps * [RAPPS] make check all working properly (this also fixes some bugs) the old version has some bugs when check all items after switching tags in tree-view * [RAPPS] add handling for wow64 * [RAPPS] use an inline function to replace INSERT_TEXT macro * [RAPPS] fix the bug that StatusBar won't update when switching tags * [RAPPS] now TableView always reset bIsAscending in SetDisplayMode * [RAPPS] rename TableView to ApplicationView * [RAPPS] now bIsAscending would be reset when switching column in listview
This commit is contained in:
parent
4482d0f455
commit
10c0ff7416
8 changed files with 1147 additions and 653 deletions
|
@ -37,10 +37,11 @@ struct AvailableStrings
|
|||
AvailableStrings();
|
||||
};
|
||||
|
||||
struct CAvailableApplicationInfo
|
||||
class CAvailableApplicationInfo
|
||||
{
|
||||
public:
|
||||
INT m_Category;
|
||||
BOOL m_IsSelected;
|
||||
//BOOL m_IsSelected;
|
||||
LicenseType m_LicenseType;
|
||||
ATL::CStringW m_szName;
|
||||
ATL::CStringW m_szRegName;
|
||||
|
@ -98,11 +99,12 @@ private:
|
|||
inline BOOL FindInLanguages(LCID what) const;
|
||||
};
|
||||
|
||||
typedef BOOL(CALLBACK *AVAILENUMPROC)(CAvailableApplicationInfo *Info, LPCWSTR szFolderPath, PVOID param);
|
||||
typedef BOOL(CALLBACK *AVAILENUMPROC)(CAvailableApplicationInfo *Info, BOOL bInitialCheckState, PVOID param);
|
||||
|
||||
class CAvailableApps
|
||||
{
|
||||
ATL::CAtlList<CAvailableApplicationInfo*> m_InfoList;
|
||||
ATL::CAtlList< CAvailableApplicationInfo*> m_SelectedList;
|
||||
|
||||
public:
|
||||
static AvailableStrings m_Strings;
|
||||
|
@ -116,9 +118,15 @@ public:
|
|||
VOID FreeCachedEntries();
|
||||
BOOL Enum(INT EnumType, AVAILENUMPROC lpEnumProc, PVOID param);
|
||||
|
||||
BOOL AddSelected(CAvailableApplicationInfo *AvlbInfo);
|
||||
BOOL RemoveSelected(CAvailableApplicationInfo *AvlbInfo);
|
||||
|
||||
VOID RemoveAllSelected();
|
||||
int GetSelectedCount();
|
||||
|
||||
CAvailableApplicationInfo* FindInfo(const ATL::CStringW& szAppName) const;
|
||||
ATL::CSimpleArray<CAvailableApplicationInfo> FindInfoList(const ATL::CSimpleArray<ATL::CStringW> &arrAppsNames) const;
|
||||
ATL::CSimpleArray<CAvailableApplicationInfo> GetSelected() const;
|
||||
//ATL::CSimpleArray<CAvailableApplicationInfo> GetSelected() const;
|
||||
|
||||
const ATL::CStringW& GetFolderPath() const;
|
||||
const ATL::CStringW& GetAppPath() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue