ReactOS  0.4.14-dev-815-ge410a12
CEnumFonts Class Reference
Inheritance diagram for CEnumFonts:
Collaboration diagram for CEnumFonts:

Public Member Functions

 CEnumFonts ()
 
STDMETHODIMP Initialize (CFontExt *folder, DWORD flags)
 
STDMETHODIMP Next (ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched)
 
STDMETHODIMP Skip (ULONG celt)
 
STDMETHODIMP Reset ()
 
STDMETHODIMP Clone (IEnumIDList **ppenum)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IEnumIDList
HRESULT Next ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] PITEMID_CHILD *rgelt, [out] ULONG *pceltFetched)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Attributes

DWORD m_dwFlags
 
ULONG m_Index
 

Additional Inherited Members

- Public Types inherited from IEnumIDList
typedef IEnumIDListLPENUMIDLIST
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 14 of file CEnumFonts.cpp.

Constructor & Destructor Documentation

◆ CEnumFonts()

CEnumFonts::CEnumFonts ( )
inline

Definition at line 23 of file CEnumFonts.cpp.

24  :m_dwFlags(0)
25  ,m_Index(0)
26  {
27  }
ULONG m_Index
Definition: CEnumFonts.cpp:20
DWORD m_dwFlags
Definition: CEnumFonts.cpp:19

Member Function Documentation

◆ Clone()

STDMETHODIMP CEnumFonts::Clone ( IEnumIDList **  ppenum)
inline

Implements IEnumIDList.

Definition at line 71 of file CEnumFonts.cpp.

72  {
73  return E_NOTIMPL;
74  }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Initialize()

STDMETHODIMP CEnumFonts::Initialize ( CFontExt folder,
DWORD  flags 
)
inline

Definition at line 29 of file CEnumFonts.cpp.

30  {
31  m_dwFlags = flags;
32  m_Index = 0;
33  return S_OK;
34  }
ULONG m_Index
Definition: CEnumFonts.cpp:20
DWORD m_dwFlags
Definition: CEnumFonts.cpp:19
GLbitfield flags
Definition: glext.h:7161
#define S_OK
Definition: intsafe.h:59

◆ Next()

STDMETHODIMP CEnumFonts::Next ( ULONG  celt,
LPITEMIDLIST rgelt,
ULONG pceltFetched 
)
inline

Definition at line 37 of file CEnumFonts.cpp.

38  {
39  if (!pceltFetched || !rgelt)
40  return E_POINTER;
41 
42  ULONG Fetched = 0;
43 
44  while (celt)
45  {
46  celt--;
47 
48  if (m_Index < g_FontCache->Size())
49  {
51  rgelt[Fetched] = _ILCreate(Name, m_Index);
52 
53  m_Index++;
54  Fetched++;
55  }
56  }
57 
58  *pceltFetched = Fetched;
59  return Fetched ? S_OK : S_FALSE;
60  }
ULONG m_Index
Definition: CEnumFonts.cpp:20
#define S_FALSE
Definition: winerror.h:2357
CFontCache * g_FontCache
Definition: CFontCache.cpp:12
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define S_OK
Definition: intsafe.h:59
CStringW Name(size_t Index)
Definition: CFontCache.cpp:79
unsigned int ULONG
Definition: retypes.h:1
#define E_POINTER
Definition: winerror.h:2365
LPITEMIDLIST _ILCreate(LPCWSTR lpString, ULONG Index)
Definition: fontpidl.cpp:10

◆ Reset()

STDMETHODIMP CEnumFonts::Reset ( void  )
inline

Implements IEnumIDList.

Definition at line 66 of file CEnumFonts.cpp.

67  {
68  m_Index = 0;
69  return S_OK;
70  }
ULONG m_Index
Definition: CEnumFonts.cpp:20
#define S_OK
Definition: intsafe.h:59

◆ Skip()

STDMETHODIMP CEnumFonts::Skip ( ULONG  celt)
inline

Implements IEnumIDList.

Definition at line 61 of file CEnumFonts.cpp.

62  {
63  m_Index += celt;
64  return S_OK;
65  }
ULONG m_Index
Definition: CEnumFonts.cpp:20
#define S_OK
Definition: intsafe.h:59

Member Data Documentation

◆ m_dwFlags

DWORD CEnumFonts::m_dwFlags
private

Definition at line 19 of file CEnumFonts.cpp.

Referenced by Initialize().

◆ m_Index

ULONG CEnumFonts::m_Index
private

Definition at line 20 of file CEnumFonts.cpp.

Referenced by Initialize(), Next(), Reset(), and Skip().


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