ReactOS 0.4.16-dev-1946-g52006dd
CStaticIconList Class Reference

#include <mlng.h>

Inheritance diagram for CStaticIconList:
Collaboration diagram for CStaticIconList:

Public Member Functions

 CStaticIconList ()
 
void Init (INT cxIcon, INT cyIcon)
 @implemented
 
INT AddIcon (HICON hIcon)
 @implemented
 
HICON ExtractIcon (INT iIcon)
 @implemented
 
void GetIconSize (INT *pcx, INT *pcy)
 @implemented
 
INT GetImageCount ()
 @implemented
 
void RemoveAll (BOOL bNoLock)
 @implemented
 
- Public Member Functions inherited from CicArray< HICON >
 CicArray ()
 
HICONdata () const
 
size_t size () const
 
bool empty () const
 
void clear ()
 
HICONoperator[] (size_t iItem)
 
const HICONoperator[] (size_t iItem) const
 
HICONAppend (size_t cGrow)
 
BOOL Add (const HICON &item)
 
ptrdiff_t Find (const HICON &item) const
 
BOOL Insert (size_t iItem, size_t cGrow)
 
void Remove (size_t iItem, size_t cRemove=1)
 

Static Public Attributes

static INT s_cx = 0
 
static INT s_cy = 0
 

Additional Inherited Members

- Protected Member Functions inherited from CicArrayBase
 CicArrayBase (size_t cbItem)
 
virtual ~CicArrayBase ()
 
BOOL Insert (size_t iItem, size_t cGrow)
 
LPVOID Append (size_t cGrow)
 
void Remove (size_t iItem, size_t cRemove=1)
 
- Protected Attributes inherited from CicArrayBase
LPBYTE m_pb
 
size_t m_cItems
 
size_t m_cbItem
 
size_t m_cCapacity
 

Detailed Description

Definition at line 28 of file mlng.h.

Constructor & Destructor Documentation

◆ CStaticIconList()

CStaticIconList::CStaticIconList ( )
inline

Definition at line 34 of file mlng.h.

34{ }

Member Function Documentation

◆ AddIcon()

INT CStaticIconList::AddIcon ( HICON  hIcon)

@implemented

Definition at line 445 of file mlng.cpp.

446{
448
449 INT iItem = -1;
450 HICON hCopyIcon = ::CopyIcon(hIcon);
451 if (hCopyIcon)
452 {
453 if (g_IconList.Add(hIcon))
454 iItem = INT(g_IconList.size() - 1);
455 }
456
458 return iItem;
459}
size_t size() const
Definition: cicarray.h:34
BOOL Add(const T_ITEM &item)
Definition: cicarray.h:60
CStaticIconList g_IconList
Definition: mlng.cpp:29
CRITICAL_SECTION g_cs
Definition: utils.cpp:25
static HICON
Definition: imagelist.c:80
HICON hIcon
Definition: msconfig.c:44
#define INT
Definition: polytest.cpp:20
int32_t INT
Definition: typedefs.h:58
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
HICON WINAPI CopyIcon(_In_ HICON)
Definition: cursoricon.c:2363

Referenced by InatAddIcon().

◆ ExtractIcon()

HICON CStaticIconList::ExtractIcon ( INT  iIcon)

@implemented

Definition at line 462 of file mlng.cpp.

463{
464 HICON hCopyIcon = NULL;
466 if (iIcon <= (INT)g_IconList.size())
467 hCopyIcon = ::CopyIcon(g_IconList[iIcon]);
469 return hCopyIcon;
470}
#define NULL
Definition: types.h:112

Referenced by TF_InatExtractIcon().

◆ GetIconSize()

void CStaticIconList::GetIconSize ( INT pcx,
INT pcy 
)

@implemented

Definition at line 473 of file mlng.cpp.

474{
476 *pcx = s_cx;
477 *pcy = s_cy;
479}
static INT s_cy
Definition: mlng.h:32
static INT s_cx
Definition: mlng.h:31

Referenced by InatGetIconSize().

◆ GetImageCount()

INT CStaticIconList::GetImageCount ( )

@implemented

Definition at line 482 of file mlng.cpp.

483{
485 INT cItems = (INT)g_IconList.size();
487 return cItems;
488}

Referenced by InatGetImageCount().

◆ Init()

void CStaticIconList::Init ( INT  cxIcon,
INT  cyIcon 
)

@implemented

Definition at line 436 of file mlng.cpp.

437{
439 s_cx = cxIcon;
440 s_cy = cyIcon;
442}

Referenced by EnsureIconImageList().

◆ RemoveAll()

void CStaticIconList::RemoveAll ( BOOL  bNoLock)

@implemented

Definition at line 491 of file mlng.cpp.

492{
493 if (!bNoLock)
495
496 for (size_t iItem = 0; iItem < g_IconList.size(); ++iItem)
497 {
499 }
500
501 clear();
502
503 if (!bNoLock)
505}
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2405

Referenced by InatRemoveAll(), and UninitINAT().

Member Data Documentation

◆ s_cx

INT CStaticIconList::s_cx = 0
static

Definition at line 31 of file mlng.h.

Referenced by EnsureIconImageList(), GetIconSize(), InatRemoveAll(), and Init().

◆ s_cy

INT CStaticIconList::s_cy = 0
static

Definition at line 32 of file mlng.h.

Referenced by GetIconSize(), and Init().


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