InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPSDLayerCompInfo Class Referenceabstract

#include <IPSDLayerCompInfo.h>

Inheritance diagram for IPSDLayerCompInfo:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPSDLAYERCOMPINFO }
 
enum  { kCustomLayerCompID = -2, kLastDocStateCompID = -1 }
 

Public Member Functions

virtual void Clear ()=0
 
virtual void Copy (const IPSDLayerCompInfo *srcCompInfo)=0
 
virtual void Preallocate (int32 numberComps)=0
 
virtual void InsertLayerComp (const PMString &layerCompName, const PMString &layerCompComment, int32 layerCompID, LayerVisibilityList &layerVisibilityList)=0
 
virtual void AppendLayerComp (const PMString &layerCompName, const PMString &layerCompComment, int32 layerCompID, LayerVisibilityList &layerVisibilityList)=0
 
virtual void RemoveLayerComp (int32 layerCompID)=0
 
virtual bool16 ValidateLayerComp (const IPSDLayerCompInfo *srcCompInfo)=0
 
virtual bool16 LayerCompChanged () const =0
 
virtual void SetOriginalLastAppliedCompID (int32 layerCompID)=0
 
virtual void SetCurrentLastAppliedCompID (int32 layerCompID)=0
 
virtual int32 GetNumberLayerComps () const =0
 
virtual PMString GetLayerCompName (int32 layerCompID) const =0
 
virtual PMString GetNthLayerCompName (int32 index) const =0
 
virtual PMString GetLayerCompComment (int32 layerCompID) const =0
 
virtual PMString GetNthLayerCompComment (int32 index) const =0
 
virtual LayerVisibilityList GetLayerCompVisibilityList (int32 layerCompID) const =0
 
virtual LayerVisibilityList GetNthLayerCompVisibilityList (int32 index) const =0
 
virtual int32 GetLayerCompIndex (int32 layerCompID) const =0
 
virtual int32 GetNthLayerCompID (int32 index) const =0
 
virtual int32 GetOriginalLastAppliedCompID () const =0
 
virtual int32 GetCurrentLastAppliedCompID () const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

An interface for holding a native Photoshop file's (PSD) layer comp information which has been read out and parsed from the 0x0429 image resource.

Member Enumeration Documentation

anonymous enum

This enum is a bitfield for first two Layer Comp options.
Enumerator
kCustomLayerCompID 

[Custom]

kLastDocStateCompID 

Last Document State

Member Function Documentation

virtual void IPSDLayerCompInfo::AppendLayerComp (const PMStringlayerCompName,
const PMStringlayerCompComment,
int32 layerCompID,
LayerVisibilityListlayerVisibilityList 
)
pure virtual

Append a layer comp onto the interface. The layer comp will be appended onto the end of the list. It is assumed that all layer comps are uniquely IDed.

Parameters
layerCompNameIN a PMString containing a layer comp name.
layerCompCommentIN a PMString containing a layer comp comment.
layerCompIDIN a unique ID that can represent the layer comp
layerVisibilityListIN a LayerVisibilityList containing the key/value pairs denoting the layer visibility for each layer, as defined by the layer comp.
virtual void IPSDLayerCompInfo::Clear ()
pure virtual

Clear all layer comps out of the interface.

virtual void IPSDLayerCompInfo::Copy (const IPSDLayerCompInfosrcCompInfo)
pure virtual

Copy all information from the given interface into this interface. This will perform a Clear() on the existing information prior to the copy.

Parameters
srcCompInfoIN the source IPSDLayerCompInfo to copy from.
virtual int32 IPSDLayerCompInfo::GetCurrentLastAppliedCompID () const
pure virtual

Get the ID of the currently applied layer comp.

Returns
int32 of the currently applied layer comp ID. May be -1 for Last Document State or -2 for [Custom] - means no layer comp currently applied.
virtual PMString IPSDLayerCompInfo::GetLayerCompComment (int32 layerCompID) const
pure virtual

Get the comment for the layer comp with the given unique ID.

Parameters
layerCompIDIN the unique ID of the layer comp to retrieve.
Returns
PMString of the layer comp comment.
virtual int32 IPSDLayerCompInfo::GetLayerCompIndex (int32 layerCompID) const
pure virtual

Get the index of the layer comp with the given unique ID.

Parameters
layerCompIDIN the unique ID of the layer comp to retrieve.
Returns
int32 of the layer comp's index.
virtual PMString IPSDLayerCompInfo::GetLayerCompName (int32 layerCompID) const
pure virtual

Get the name of the layer comp with the given unique ID.

