1#ifndef __SRESPROVIDERMGR__H__
2#define __SRESPROVIDERMGR__H__
5#include <interface/SResProviderMgr-i.h>
6#include <layout/SLayoutSize.h>
54 STDMETHOD_(
void,
RemoveAll)(THIS) OVERRIDE;
72 STDMETHOD_(
void,
SetFilePrefix)(THIS_ LPCTSTR pszFilePrefix) OVERRIDE;
81 STDMETHOD_(BOOL,
HasResource)(THIS_ LPCTSTR pszType, LPCTSTR pszResName) OVERRIDE;
91 STDMETHOD_(HICON,
LoadIcon)(THIS_ LPCTSTR pszResName,
int cx = 0,
int cy = 0, BOOL bFromFile = FALSE) OVERRIDE;
99 STDMETHOD_(HCURSOR,
LoadCursor)(THIS_ LPCTSTR pszResName, BOOL bFromFile = FALSE) OVERRIDE;
107 STDMETHOD_(HBITMAP,
LoadBitmap)(THIS_ LPCTSTR pszResName, BOOL bFromFile = FALSE) OVERRIDE;
115 STDMETHOD_(
IBitmapS *,
LoadImage)(THIS_ LPCTSTR pszType, LPCTSTR pszResName) OVERRIDE;
123 STDMETHOD_(
IImgX *,
LoadImgX)(THIS_ LPCTSTR pszType, LPCTSTR pszResName) OVERRIDE;
131 STDMETHOD_(
size_t,
GetRawBufferSize)(THIS_ LPCTSTR pszType, LPCTSTR pszResName) OVERRIDE;
141 STDMETHOD_(BOOL,
GetRawBuffer)(THIS_ LPCTSTR pszType, LPCTSTR pszResName, LPVOID pBuf,
size_t size) OVERRIDE;
187 static BOOL CALLBACK CheckUsage(LPCTSTR pszName, LPCTSTR pszType, LPARAM lp);
204 SStringT m_strFilePrefix;
205 SList<IResProvider *> m_lstResPackage;
207 typedef SMap<SStringT, HCURSOR> CURSORMAP;
208 CURSORMAP m_mapCachedCursor;
214 SMap<SStringT, int> m_mapResUsageCount;
Header file for the SAutoBuf class, a smart buffer management class.
Header file for SCriticalSection and SAutoLock classes.
A smart buffer management class that automatically handles memory allocation and deallocation.
Wrapper class for a critical section.
IResProvider * GetHeadResProvider() SCONST OVERRIDE
Retrieves the first resource provider in the list.
void RemoveResProvider(IResProvider *pResProvider) OVERRIDE
Removes a resource provider.
void AddResProviderA(IResProvider *pResProvider, LPCSTR pszUidef="uidef:xml_init") OVERRIDE
Adds a resource provider with a specified UI definition (ANSI version).
IBitmapS * LoadImage2(const SStringW &strImgID)
Loads an image using a type:name formatted string.
void SetFilePrefix(LPCTSTR pszFilePrefix) OVERRIDE
Sets the file prefix for resource paths.
IResProvider * GetMatchResProvider(LPCTSTR pszType, LPCTSTR pszResName)
Finds the resource provider that contains the specified resource type and name.
LPCTSTR SysCursorName2ID(LPCTSTR pszCursorName)
Converts a system cursor name to its corresponding ID.
BOOL IsFileType(LPCTSTR pszType)
Checks if the resource type is an external file.
void AddResProvider(IResProvider *pResProvider, LPCTSTR pszUidef=_T("uidef:xml_init")) OVERRIDE
Adds a resource provider with a specified UI definition.
void RemoveAll() OVERRIDE
Removes all resource providers.
IResProvider * GetTailResProvider() SCONST OVERRIDE
Retrieves the last resource provider in the list.
HICON LoadIcon2(const SStringW &strIconID)
Loads an icon using a name:size formatted string.
SResProviderMgr(void)
Constructor.
BOOL LoadRawBuffer(LPCTSTR pszType, LPCTSTR pszResName, IResProvider *pResProvider, SAutoBuf &buf)
Loads the raw buffer for a resource using a specified resource provider.
size_t GetRawBufferSize(LPCTSTR pszType, LPCTSTR pszResName) OVERRIDE
Retrieves the size of the raw buffer for a resource.
HICON LoadIcon(LPCTSTR pszResName, int cx=0, int cy=0, BOOL bFromFile=FALSE) OVERRIDE
Loads an icon resource.
BOOL HasResource(LPCTSTR pszType, LPCTSTR pszResName) OVERRIDE
Checks if a resource exists.
IBitmapS * LoadImage(LPCTSTR pszType, LPCTSTR pszResName) OVERRIDE
Loads an image resource as an IBitmapS object.
HCURSOR LoadCursor(LPCTSTR pszResName, BOOL bFromFile=FALSE) OVERRIDE
Loads a cursor resource.
IImgX * LoadImgX(LPCTSTR pszType, LPCTSTR pszResName) OVERRIDE
Loads an image resource as an IImgX object.
HBITMAP LoadBitmap(LPCTSTR pszResName, BOOL bFromFile=FALSE) OVERRIDE
Loads a bitmap resource.
BOOL GetRawBuffer(LPCTSTR pszType, LPCTSTR pszResName, LPVOID pBuf, size_t size) OVERRIDE
Retrieves the raw buffer for a resource.
A class representing an ASCII string.
Interface for image data.