ReactOS 0.4.17-dev-1190-g4c812f4
CDowloadingAppsListView Class Reference
Inheritance diagram for CDowloadingAppsListView:
Collaboration diagram for CDowloadingAppsListView:

Public Member Functions

HWND Create (HWND hwndParent)
 
VOID LoadList (ATL::CSimpleArray< DownloadInfo > arrInfo, UINT Start=0)
 
VOID SetDownloadStatus (INT ItemIndex, DownloadStatus Status)
 
BOOL AddItem (INT ItemIndex, LPWSTR lpText)
 
VOID AddRow (INT RowIndex, LPCWSTR szAppName, const DownloadStatus Status)
 
BOOL AddColumn (INT Index, INT Width, INT Format)
 
- Public Member Functions inherited from CListView
HWND Create (HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
void SetRedraw (BOOL redraw)
 
BOOL SetTextBkColor (COLORREF cr)
 
BOOL SetBkColor (COLORREF cr)
 
BOOL SetTextColor (COLORREF cr)
 
DWORD SetExtendedListViewStyle (DWORD dw, DWORD dwMask=0)
 
int InsertColumn (int iCol, LV_COLUMN *pcol)
 
int InsertColumn (int iCol, LPWSTR pszText, int fmt, int width=-1, int iSubItem=-1, int iImage=-1, int iOrder=-1)
 
int GetColumnWidth (int iCol)
 
BOOL SetColumnWidth (int iCol, int width)
 
HIMAGELIST SetImageList (HIMAGELIST himl, int iImageList)
 
int InsertItem (const LV_ITEM *pitem)
 
BOOL DeleteItem (int i)
 
BOOL GetItem (LV_ITEM *pitem)
 
BOOL SetItem (const LV_ITEM *pitem)
 
BOOL FindItem (int iStart, const LV_FINDINFO *plvfi)
 
int GetItemCount ()
 
BOOL DeleteAllItems ()
 
BOOL Update (int i)
 
UINT GetSelectedCount ()
 
BOOL SortItems (PFNLVCOMPARE pfnCompare, PVOID lParam)
 
BOOL EnsureVisible (int i, BOOL fPartialOK)
 
HWND EditLabel (int i)
 
int GetSelectionMark ()
 
int GetNextItem (int i, WORD flags)
 
void GetItemSpacing (SIZE &spacing, BOOL bSmallIconView=FALSE)
 
UINT GetItemState (int i, UINT mask)
 
void SetItemState (int i, UINT state, UINT mask)
 
BOOL SetItemText (int i, int subItem, LPCWSTR text)
 
void SetCheckState (int i, BOOL check)
 
int HitTest (LV_HITTESTINFO *phtInfo)
 
DWORD_PTR GetItemData (int i)
 
BOOL GetSelectedItem (LV_ITEM *pItem)
 
void GetItemText (int iItem, int iSubItem, LPTSTR pszText, int cchTextMax)
 
BOOL GetItemPosition (int nItem, POINT *pPoint)
 
BOOL SetItemPosition (int nItem, POINT *pPoint)
 
BOOL Arrange (UINT nCode)
 

Detailed Description

Definition at line 371 of file loaddlg.cpp.

Member Function Documentation

◆ AddColumn()

BOOL CDowloadingAppsListView::AddColumn ( INT  Index,
INT  Width,
INT  Format 
)
inline

Definition at line 434 of file loaddlg.cpp.

435 {
436 LVCOLUMNW Column;
437 ZeroMemory(&Column, sizeof(Column));
438
440 Column.iSubItem = Index;
441 Column.cx = Width;
442 Column.fmt = Format;
443
444 return (InsertColumn(Index, &Column) == -1) ? FALSE : TRUE;
445 }
int InsertColumn(int iCol, LV_COLUMN *pcol)
Definition: rosctrls.h:52
_Check_return_ _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS _Out_ UINT * Width
Definition: dispmprt.h:1444
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ZeroMemory
Definition: minwinbase.h:31
#define LVCF_WIDTH
Definition: commctrl.h:2592
#define LVCF_FMT
Definition: commctrl.h:2591
#define LVCF_SUBITEM
Definition: commctrl.h:2594
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by Create().

◆ AddItem()

BOOL CDowloadingAppsListView::AddItem ( INT  ItemIndex,
LPWSTR  lpText 
)
inline

Definition at line 412 of file loaddlg.cpp.

413 {
415
416 ZeroMemory(&Item, sizeof(Item));
417
418 Item.mask = LVIF_TEXT | LVIF_STATE;
419 Item.pszText = lpText;
420 Item.iItem = ItemIndex;
421
422 return InsertItem(&Item);
423 }
int InsertItem(const LV_ITEM *pitem)
Definition: rosctrls.h:101
#define LVIF_STATE
Definition: commctrl.h:2317
#define LVIF_TEXT
Definition: commctrl.h:2314
_In_ WDFCOLLECTION _In_ WDFOBJECT Item

◆ AddRow()

VOID CDowloadingAppsListView::AddRow ( INT  RowIndex,
LPCWSTR  szAppName,
const DownloadStatus  Status 
)
inline

Definition at line 426 of file loaddlg.cpp.

427 {
428 CStringW szStatus = LoadStatusString(Status);
429 AddItem(RowIndex, const_cast<LPWSTR>(szAppName));
430 SetDownloadStatus(RowIndex, Status);
431 }
VOID SetDownloadStatus(INT ItemIndex, DownloadStatus Status)
Definition: loaddlg.cpp:405
Status
Definition: gdiplustypes.h:24
CStringW LoadStatusString(DownloadStatus StatusParam)
Definition: loaddlg.cpp:140
TCHAR szAppName[128]
Definition: solitaire.cpp:18
uint16_t * LPWSTR
Definition: typedefs.h:56
#define AddItem
Definition: userenv.h:209

Referenced by LoadList().

◆ Create()

HWND CDowloadingAppsListView::Create ( HWND  hwndParent)
inline

Definition at line 375 of file loaddlg.cpp.

376 {
377 RECT r;
379 r.top = (2 * r.top + 1 * r.bottom) / 3; /* The vertical position at ratio 1 : 2 */
380 const INT MARGIN = 10;
381 ::InflateRect(&r, -MARGIN, -MARGIN);
382
385
387
388 AddColumn(0, 150, LVCFMT_LEFT);
389 AddColumn(1, 120, LVCFMT_LEFT);
390
391 return hwnd;
392 }
BOOL AddColumn(INT Index, INT Width, INT Format)
Definition: loaddlg.cpp:434
HWND Create(HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: rosctrls.h:8
static HWND hwndParent
Definition: cryptui.c:299
#define NULL
Definition: types.h:112
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define WS_CHILD
Definition: pedump.c:617
#define WS_VISIBLE
Definition: pedump.c:620
#define LVS_SINGLESEL
Definition: commctrl.h:2271
#define LVS_NOCOLUMNHEADER
Definition: commctrl.h:2289
#define LVS_SHOWSELALWAYS
Definition: commctrl.h:2272
#define LVS_REPORT
Definition: commctrl.h:2267
#define LVS_NOSORTHEADER
Definition: commctrl.h:2290
#define LVCFMT_LEFT
Definition: commctrl.h:2603
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
Definition: dcommon.idl:28
Definition: style.c:91
int32_t INT
Definition: typedefs.h:58
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by CDownloadManager::RealDlgProc().

◆ LoadList()

VOID CDowloadingAppsListView::LoadList ( ATL::CSimpleArray< DownloadInfo >  arrInfo,
UINT  Start = 0 
)
inline

Definition at line 395 of file loaddlg.cpp.

396 {
397 const INT base = GetItemCount();
398 for (INT i = Start; i < arrInfo.GetSize(); ++i)
399 {
400 AddRow(base + i - Start, arrInfo[i].szName, DLSTATUS_WAITING);
401 }
402 }
static _Out_opt_ PULONGLONG Start
int GetSize() const
Definition: atlsimpcoll.h:104
VOID AddRow(INT RowIndex, LPCWSTR szAppName, const DownloadStatus Status)
Definition: loaddlg.cpp:426
int GetItemCount()
Definition: rosctrls.h:126
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
@ DLSTATUS_WAITING
Definition: loaddlg.cpp:131
static const WCHAR szName[]
Definition: powrprof.c:45

Referenced by CDownloadManager::Add(), and CDownloadManager::RealDlgProc().

◆ SetDownloadStatus()

VOID CDowloadingAppsListView::SetDownloadStatus ( INT  ItemIndex,
DownloadStatus  Status 
)
inline

Definition at line 405 of file loaddlg.cpp.

406 {
407 CStringW szBuffer = LoadStatusString(Status);
408 SetItemText(ItemIndex, 1, szBuffer.GetString());
409 }
PXSTR GetString() noexcept
Definition: atlsimpstr.h:367
BOOL SetItemText(int i, int subItem, LPCWSTR text)
Definition: rosctrls.h:191

Referenced by AddRow(), and CDownloadManager::RealDlgProc().


The documentation for this class was generated from the following file: