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

Public Types | |
| enum | { kDefaultIID = IID_ILAYERUTILS } |
| enum | CountLayersFlags { kFlagOff = ((int32)0), kFlagOn = ((int32)1), kDontCare = ((int32)0xFFFFFFFF) } |
| enum | { kLayerNotUsed = 0x0000, kLayerContainsArtwork = 0x0001, kLayerContainsGuides = 0x0002, kLayerHasPlaceGunOwnedItem = 0x0004, kLayerContainsBoth = kLayerContainsArtwork | kLayerContainsGuides } |
Public Member Functions | |
| virtual LayerFlags | IsLayerUsed (IDocumentLayer *docLayer)=0 |
| virtual int32 | CountLayers (const ILayerList *layerList, int32 isLocked=kDontCare, int32 isVisible=kDontCare, int32 isGuideLocked=kDontCare, int32 isGuideVisible=kDontCare, int32 isUILayer=kDontCare, int32 isExpendable=kDontCare, UID colorUID=(UID) kDontCare)=0 |
| virtual bool16 | AnyLayersHidden (IDocument *document, int32 *numHidden=nil)=0 |
| virtual bool16 | AnyLayersLocked (IDocument *document, int32 *numLocked=nil)=0 |
| virtual bool16 | AreLayersUnlockedAndVisible (const UIDList *pageItems)=0 |
| virtual bool16 | IsActiveLayerUnlockedAndVisible (const ILayoutControlData *layoutData)=0 |
| virtual ICommand * | MakeUnlockShowLayerCmd (IControlView *controlView, IDocumentLayer *docLayer=nil)=0 |
| virtual UID | GetLayerUID (const IHierarchy *theItem)=0 |
| virtual IDocumentLayer * | QueryDocumentActiveLayer (const IDocument *document)=0 |
| virtual ErrorCode | GetDestinationLayers (IScriptRequestData *data, ISpread *spread, K2Vector< InterfacePtr< ISpreadLayer > > &destinationLayerList)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Utilities for use for dealing with layers on the model side.
| anonymous enum |
Enum flags for IsLayerUsed return value.
Flags to pass to CountLayers.
| pure virtual |
Determine if any UI layers in this document are hidden.
| document | the document to check. |
| numHidden | OUT the number of hidden layers, may be nil. |
| pure virtual |
Determine if any UI layers in this document are locked.
| document | the document to check. |
| numLocked | OUT the number of locked layers, may be nil. |
| pure virtual |
Determine if page items are on unlocked and visible layers (therefore are editable). Used to enable/disable clipboard or drag/drop operations.
| pageItems | UIDList of page items to check. |
| pure virtual |
Count the document layers having the specified attributes (one or more attributes may be used). Most often this will be used via the::defines at top of file.
| layerList | ILayerList* to examine. |
| isLocked | kFlagOn if you want to count IDocumentLayer->IsLocked layers, kFlagOff if you want to count unlocked layers, kDontCare otherwise |
| isVisible | kFlagOn if you want to count IDocumentLayer->IsVisible layers, kFlagOff if you want to count hidden layers, kDontCare otherwise |
| isGuideLocked | kFlagOn if you want to count IDocumentLayer->IsGuideLocked layers, kFlagOff if you want to count unlocked guide layers, kDontCare otherwise |
| isGuideVisible | kFlagOn if you want to count IDocumentLayer->IsGuideVisible layers, kFlagOff if you want to count hidden guide layers, kDontCare otherwise |
| isUILayer | kFlagOn if you want to count IDocumentLayer->IsUILayer layers, kFlagOff if you want to count non-UI layers, kDontCare otherwise |
| isExpendable | kFlagOn if you want to count IDocumentLayer->IsExpendable layers, kFlagOff if you want to count non-expendable, kDontCare otherwise |
| colorUID | UID of layers with given IDocumentLayer->GetColorUID, kDontCare otherwise. |
| pure virtual |
Handle the optional p_DestinationLayer parameter for scripting events. Returns the current active layer for the given spread if the parameter wasn't supplied for this request.
| data | IN the IScriptRequestData associated with the script request |
| spread | IN the spread to return the layer for |
| destinationLayerList | OUT the destination layer(s) |
| pure virtual |
Determine the UID of the spread layer containing the specified item by walking up the hierarchy.
| theItem | an IHierarchy* interface for the item to check its layer. |
| pure virtual |
Determine if active layer is unlocked and visible (and therefore editable). Useful to determine if active layer can be acted upon (e.g. by a tracker).
| layoutData | ILayoutControlData for the layout view to check. |
| pure virtual |
Does this layer have content on it? (Looks on all spreads and master spreads). Can be expensive, use with caution.
| docLayer | IN the document layer to check for content. |
| pure virtual |
Helper function to create a command to unlock and or show the active layer (by default) or any layer.
| controlView | IN the control view for the layout view |
| docLayer | IN nil if you want to unlock/show the active layer, or a particular layer |
| pure virtual |
Get the active document layer for the specified document. Works even when a document window isn't open.
| document | IN the document to return the active layer for. |