Parameters
layerCompIDIN the unique ID of the layer comp to retrieve.
Returns
PMString of the layer comp name.
virtual LayerVisibilityList IPSDLayerCompInfo::GetLayerCompVisibilityList (int32 layerCompID) const
pure virtual

Get the LayerVisibilityList for the layer comp with the given unique ID.

Parameters
layerCompIDIN the unique ID of the layer comp to retrieve.
Returns
LayerVisibilityList of the layer comp comment. The LayerVisibilityList is a vector of key/value pairs containing layer IDs and visibilities on/off for each layer.
virtual PMString IPSDLayerCompInfo::GetNthLayerCompComment (int32 index) const
pure virtual

Get the comment for the layer comp of the given layer comp index.

Parameters
indexIN the index of the layer comp to retrieve.
Returns
PMString of the layer comp comment.
virtual int32 IPSDLayerCompInfo::GetNthLayerCompID (int32 index) const
pure virtual

Get the unique ID of the layer comp of the given layer comp index.

Parameters
indexIN the index of the layer comp ID to retrieve.
Returns
int32 of the layer comp's unique ID (see InsertLayerComp() above).
virtual PMString IPSDLayerCompInfo::GetNthLayerCompName (int32 index) const
pure virtual

Get the name of the layer comp of the given layer comp index.

Parameters
indexIN the index of the layer comp to retrieve.
Returns
PMString of the layer comp name.
virtual LayerVisibilityList IPSDLayerCompInfo::GetNthLayerCompVisibilityList (int32 index) const
pure virtual

Get the LayerVisibilityList for the layer comp of the given layer comp index.

Parameters
indexIN the index of the layer comp to retrieve.
Returns
LayerVisibilityList of the layer comp comment. The LayerVisibilityList is a vector of key/value pairs containing layer IDs and visibilities on/off for each layer.
virtual int32 IPSDLayerCompInfo::GetNumberLayerComps () const
pure virtual

Get the number of layers comps currently stored in the interface. For use when iterating through the layer comps, setting or getting specific information.

Returns
int32 of the number of layer comps.
virtual int32 IPSDLayerCompInfo::GetOriginalLastAppliedCompID () const
pure virtual

Get the ID of the originally applied layer comp.

Returns
int32 of the originally applied layer comp ID. May be -1 for Last Document State - means no layer comp originally applied.
virtual void IPSDLayerCompInfo::InsertLayerComp (const PMStringlayerCompName,
const PMStringlayerCompComment,
int32 layerCompID,
LayerVisibilityListlayerVisibilityList 
)
pure virtual

Insert a layer comp into the interface. The layer comp will be inserted into the front of the list. It is assumed that all layer comps are uniquely IDed.

Parameters
layerCompNameIN a PMString containing a layer comp name.
layerCompCommentIN a PMString containing a layer comp comment.
layerCompIDIN a unique ID that can represent the layer comp
layerVisibilityListIN a LayerVisibilityList containing the key/value pairs denoting the layer visibility for each layer, as defined by the layer comp.
virtual bool16 IPSDLayerCompInfo::LayerCompChanged () const
pure virtual

See if the layer comp has changed.

Returns
bool16 - kTrue if there is a currently applied layer comp and it is different from the originally applied layer comp, kFalse if not.
virtual void IPSDLayerCompInfo::Preallocate (int32 numberComps)
pure virtual

Preallocate the layer comp list to this size. If it is known before hand how many layer comps will be added to the interface, use this to preallocate the number of entries.

Parameters
numberCompsIN the number of entries that will be added to the list.
virtual void IPSDLayerCompInfo::RemoveLayerComp (int32 layerCompID)
pure virtual

Remove a layer from the interface.

Parameters
layerCompIDIN the ID of the layer comp to remove.
virtual void IPSDLayerCompInfo::SetCurrentLastAppliedCompID (int32 layerCompID)
pure virtual

Set the current applied layer comp ID.

Parameters
layerCompIDIN the ID of the currently applied layer comp.
virtual void IPSDLayerCompInfo::SetOriginalLastAppliedCompID (int32 layerCompID)
pure virtual

Set the original applied layer comp ID.

Parameters
layerCompIDIN the ID of the originally applied layer comp.
virtual bool16 IPSDLayerCompInfo::ValidateLayerComp (const IPSDLayerCompInfosrcCompInfo)
pure virtual

Check if the currently applied layer comp in the given IPSDLayerCompInfo exists in the given IPSDLayerCompInfo interface.

Parameters
srcCompInfoIN the source IPSDLayerCompInfo to use.
Returns
bool16 - kTrue if the current applied layer comp exists, kFalse otherwise.