ReactOS 0.4.16-dev-1264-g92ff994
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 452 of file mlng.cpp.

453{
455
456 INT iItem = -1;
457 HICON hCopyIcon = ::CopyIcon(hIcon);
458 if (hCopyIcon)
459 {
460 if (g_IconList.Add(hIcon))
461 iItem = INT(g_IconList.size() - 1);
462 }
463
465 return iItem;
466}
size_t size() const
Definition: cicarray.h:34
BOOL Add(const T_ITEM &item)
Definition: cicarray.h:60
CStaticIconList g_IconList
Definition: mlng.cpp:36
CRITICAL_SECTION g_cs
Definition: utils.cpp:40
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:2348

Referenced by InatAddIcon().

◆ ExtractIcon()

HICON CStaticIconList::ExtractIcon ( INT  iIcon)

@implemented

Definition at line 469 of file mlng.cpp.

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

Referenced by TF_InatExtractIcon().

◆ GetIconSize()

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

@implemented

Definition at line 480 of file mlng.cpp.

481{
483 *pcx = s_cx;
484 *pcy = s_cy;
486}
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 489 of file mlng.cpp.

490{
492 INT cItems = (INT)g_IconList.size();
494 return cItems;
495}

Referenced by InatGetImageCount().

◆ Init()

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

@implemented

Definition at line 443 of file mlng.cpp.

444{
446 s_cx = cxIcon;
447 s_cy = cyIcon;
449}

Referenced by EnsureIconImageList().

◆ RemoveAll()

void CStaticIconList::RemoveAll ( BOOL  bNoLock)

@implemented

Definition at line 498 of file mlng.cpp.

499{
500 if (!bNoLock)
502
503 for (size_t iItem = 0; iItem < g_IconList.size(); ++iItem)
504 {
506 }
507
508 clear();
509
510 if (!bNoLock)
512}
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2390

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: