ReactOS 0.4.15-dev-8393-g61b7fb9
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 26 of file mlng.h.

Constructor & Destructor Documentation

◆ CStaticIconList()

CStaticIconList::CStaticIconList ( )
inline

Definition at line 32 of file mlng.h.

32{ }

Member Function Documentation

◆ AddIcon()

INT CStaticIconList::AddIcon ( HICON  hIcon)

@implemented

Definition at line 451 of file mlng.cpp.

452{
454
455 INT iItem = -1;
456 HICON hCopyIcon = ::CopyIcon(hIcon);
457 if (hCopyIcon)
458 {
459 if (g_IconList.Add(hIcon))
460 iItem = INT(g_IconList.size() - 1);
461 }
462
464 return iItem;
465}
size_t size() const
Definition: cicarray.h:34
BOOL Add(const T_ITEM &item)
Definition: cicarray.h:60
CStaticIconList g_IconList
Definition: mlng.cpp:35
CRITICAL_SECTION g_cs
Definition: utils.cpp:39
static HICON
Definition: imagelist.c:84
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:2055

Referenced by InatAddIcon().

◆ ExtractIcon()

HICON CStaticIconList::ExtractIcon ( INT  iIcon)

@implemented

Definition at line 468 of file mlng.cpp.

469{
470 HICON hCopyIcon = NULL;
472 if (iIcon <= (INT)g_IconList.size())
473 hCopyIcon = ::CopyIcon(g_IconList[iIcon]);
475 return hCopyIcon;
476}
#define NULL
Definition: types.h:112

Referenced by TF_InatExtractIcon().

◆ GetIconSize()

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

@implemented

Definition at line 479 of file mlng.cpp.

480{
482 *pcx = s_cx;
483 *pcy = s_cy;
485}
static INT s_cy
Definition: mlng.h:30
static INT s_cx
Definition: mlng.h:29

Referenced by InatGetIconSize().

◆ GetImageCount()

INT CStaticIconList::GetImageCount ( )

@implemented

Definition at line 488 of file mlng.cpp.

489{
491 INT cItems = (INT)g_IconList.size();
493 return cItems;
494}

Referenced by InatGetImageCount().

◆ Init()

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

@implemented

Definition at line 442 of file mlng.cpp.

443{
445 s_cx = cxIcon;
446 s_cy = cyIcon;
448}

Referenced by EnsureIconImageList().

◆ RemoveAll()

void CStaticIconList::RemoveAll ( BOOL  bNoLock)

@implemented

Definition at line 497 of file mlng.cpp.

498{
499 if (!bNoLock)
501
502 for (size_t iItem = 0; iItem < g_IconList.size(); ++iItem)
503 {
505 }
506
507 clear();
508
509 if (!bNoLock)
511}
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2097

Referenced by InatRemoveAll(), and UninitINAT().

Member Data Documentation

◆ s_cx

INT CStaticIconList::s_cx = 0
static

Definition at line 29 of file mlng.h.

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

◆ s_cy

INT CStaticIconList::s_cy = 0
static

Definition at line 30 of file mlng.h.

Referenced by GetIconSize(), and Init().


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