ReactOS 0.4.15-dev-7704-gc07eb9f
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)
 
HRESULT Skip ([in] ULONG celt)
 
HRESULT Reset ()
 
HRESULT Clone ([out] IEnumIDList **ppenum)
 
- 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 82 of file CEnumFonts.cpp.

83 {
84 return E_NOTIMPL;
85 }
#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 {
32 m_Index = 0;
33 return S_OK;
34 }
GLbitfield flags
Definition: glext.h:7161
#define S_OK
Definition: intsafe.h:52

◆ Next()

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

Definition at line 37 of file CEnumFonts.cpp.

38 {
39 if (!rgelt || (!pceltFetched && celt != 1))
40 return E_POINTER;
41
42 HRESULT hr = S_OK;
43 ULONG Fetched = 0;
44
45 while (celt)
46 {
47 celt--;
48
49 if (m_Index < g_FontCache->Size())
50 {
53 if (!item)
54 {
55 hr = Fetched ? S_FALSE : E_OUTOFMEMORY;
56 break;
57 }
58 rgelt[Fetched] = item;
59 m_Index++;
60 Fetched++;
61 }
62 else
63 {
64 hr = S_FALSE;
65 }
66 }
67
68 if (pceltFetched)
69 *pceltFetched = Fetched;
70 return hr;
71 }
CFontCache * g_FontCache
Definition: CFontCache.cpp:12
CStringW Name(size_t Index)
Definition: CFontCache.cpp:134
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LPITEMIDLIST _ILCreate(LPCWSTR lpString, ULONG Index)
Definition: fontpidl.cpp:10
static ATOM item
Definition: dde.c:856
HRESULT hr
Definition: shlfolder.c:183
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
#define S_FALSE
Definition: winerror.h:2357
#define E_POINTER
Definition: winerror.h:2365

◆ Reset()

STDMETHODIMP CEnumFonts::Reset ( )
inline

Implements IEnumIDList.

Definition at line 77 of file CEnumFonts.cpp.

78 {
79 m_Index = 0;
80 return S_OK;
81 }

◆ Skip()

STDMETHODIMP CEnumFonts::Skip ( ULONG  celt)
inline

Implements IEnumIDList.

Definition at line 72 of file CEnumFonts.cpp.

73 {
74 m_Index += celt;
75 return S_OK;
76 }

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: