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

#include <ISpreadLayer.h>

Inheritance diagram for ISpreadLayer:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISPREADLAYER }
 

Public Member Functions

virtual void SetDocLayer (IDocumentLayer *docLayer)=0
 
virtual IDocumentLayerQueryDocLayer () const =0
 
virtual UID GetDocLayerUID () const =0
 
virtual void GetName (PMString *pName) const =0
 
virtual UID GetColorUID () const =0
 
virtual void SetIsGuideLayer (bool16 isGuideLayer)=0
 
virtual bool16 GetIsGuideLayer () const =0
 
virtual bool16 IsLocked () const =0
 
virtual bool16 IsVisible () const =0
 
virtual bool16 IsPrintable () const =0
 
virtual void Inval (GraphicsData *gd, ClassID reasonForInval=0, int32 flags=0)=0
 
virtual bool16 GetIgnoreTextWrapWhenNotVisible (void) 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

Interface that represents a spread layer.

InDesign and its derivatives supports document-wide layers. This means each layer exists on all spreads and the z-order and attributes of the layers are the same on every spread.

The ISpreadLayer interface is aggregated into a Spread Layer boss (kSpreadLayerBoss). The is a spread layer boss for each individual document layer (kDocumentLayerBoss) on each spread; for instance, a document with 2 spreads and 3 layers has 6 spread layer boss objects.

The spread layer boss (kSpreadLayerBoss) serves two purposes. First as a page item in the display hierarchy, its IHierarchy interface holds the UIDs of all the items on the layer. Second, the ISpreadLayer interface maintains a relationship back to the corresponding document layer boss.

The ISpreadLayer interface primarily just provides "getter" methods that forward the request for information to the corresponding IDocumentLayer interface (i.e. GetName, GetColorUID, IsLocked, etc.).

See Also
kSpreadLayerBoss

Member Function Documentation

virtual UID ISpreadLayer::GetColorUID () const
pure virtual

Return the layer color (used for as selection hilite color for items on this layer).

Returns
UID of a color to use for handle drawing. See IUIColorUtils.
virtual UID ISpreadLayer::GetDocLayerUID () const
pure virtual

Returns the UID of the associated layer in the document.

Returns
UID of associated document layer.
virtual bool16 ISpreadLayer::GetIgnoreTextWrapWhenNotVisible (void ) const
pure virtual

Get whether or not text wrap items on this layer will be ignored when the layer is invisible. Corresponds to the Suppress Text Wrap When Layer is Hidden checkbox from Layer Options dialog.

Returns
kTrue if items will be ignored, kFalse if they are included.
virtual bool16 ISpreadLayer::GetIsGuideLayer () const
pure virtual

Return whether the layer is a guide-only layer, which will be suppressed from display in the Layer palette.

Returns
kTrue if a guide spread layer (guides can be on this layer) or kFalse if not a guide layer (where regular page items live)
virtual void ISpreadLayer::GetName (PMStringpName) const
pure virtual

Return the name of the document-wide layer.

Parameters
pNamefills in the name of the document layer. Must be non-nil.
virtual void ISpreadLayer::Inval (GraphicsDatagd,
ClassID reasonForInval = 0,
int32 flags = 0 
)
pure virtual

Invalidates all the child items on this spread. Should be used carefully, generally the right way to do this inval is with IShape->Inval on kLayerShapeImpl.

Parameters
gdGraphicsData to provide a context for drawing
reasonForInvalGenerally the ClassID of the command that called this method (theChange).
flagsFlags from IShape.
virtual bool16 ISpreadLayer::IsLocked () const
pure virtual

Return whether the layer is locked or not. This is indicated by a lock symbol to the left of the layer name in the Layers palette. Function actually forwards question to the associated document layer. A spread layer is locked when its document layer is locked.

Returns
kTrue if a layer is locked (won't be hittested), kFalse if not locked.
virtual bool16 ISpreadLayer::IsPrintable () const
pure virtual

Return whether the layer is printable or not. Function actually forwards question to the associated document layer. A spread layer is printable when its document layer is printable.

Returns
kTrue if a layer is printable, kFalse if not.
virtual bool16 ISpreadLayer::IsVisible () const
pure virtual

Return whether the layer is visible or not. This is indicated by an eyeball symbol to the left of the layer name in the Layers palette. Function actually forwards question to the associated document layer. A spread layer is visible when its document layer is visible.

Returns
kTrue if a layer is visible, kFalse if hidden (won't be hittested or be drawn).
virtual IDocumentLayer* ISpreadLayer::QueryDocLayer () const
pure virtual

Returns a pointer to the associated document layer in the document

Returns
"Query" prefix means the caller must Release!
virtual void ISpreadLayer::SetDocLayer (IDocumentLayerdocLayer)
pure virtual

The document layer should only be set once, when the spread layer is created. It's expected to never change. Really for private use by the kNewLayerCmdBoss.

NOTE: Read class description for background info.

Parameters
docLayerThe document layer this spread layer is associated with.
virtual void ISpreadLayer::SetIsGuideLayer (bool16 isGuideLayer)
pure virtual

Set that a layer is a guide-only layer. This method should only be called by code that is creating new layers, not on an existing layer (e.g. only by kNewLayerCmdBoss)

Parameters
isGuideLayerkFalse for non-guide spread layers, kTrue for spread guide layers.