InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGraphicStateData Class Referenceabstract
Inheritance diagram for IGraphicStateData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGRAPHICSTATE_DATA }
 
enum  TargetType { kCurrentTarget = -1, kDefaultTarget = 0, kEyedropperTarget }
 

Public Member Functions

virtual ErrorCode Initialize (IWorkspace *)=0
 
virtual ErrorCode Initialize (IWorkspace *, ClassID)=0
 
virtual void InitializeDefaultFillRenderData (ClassID, UID)=0
 
virtual void InitializeDefaultStrokeRenderData (ClassID, UID)=0
 
virtual void InitializeDefaultAttributes (void)=0
 
virtual ErrorCode AddGraphicDefaults (const UIDList *)=0
 
virtual ErrorCode AddTextFrameDefaults (const UIDList *)=0
 
virtual ErrorCode AddGraphicFrameDefaults (const UIDList *)=0
 
virtual ErrorCode AddGroupDefaults (const UIDList *)=0
 
virtual IPMUnknownQueryAttribute (ClassID, const PMIID &, TargetType)=0
 
virtual ErrorCode AddAttribute (IPMUnknown *, TargetType)=0
 
virtual ErrorCode CopyIntoAttribute (IPMUnknown *, TargetType)=0
 
virtual ErrorCode RemoveAttribute (ClassID, TargetType)=0
 
virtual ErrorCode RemoveAllAttributes (ClassID *, uint16, TargetType)=0
 
virtual ErrorCode AddMultAttributes (IGraphicStyleAttributeBossList *, TargetType)=0
 
virtual ErrorCode SwapStrokeAndFill (TargetType)=0
 
virtual ErrorCode SetAttributeList (IGraphicStyleAttributeBossList *, TargetType)=0
 
virtual
IGraphicStyleAttributeBossList
CreateAttributeListCopy (TargetType)=0
 
virtual void SetFillClass (ClassID, TargetType)=0
 
virtual ClassID GetFillClass (TargetType)=0
 
virtual void SetStrokeClass (ClassID, TargetType)=0
 
virtual ClassID GetStrokeClass (TargetType)=0
 
virtual ErrorCode UpdateFillRenderObjectUID (ClassID, UID, TargetType)=0
 
virtual ErrorCode UpdateStrokeRenderObjectUID (ClassID, UID, TargetType)=0
 
virtual UID GetFillRenderObjectUID (ClassID, TargetType)=0
 
virtual UID GetStrokeRenderObjectUID (ClassID, TargetType)=0
 
virtual GraphicTarget * GetTarget (TargetType)=0
 
virtual void MarkPreDirty (void)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual ErrorCode IGraphicStateData::AddAttribute (IPMUnknown,
TargetType  
)
pure virtual

Add the specified the attribute in the given target type.

Parameters
iAttributethe attribute object to be added. A copy is made of the specified attribute.
targetTypethe target type from which the attribute is should be returned.
Returns
errorCode (kSuccess or an error code).
virtual ErrorCode IGraphicStateData::AddGraphicDefaults (const UIDList)
pure virtual

Add current graphic default attributes, including rendering attributes to the specified page items.

Parameters
pageItemListthe page item UID list.
virtual ErrorCode IGraphicStateData::AddGraphicFrameDefaults (const UIDList)
pure virtual

Add graphic default attributes, including rendering attributes for the specified graphic frame items.

Parameters
graphicFrametemListthe graphic frame item UID list.
virtual ErrorCode IGraphicStateData::AddGroupDefaults (const UIDList)
pure virtual

Add graphic default attributes, including rendering attributes for the specified group items.

Parameters
grouptemListthe group item UID list.
virtual ErrorCode IGraphicStateData::AddMultAttributes (IGraphicStyleAttributeBossList,
TargetType  
)
pure virtual

Add all specified attributes in the target.

Parameters
iAttributeBossListthe attribute list specified the attributes to be added.
targetTypethe target type the attributes are to be added.
Returns
errorCode (kSuccess or an error code).
virtual ErrorCode IGraphicStateData::AddTextFrameDefaults (const UIDList)
pure virtual

Add graphic default attributes, including rendering attributes for the specified text frame items.

Parameters
itemListthe UID list specifying the text frame UID items.
virtual ErrorCode IGraphicStateData::CopyIntoAttribute (IPMUnknown,
TargetType  
)
pure virtual

Copy the specified the attribute in the given target type. If the attribute already exists, the content is copied. If attribute does not exist, it is added.

Parameters
iAttributethe attribute object to be copied.
targetTypethe target type from which the attribute is should be returned.
Returns
errorCode (kSuccess or an error code).
virtual IGraphicStyleAttributeBossList* IGraphicStateData::CreateAttributeListCopy (TargetType )
pure virtual

return a copy of the attributes in the given target. Caller should release the attribute boss list when done.

Parameters
targetTypethe target type the rendering data should be swapped.
Returns
IGraphicStyleAttributeBossList* or nil.
virtual ClassID IGraphicStateData::GetFillClass (TargetType )
pure virtual

Returns the current rendering class for the given target.

Parameters
targetTypethe target type the rendering data should be returned.
Returns
renderClassID
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().
virtual UID IGraphicStateData::GetFillRenderObjectUID (ClassID ,
TargetType  
)
pure virtual

Returns the fill rendering UID of the specified rendering class in the target.

Parameters
renderClassIDthe fill rendering class ID to update.
targetTypethe target type the rendering data should be updated.
Returns
renderUID the fill rendering UID returned.
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().
virtual ClassID IGraphicStateData::GetStrokeClass (TargetType )
pure virtual

