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

Public Types | |
| enum | { kDefaultIID = IID_IGRAPHICLAYERINFO } |
| enum | UpdateLinkOption { kUnknownLinkOption = 0, kUseApplicationSettings, kKeepOverrides } |
| enum | GraphicLayerFlags { kNoFlags = 0, kNeedsValidation = (1L << 1), kValidationFailed = (1L << 2), kValidationNewLayersAdded = (1L << 3), kInternalUseOnly = (1L << 28) } |
| enum | GraphicVisibilityState { kVisibilityHidden, kVisibilityShowing, kVisibilityUnknown } |
| enum | LayerAttributes { kNoAttributes = 0, kLayerSeparator = (1L << 0), kLayerAdjustment = (1L << 1), kLayerHasFX = (1L << 2), kLayerIsLocked = (1L << 3), kLayerHasViewState = (1L << 4), kLayerViewStateON = (1L << 5), kLayerHasExportState = (1L << 6), kLayerExportStateON = (1L << 7), kLayerHasPrintState = (1L << 8), kLayerPrintStateON = (1L << 9), kLayerSectionDivider = (1L << 10), kLayerIsTextLayer = (1L << 11) } |
Public Member Functions | |
| virtual void | SetIsInitialized (bool16 bIsInitialized)=0 |
| virtual void | SetUpdateLinkOption (const UpdateLinkOption newOption)=0 |
| virtual void | SetGraphicLayerFlags (const GraphicLayerFlags newFlags)=0 |
| virtual bool16 | GetIsInitialized () const =0 |
| virtual UpdateLinkOption | GetUpdateLinkOption () const =0 |
| virtual GraphicLayerFlags | GetGraphicLayerFlags () const =0 |
| virtual void | InsertLayer (const PMString &layerName, int32 layerUniqueID, const GraphicVisibilityState origVisState, int32 parentID=-1, const LayerAttributes layerAttributes=kNoAttributes)=0 |
| virtual void | AppendLayer (const PMString &layerName, int32 layerUniqueID, const GraphicVisibilityState origVisState, int32 parentID=-1, const LayerAttributes layerAttributes=kNoAttributes)=0 |
| virtual void | RemoveNthLayer (int32 layerIndex)=0 |
| virtual void | RemoveLayer (int32 layerUniqueID)=0 |
| virtual void | Clear ()=0 |
| virtual void | Copy (const IGraphicLayerInfo *srcLayerInfo)=0 |
| virtual bool16 | CompareAll (const IGraphicLayerInfo *otherLayerInfo) const =0 |
| virtual bool16 | CompareVisibility (const IGraphicLayerInfo *otherLayerInfo) const =0 |
| virtual bool16 | ValidateGraphicLayers (const IGraphicLayerInfo *srcLayerInfo)=0 |
| virtual bool16 | VisibilityChanged () const =0 |
| virtual void | ResetLayerVisiblity ()=0 |
| virtual void | Preallocate (int32 preallocSize)=0 |
| virtual void | SetNthLayerName (int32 layerIndex, const PMString &newName)=0 |
| virtual void | SetLayerName (int32 layerUniqueID, const PMString &newName)=0 |
| virtual void | SetNthLayerUniqueID (int32 layerIndex, int32 newID)=0 |
| virtual void | SetNthLayerOriginalVisibility (int32 layerIndex, const GraphicVisibilityState newState)=0 |
| virtual void | SetLayerOriginalVisibility (int32 layerUniqueID, const GraphicVisibilityState newState)=0 |
| virtual void | SetNthLayerCurrentVisibility (int32 layerIndex, const GraphicVisibilityState newState)=0 |
| virtual void | SetLayerCurrentVisibility (int32 layerUniqueID, const GraphicVisibilityState newState)=0 |
| virtual void | SetNthLayerParentID (int32 layerIndex, int32 newParentID)=0 |
| virtual void | SetLayerParentID (int32 layerUniqueID, int32 newParentID)=0 |
| virtual void | SetNthLayerAttributes (int32 layerIndex, const LayerAttributes newAttributes)=0 |
| virtual void | SetLayerAttributes (int32 layerUniqueID, const LayerAttributes newAttributes)=0 |
| virtual int32 | GetNumberLayers () const =0 |
| virtual PMString | GetNthLayerName (int32 layerIndex) const =0 |
| virtual PMString | GetLayerName (int32 layerUniqueID) const =0 |
| virtual int32 | GetNthLayerUniqueID (int32 layerIndex) const =0 |
| virtual int32 | GetLayerIndex (int32 layerUniqueID) const =0 |
| virtual GraphicVisibilityState | GetNthLayerOriginalVisibility (int32 layerIndex) const =0 |
| virtual GraphicVisibilityState | GetLayerOriginalVisibility (int32 layerUniqueID) const =0 |
| virtual GraphicVisibilityState | GetNthLayerCurrentVisibility (int32 layerIndex) const =0 |
| virtual GraphicVisibilityState | GetLayerCurrentVisibility (int32 layerUniqueID) const =0 |
| virtual int32 | GetNthLayerParentID (int32 layerIndex) const =0 |
| virtual int32 | GetLayerParentID (int32 layerUniqueID) const =0 |
| virtual LayerAttributes | GetNthLayerAttributes (int32 layerIndex) const =0 |
| virtual LayerAttributes | GetLayerAttributes (int32 layerUniqueID) const =0 |
| virtual bool16 | ValidateGraphicLayersByName (const IGraphicLayerInfo *srcLayerInfo)=0 |
| virtual void | SetLayerVisibilityFromSource (const IGraphicLayerInfo *srcLayerInfo, GraphicVisibilityState newLayersState, bool16 &hasNewLayers)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
An interface for holding the graphic layer information for placed graphics such as Photoshop (PSD) files. This assumes that all layer names are unique.
This enum is a bitfield for flags controlling the layer information.
This enum is a bitfield for the attributes of the layer.
This enum is a bitfield for the update link options.
| pure virtual |
Append a layer to the interface. The layer will be appended onto the end of the list. It is assumed that all layers are uniquely IDed.
| layerName | IN a PMString containing a layer name. |
| layerUniqueID | IN a unique ID that can represent the layer |
| origVisState | IN the original visibility state at the time the layer is added. The current visibility state is set to the original visibility state when the layer is added. |
| parentID | IN the unique ID of the parent layer, if this layer is nested. Default of -1. |
| layerAttributes | IN a enum bitfield of the layer attributes. Default of kNoAttributes, or 0. |
| pure virtual |
Clear all layers out of the interface.
| pure virtual |
Compare all information from the given interface to this interface.
| otherLayerInfo | IN the other IGraphicLayerInfo to compare to. |
| pure virtual |
Uses the unique ids from the given interface to compare the current visibility in this interface to the current visibility of the other interface.
| otherLayerInfo | IN the other IGraphicLayerInfo to compare to. |
| 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.
| srcLayerInfo | IN the source IGraphicLayerInfo to copy from. |
| pure virtual |
Get the current graphic layer flags.
| pure virtual |
Get if the interface has been initialized.
| pure virtual |
Get the attributes of the layer with the given name.
| layerUniqueID | IN the unique ID of the layer to retrieve. |
| pure virtual |
Get the current visibility state of the layer with the given name.
| layerUniqueID | IN the unique ID of the layer to retrieve. |
| pure virtual |
Get the index of the layer with the given unique ID.
| layerUniqueID | IN the unique ID of the layer to retrieve. |
| pure virtual |
Get the name of the layer with the given unique ID.
| layerUniqueID | IN the unique ID of the layer to retrieve. |
| pure virtual |
Get the original visibility state of the layer with the given name.
| layerUniqueID | IN the unique ID of the layer to retrieve. |
| pure virtual |
Get the parent index of the layer with the given name.
| layerUniqueID | IN the unique ID of the layer to retrieve. |
| pure virtual |
Get the attributes bitfield of the layer of the given layer index.
| layerIndex | IN the index of the layer attributes to retrieve. |
| pure virtual |
Get the current visibility state of the layer of the given layer index.
| layerIndex | IN the index of the layer state to retrieve. |
| pure virtual |
Get the name of the layer of the given layer index.
| layerIndex | IN the index of the layer name to retrieve. |
| pure virtual |
Get the original visibility state of the layer of the given layer index.
| layerIndex | IN the index of the layer state to retrieve. |
| pure virtual |
Get the parent index of the layer of the given layer index.
| layerIndex | IN the index of the layer parent index to retrieve. |
| pure virtual |
Get the unique ID of the layer of the given layer index.
| layerIndex | IN the index of the layer ID to retrieve. |
| pure virtual |
Get the number of layers currently stored in the interface. For use when iterating through the layers, setting or getting specific information.
| pure virtual |
Get the current update link option.
| pure virtual |
Insert a layer into the interface. The layer will be inserted into the front of the list. It is assumed that all layers are uniquely IDed.
| layerName | IN a PMString containing a layer name. |
| layerUniqueID | IN a unique ID that can represent the layer |
| origVisState | IN the original visibility state at the time the layer is added. The current visibility state is set to the original visibility state when the layer is added. |
| parentID | IN the unique ID of the parent layer, if this layer is nested. Default of -1. |
| layerAttributes | IN a enum bitfield of the layer attributes. Default of kNoAttributes, or 0. |
| pure virtual |
Preallocate the layer list to this size. If it is known before hand how many layers will be added to the interface, use this to preallocate the number of entries.
| preallocSize | IN the number of entries that will be added to the list. |
| pure virtual |
Remove a layer from the interface.
| layerUniqueID | IN the ID of the layer to remove. Layer IDs are assumed to be unique. |
| pure virtual |
Remove a layer from the interface.
| layerIndex | IN the index of the layer to remove. |
| pure virtual |
Resets the current visibility state to the original visibility state for all layers.
| pure virtual |
Set new graphic layer flags. It is the callers responsibility to OR in their new flag with the existing flags, retrieved through GetGraphicLayerFlags().
| newFlags | IN see the enum GraphicLayerFlags for values. |
| pure virtual |
Set if the interface has been initialized.
| bIsInitialized | IN kTrue if the layer information has been initialized. |
| pure virtual |
Set the layer attributes of a given layer name. The attributes are overwritten, so use GetLayerAttributes(), and turn on/off bits as desired prior to calling this method.
| layerUniqueID | IN the unique ID of the layer to change. |
| newAttributes | IN the new attributes to be given to the layer. |
| pure virtual |
Set the layer current visibility state of a given layer name.
| layerUniqueID | IN the unique ID of the layer to change. |
| newState | IN the new current visibility state to be given to the layer. |
| pure virtual |
Set the layer name of a layer with the given unique ID.
| layerUniqueID | IN the unique ID of the layer to change. |
| newName | IN the new name of the layer. |
| pure virtual |
Set the layer original visibility state of a given layer name.
| layerUniqueID | IN the unique ID of the layer to change. |
| newState | IN the new original visibility state to be given to the layer. |
| pure virtual |
Set the parent index of a given layer name.
| layerUniqueID | IN the unique ID of the layer to change. |
| newParentID | IN the new parent's unique ID to be given to the layer. |
| pure virtual |
Set the current visibility of the layers from the source layers. This method matches layers based on layer name and not index.
| srcLayerInfo | IN the layer info to copy visibility state from |
| newLayerState | IN the visibility state to use for layers not present in source (new layers). Pass in kVisibilityUnknown if you want to retain the new layers original visibility. hasNewLayers OUT kTrue, if the target layers contain additional new layers |
| pure virtual |
Set the layer attributes of a given layer index. The attributes are overwritten, so use GetLayerAttributes(), and turn on/off bits as desired prior to calling this method.
| layerIndex | IN the index of the layer to change. |
| newAttributes | IN the new attributes to be given to the layer. |
| pure virtual |
Set the layer current visibility state of a given layer index.
| layerIndex | IN the index of the layer to change. |
| newState | IN the new current visibility state to be given to the layer. |
| pure virtual |
Set the layer name of a given layer index.
| layerIndex | IN the index of the layer to rename. |
| newName | IN the new name to be given to the layer |
| pure virtual |
Set the layer original visibility state of a given layer index.
| layerIndex | IN the index of the layer to change. |
| newState | IN the new original visibility state to be given to the layer. |
| pure virtual |
Set the parent index of a given layer index.
| layerIndex | IN the index of the layer to change. |
| newParentID | IN the new parent's unique ID to be given to the layer. |
| pure virtual |
Set the layer unique ID of a given layer index.
| layerIndex | IN the index of the layer to change. |
| newID | IN the new ID to be given to the layer. Does not change the index of the layer, only the internal unique ID stored with the layer. |
| pure virtual |
Set the update link option. See the UpdateLinkOption enum for options.
| newOption | IN see the enum UpdateLinkOption for values. |
| pure virtual |
Validate the graphic layers with another interface. Will compare the layer IDs and layer names based on the IDs, and if they all match it will return kTrue. NOTE: it compares based on the srcLayerInfo number of layers - this interface may have more layers, but it will only compare based on srcLayerInfo.
| srcLayerInfo | IN the source IGraphicLayerInfo to use. |
| pure virtual |
Validate the graphic layers with another interface. Will compare the layer IDs and layer names based on the IDs, and if they all match it will return kTrue. NOTE: it compares based on the srcLayerInfo number of layers - this interface may have more layers, but it will only compare based on srcLayerInfo. Used for PDF and placed InDesign document graphics items.
| srcLayerInfo | IN the source IGraphicLayerInfo to use. |
| pure virtual |
Compare the original visibility to the current visibility in this interface.