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

#include <IRenderingObjectApplyAction.h>

Inheritance diagram for IRenderingObjectApplyAction:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IRENDERINGOBJECTAPPLYACTION }
 

Public Member Functions

virtual void PreGraphicApply (IPMUnknown *newAttr, IAttributePrePost::ActionType attrActionType, UIDRef pageItem, IClassIDListData *, IPMUnknown *origAttr, ClassID origRendObjClassID, ClassID newRendObjClassID) const =0
 
virtual void PostGraphicApply (IPMUnknown *newAttr, IAttributePrePost::ActionType, UIDRef pageItem, IClassIDListData *, IPMUnknown *origAttr, ClassID origRendObjClassID, ClassID newRendObjClassID) const =0
 
virtual void CleanUpPageItemAttr (K2Vector< IPMUnknown * > *origAttrs, K2Vector< IPMUnknown * > *newAttrs, UIDList *pageItemList, IClassIDListData *iClassIDList)=0
 
virtual void PreTextApply (ITextModel *model, TextIndex start, int32 len, ClassID textRenderAttrClass, IFocusCache *listOfAll) const =0
 
virtual void PostTextApply (ITextModel *model, TextIndex start, int32 len, ClassID textRenderAttrClass, IFocusCache *listOfAll) const =0
 
virtual void SwapGraphicStrokeAndFill (IPMUnknown *iFillRenderingObject, ClassID fillRenderingClassID, IPMUnknown *iStrokeRenderingObject, ClassID strokeRenderingClassID, UIDRef pageItem, IClassIDListData *iAttributesModified) 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

This interface is required on rendering objects. The rendering attribute's PrePost interface will call PreGraphicApply() before the attribute is applied and PostGraphicApply() afterwards. If the original and new rendering classIDs are different it will call CleanUpPageItemAttr() in PostGraphicApply().

The SwapGraphicStrokeAndFill function is called anytime that a page item's stroke and fill need to be swapped and the rendering object class is used for one or both of the rendering objects involved.

The IClassIDListData* is used to notify the graphic state of the attributes that were changed within the Pre and Post member functions. It is a list of ClassIDs. The implementations should check to see the class they are modifying is already list (using GetIndex()). If it is not currently listed use Append(modifiedClassID) for the attribute's classID.

Member Function Documentation

virtual void IRenderingObjectApplyAction::CleanUpPageItemAttr (K2Vector< IPMUnknown * > * origAttrs,
K2Vector< IPMUnknown * > * newAttrs,
UIDListpageItemList,
IClassIDListDataiClassIDList 
)
pure virtual

This is called only if original attributes exist and are different from the ones replacing them. This is when the rendering object can clean up those attributes on the page item that are no longer needed.

Parameters
origAttrsspecifies the list of original attributes. This should be all of the same attribute class and same rendering class.
newAttrsspecifies the list of new attributes. This should be all of the same attribute class and same rendering class.
iClassIDListcontains a list of attribute class ID that were modified.
virtual void IRenderingObjectApplyAction::PostGraphicApply (IPMUnknownnewAttr,
IAttributePrePost::ActionType ,
UIDRef pageItem,
IClassIDListData,
IPMUnknownorigAttr,
ClassID origRendObjClassID,
ClassID newRendObjClassID 
) const
pure virtual

Apply whatever updates are neccessary after rendering attribute is applied.

Parameters
newAttris the new rendering attribute applied.
attrActionTypespecifies the attribute action type.
See Also
also IAttributePrePost.h
Parameters
pageItemspecifies the page item UIDRef that the attribute is applied to.
origRendObjClassIDis the corresponding orginal rendering type for the attribute.
newRendObjClassIDis the corresponding new rendering type for the attribute.
virtual void IRenderingObjectApplyAction::PostTextApply (ITextModelmodel,
TextIndex start,
int32 len,
ClassID textRenderAttrClass,
IFocusCachelistOfAll 
) const
pure virtual

Apply whatever updates are neccessary after rendering attribute is applied to text.

Parameters
modelis the affected text model.
startspecifies starting index in the text model.
lenspecifies length of the text affected in the text model.
textRenderAttrClassspecifies the text rendering attribute class being applied.
listOfAllis the text focus cache.
virtual void IRenderingObjectApplyAction::PreGraphicApply (IPMUnknownnewAttr,
IAttributePrePost::ActionType attrActionType,
UIDRef pageItem,
IClassIDListData,
IPMUnknownorigAttr,
ClassID origRendObjClassID,
ClassID newRendObjClassID 
) const
pure virtual

Apply whatever updates are neccessary before rendering attribute is applied.

Parameters
newAttris the new rendering attribute that will be applied.
attrActionTypespecifies the attribute action type.
See Also
also IAttributePrePost.h
Parameters
pageItemspecifies the page item UIDRef that the attribute will be applied to.
origRendObjClassIDis the corresponding orginal rendering type for the attribute.
newRendObjClassIDis the corresponding new rendering type for the attribute.
virtual void IRenderingObjectApplyAction::PreTextApply (ITextModelmodel,
TextIndex start,
int32 len,
ClassID textRenderAttrClass,
IFocusCachelistOfAll 
) const
pure virtual

Apply whatever updates are neccessary before rendering attribute is applied to text.

Parameters
modelis the affected text model.
startspecifies starting index in the text model.
lenspecifies length of the text affected in the text model.
textRenderAttrClassspecifies the text rendering attribute class being applied.
listOfAllis the text focus cache.
virtual void IRenderingObjectApplyAction::SwapGraphicStrokeAndFill (IPMUnknowniFillRenderingObject,
ClassID fillRenderingClassID,
IPMUnknowniStrokeRenderingObject,
ClassID strokeRenderingClassID,
UIDRef pageItem,
IClassIDListDataiAttributesModified 
) const
pure virtual

Called when the stroke and fill rendering objects are swapped. The rendering object must make sure the page item is in the correct state. One or both of the rendering objects may be of the classID of the implementor. Any attributes that are added/changed/deleted must be added to the "iAttributesModified" list. If the stroke and fill rendering classes are the same this function will only be called once. It is called twice only if the rendering classes are different.

Parameters
iFillRenderingObjectis the fill rendering object to swap with.
fillRenderingClassIDis the fill rendering class ID corresponding to iFillrenderingObject.
iStrokeRenderingObjectis the stroke rendering object to swap with.
strokeRenderingClassIDis the stroke rendering class ID corresponding to iStrokeRenderingObject.
pageItemspecifies the page item UIDRef whose fill and stroke are being swapped.
iAttributesModifiedspecifies the list of attribute modified.