Returns the current rendering class for the given target.

Parameters
targetTypethe target type the rendering data should be returned.
Returns
renderClassID
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().
virtual UID IGraphicStateData::GetStrokeRenderObjectUID (ClassID ,
TargetType  
)
pure virtual

Returns the stroke rendering UID of the specified rendering class in the target.

Parameters
renderClassIDthe stroke rendering class ID to update.
targetTypethe target type the rendering data should be updated.
Returns
renderUID the stroke rendering UID returned.
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().
virtual GraphicTarget* IGraphicStateData::GetTarget (TargetType )
pure virtual

Returns the GraphicTarget for the specified target type.

Parameters
targetTypethe target type to get.
Returns
the pointer to the graphic target.
virtual ErrorCode IGraphicStateData::Initialize (IWorkspace)
pure virtual

Initializes the graphic state data in the specified workspace. Used during graphic state creation.

Parameters
workspacethe workspace to create the persistent graphic state data.
Returns
kSucess if succeed or an error code.
virtual ErrorCode IGraphicStateData::Initialize (IWorkspace,
ClassID  
)
pure virtual

Called to initialize the default rendering data for a specific rendering object class in an existing workspace. This is useful when a new type of rendering object has been added to the document.

Parameters
workspacethe workspace to operate on
classidthe class id of the kRenderClassProviderImpl to create default rendering UID.
Returns
kSucess if succeed or an error code.
virtual void IGraphicStateData::InitializeDefaultAttributes (void )
pure virtual

Initialize the default attributes for the graphic state.

virtual void IGraphicStateData::InitializeDefaultFillRenderData (ClassID ,
UID  
)
pure virtual

Initialize the default fill rendering object for the specified rendering class.

Parameters
renderClassIDthe rendering object class.
renderUIDthe rendering UID for the renderClassID.
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().
virtual void IGraphicStateData::InitializeDefaultStrokeRenderData (ClassID ,
UID  
)
pure virtual

Initialize the default fill rendering object for the specified rendering class.

Parameters
renderClassIDthe rendering object class.
renderUIDthe rendering UID for the renderClassID.
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().
virtual void IGraphicStateData::MarkPreDirty (void )
pure virtual

Mark data dirty.

virtual IPMUnknown* IGraphicStateData::QueryAttribute (ClassID ,
const PMIID,
TargetType  
)
pure virtual

Return the attribute of a given target type. The caller is responsible for releasing the attribute when done.

Parameters
attrClassIDthe attribute class to be returned.
attrInterfaceIIDthe attribute's interface IID to be returned.
targetTypethe target type from which the attribute is should be returned.
Returns
IPMUnknown* of the attribute.
virtual ErrorCode IGraphicStateData::RemoveAllAttributes (ClassID,
uint16 ,
TargetType  
)
pure virtual

Remove all specified attributes. If the list is nil, then all attributes in the target are removed.

Parameters
attrClassListthe attribute class list specified the attribute classes to be removed.
attrCountthe number attributes in the attrClassList.
targetTypethe target type from which the attributes are to be removed.
Returns
errorCode (kSuccess or an error code).
virtual ErrorCode IGraphicStateData::RemoveAttribute (ClassID ,
TargetType  
)
pure virtual

Remove the attribute from the given target type.

Parameters
iAttributethe attribute object to be removed.
targetTypethe target type from which the attribute is should be returned.
Returns
errorCode (kSuccess or an error code).
Precondition
iAttribute must already exist in the target type. If attribute does not exist, an error code is returned.
virtual ErrorCode IGraphicStateData::SetAttributeList (IGraphicStyleAttributeBossList,
TargetType  
)
pure virtual

Replace the attributes in the target with the given attribute boss list.

Parameters
iAttributeBossListthe attribute list specified the attributes to replace.
targetTypethe target type the rendering data should be swapped.
Returns
errorCode (kSuccess or an error code).
virtual void IGraphicStateData::SetFillClass (ClassID ,
TargetType  
)
pure virtual

Set the current fill rendering class for the given target.

Parameters
renderClassIDthe fill rendering class ID to set.
targetTypethe target type the rendering data should be set.
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().
virtual void IGraphicStateData::SetStrokeClass (ClassID ,
TargetType  
)
pure virtual

Set the current stroke rendering class for the given target.

Parameters
renderClassIDthe stroke rendering class ID to set.
targetTypethe target type the rendering data should be set.
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().
virtual ErrorCode IGraphicStateData::SwapStrokeAndFill (TargetType )
pure virtual

Swap the current stroke and fill rendering data in the target.

Parameters
targetTypethe target type the rendering data should be swapped.
Returns
errorCode (kSuccess or an error code).
virtual ErrorCode IGraphicStateData::UpdateFillRenderObjectUID (ClassID ,
UID ,
TargetType  
)
pure virtual

Update the fill rendering data of the specified rendering class in the target.

Parameters
renderUIDthe fill rendering UID to update to.
renderClassIDthe fill rendering class ID to update.
targetTypethe target type the rendering data should be updated.
Returns
kSuccess or kFailure.
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().
virtual ErrorCode IGraphicStateData::UpdateStrokeRenderObjectUID (ClassID ,
UID ,
TargetType  
)
pure virtual

Update the stroke rendering data of the specified rendering class in the target.

Parameters
renderUIDthe stroke rendering UID to update to.
renderClassIDthe stroke rendering class ID to update.
targetTypethe target type the rendering data should be updated.
Returns
kSuccess or kFailure.
Precondition
renderClassID must be one of the rendering classes initialized during Initialize().