![]() | InDesign SDK 20.5 |
#include <CResourceShell.h>

Public Types | |
| typedef bool16(* | EnumResource )(IPMStream *s, void *enumData) |
Static Public Member Functions | |
| static SysHandle | GetResource (const RsrcSpec &spec) |
| static int16 | CountResourcesLI (const PMLocaleId &locale, RsrcType resType) |
| static int16 | CountResourcesLI (const RsrcSpec &spec) |
| static SysHandle | GetResourceLI (const RsrcSpec &spec) |
| static void | EnumerateResourcesLI (const PMLocaleId &locale, const PluginID &pluginID, RsrcType resType, EnumResource func, void *enumData, bool16 resourceAlreadyOpened=kFalse) |
| static void | EnumerateResources (const PluginID &pluginID, RsrcType resType, EnumResource func, void *enumData) |
This is a utility class for reading resources. Many of the methods are LocaleIndex resource aware. This means if you ask for some resource, this code will first look to see if there is a matching LocaleIndex resource, and if there is it will look up the localized index of the resource and return that to you, instead of blindly reading the resource you asked for. If you don't want this auto-localization behavior, don't use the methods that end with "LI"
| typedef bool16(* CResourceShell::EnumResource)(IPMStream *s, void *enumData) |
typedef for the function signature required to do resource enumeration.
| static |
Counts how many resources there are of the given type in the currently open resource file.
| locale | which locale we're reading resources for. This code will look for a LocaleIndex resource to determine the real localized resource to read for this locale. |
| resType | which resource kind to read |
| static |
| static |
Enumerate all the resources of a type. Stops iteration if EnumResource returns false. This function does NOT use LocaleIndex resources.
| pluginID | which plugin to enumerating resources for. |
| resType | which resource type to enumerating. |
| func | which function to call for each resource being enumerated. |
| enumData | private data which will be passed back to the enum function. |
| static |
Enumerate all the resources of a type. Stops iteration if EnumResource returns false. This function does find the appropriate localized resource using LocaleIndex resources if any.
| locale | which locale to enumerating resources for. |
| pluginID | which plugin to enumerating resources for. |
| resType | which resource type to enumerating. |
| func | which function to call for each resource being enumerated. |
| enumData | private data which will be passed back to the enum function. |
| resourceAlreadyOpened | is the resource already opened or should this code do it? |
| static |
Simply reads the desired resource into a handle. Does NOT use the LocaleIndex resource to get an appropriate localized resource.
| spec | which resource to read. |
| static |
Reads the requested resource into a handle. Does use the LocaleIndex resource to get an appropriate localized resource.
| spec | which resource to read. |