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

#include <IGraphicStateUtils.h>

Inheritance diagram for IGraphicStateUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGRAPHICSTATEUTILS }
 

Public Member Functions

virtual ErrorCode ProcessGfxStateApplyAttribute (IPMUnknown *iNewAttribute, ISelectionManager *iSelectionMgr=nil)=0
 
virtual ErrorCode ProcessGfxStateApplyAttribute (IPMUnknown *iNewAttribute, IGraphicAttributeSuite *iGraphicAttrSuite=nil)=0
 
virtual ErrorCode ProcessGfxStateAddMultAttributes (IGraphicStyleAttributeBossList *iNewAttrList, IGraphicAttributeSuite *iGraphicAttrSuite=nil)=0
 
virtual ErrorCode ProcessGfxStateRemoveAttributes (ClassID *pClassList, uint16 attributeCount, IGraphicAttributeSuite *iGraphicAttrSuite=nil)=0
 
virtual ICommandCreateAttributeCommand (const IPMUnknown *attribute, const UIDList *pTargetItemList, bool16 doPrePost, bool16 enableDoNotify)=0
 
virtual ICommandCreateGfxClearOverrideCommand (ClassID attributeClassID, const UIDList *targetItemList, bool16 enableDoNotify)=0
 
virtual ICommandCreateGfxApplyOverrideCommand (ClassID renderObjectClassID, UID renderUID, ClassID attributeClassID, const UIDList &targetItemList, bool16 doPrePost, bool16 enableDoNotify)=0
 
virtual ICommandCreateGfxSwapStrokeAndFillCommand (const UIDList &targetItemList)=0
 
virtual ICommandCreateTextSwapStrokeAndFillCommand (ITextModel *iTextModel, ITextFocus *iTextFocus)=0
 
virtual void TransferAttributesModified (ICommand *iSourceCommand, IClassIDListData *iDestAttrModified)=0
 
virtual void AppendAttributesModified (ClassID attributeModified, IClassIDListData *iDestAttrModified)=0
 
virtual ErrorCode ProcessApplyTargetAttributesToPageItems (IGraphicStyleAttributeBossList *iNewAttrList, ClassID *pClassList, int32 attrCount, const UIDList &targetItemList, bool16 doPrePost=kTrue, bool16 enableDoNotify=kTrue)=0
 
virtual ErrorCode ProcessSwapStrokeAndFillCmdSequence (IGraphicAttributeSuite *iGraphicAttrSuite=nil)=0
 
virtual ErrorCode ProcessDefaultStrokeAndFillCmdSequence (IGraphicAttributeSuite *=nil)=0
 
virtual ErrorCode ProcessToggleStrokeAndFillCmd (void)=0
 
virtual ErrorCode ProcessUpdateDefinitionRenderDataCmdSequence (ClassID renderObjectClassID, UID renderUID, bool16 isFill, IGraphicAttributeSuite *iGfxAttrSuite=nil)=0
 
virtual IPMUnknownQueryActiveGraphicState (const PMIID &requestedIID=IID_IUNKNOWN, IActiveContext *iActiveContext=nil)=0
 
virtual IPMUnknownQueryGraphicState (IDataBase *iDataBase, const PMIID &requestedIID=IID_IUNKNOWN)=0
 
virtual IWorkspaceQueryDataBaseWorkspace (IDataBase *iDataBase)=0
 
virtual UIDListCreateFlattenedPageItemList (const UIDList *pItemList, const PMIID &interestedIID, bool16 onlyIncludeGfxStateSelection)=0
 
virtual bool16 IsStrokeActive (void)=0
 
virtual bool16 IsFillActive (void)=0
 
virtual IGraphicAttributeSuiteQueryActiveGraphicAttrSuite (ISelectionManager *iSelectionMgr=nil)=0
 
virtual void UpdateGfxStateRenderObjectsRenderData (ClassID renderObjectClassID, IGraphicAttributeSuite *iGfxAttrSuite, IGraphicStateRenderObjects *iGfxStateRenderObjects, bool16 doNotify)=0
 
virtual const K2Vector< ClassID > * GetInstalledRenderingTypes (void)=0
 
virtual bool16 CanSwapActiveProxyType (IGraphicAttrProxySuite::ActiveProxyType proxyType)=0
 
virtual void SwapActiveProxyType (IGraphicAttrProxySuite::ActiveProxyType proxyType)=0
 
virtual
IGraphicAttrProxySuite::ActiveProxyType 
GetActiveProxyType ()=0
 
virtual GraphicAttrMessage * CreateGraphicAttrMessage (const IGraphicAttrMessage::MessageType &messageID, const K2Vector< ClassID > &pClassList)=0
 
virtual GraphicAttrCacheMessage * CreateGraphicAttrCacheMessage (const PMIID &messageID, const IGraphicAttrMessage::MessageType &messageType, const K2Vector< ClassID > *attrClassList)=0
 
virtual IRenderObjectServiceQueryRenderObjectService (ClassID renderClassID)=0
 
virtual IRenderingObjectCreateTemporaryRenderObject (ClassID, const IRenderingObject *iSourceRenderObject=nil)=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

Graphic state related utility functions.

Member Function Documentation

virtual void IGraphicStateUtils::AppendAttributesModified (ClassID attributeModified,
IClassIDListDataiDestAttrModified 
)
pure virtual

Append the attribute class to the class list interface, "iDestAttrModified".

Parameters
attributeModifiedspecifies attribute class ID.
iDestAttrModifiedspecifies the class list interface receiving the attribute class.
virtual bool16 IGraphicStateUtils::CanSwapActiveProxyType (IGraphicAttrProxySuite::ActiveProxyType proxyType)
pure virtual

Return whether or not the specified proxy type can be swapped.

Parameters
proxyTypeis the proxy type.
Returns
true if specified proxy type can be swapped.
virtual ICommand* IGraphicStateUtils::CreateAttributeCommand (const IPMUnknownattribute,
const UIDListpTargetItemList,
bool16 doPrePost,
bool16 enableDoNotify 
)
pure virtual

Create an apply attribute command that applies "attribute" to the specified page items. Optionally, the attribute Pre/Post mechanism can be disabled. And the command's DoNotify() can be disabled.

Parameters
attributespecifies the attribute to apply.
pTargetItemListspecifies the list of page items to apply attribute to.
doPrePostis true if attribute prepost action is enabled.
enableDoNotifyis true if command notification is enabled.
Returns
the attribute command inteface pointer.
virtual UIDList* IGraphicStateUtils::CreateFlattenedPageItemList (const UIDListpItemList,
const PMIIDinterestedIID,
bool16 onlyIncludeGfxStateSelection 
)
pure virtual

This function is used by the graphic state and its commands to modify the selection list as necessary for the processing of the selection. (a) Remove any page item that does not have a GfxSelection interface (b) Expand all containers so their children are in the returned list (c) Filter out any page items that do not support "interfaceID" (optional) (d) Any duplicates are removed from the list

Parameters
pItemListspecifies the page items from which to create the flattened list.
interestedIIDspecifies the interface IID to collect.
onlyIncludeGfxStateSelectionis true it will only include items that have an IGraphicStateSelection interface.
virtual ICommand* IGraphicStateUtils::CreateGfxApplyOverrideCommand (ClassID renderObjectClassID,
UID renderUID,
ClassID attributeClassID,
const UIDListtargetItemList,
bool16 doPrePost,
bool16 enableDoNotify 
)
pure virtual

Create an apply rendering object attribute command that applies the render UID to the specified page items. Optionally, the attribute Pre/Post mechanism can be disabled. And the command's DoNotify() can be disabled.

Parameters
renderObjectClassIDspecifies the rendering object class to apply.
renderUIDspecifies the corresponding rendering object UID to apply.
attributeClassIDspecifies the rendering attribute class.
targetItemListspecifies the list of page items to apply attribute to.
doPrePostis true if attribute prepost action is enabled.
enableDoNotifyis true if command notification is enabled.
Returns
the attribute command inteface pointer.
virtual ICommand* IGraphicStateUtils::CreateGfxClearOverrideCommand (ClassID attributeClassID,
const UIDListtargetItemList,
bool16 enableDoNotify 
)
pure virtual

Create clear attribute override command that removes an attribute of the specified class from the specified page items. Optionally, the command's DoNotify() can be disabled.

Parameters
attributeClassIDspecifies the attribute class to to remove.
pTargetItemListspecifies the list of page items to clear attribute.
enableDoNotifyis true if command notification is enabled.
Returns
the clear attribute override command inteface pointer.
virtual ICommand* IGraphicStateUtils::CreateGfxSwapStrokeAndFillCommand (const UIDListtargetItemList)
pure virtual

Create a swap stroke and fill command for the page items.

Parameters
targetItemListspecifies the page items whose stroke and fill are swapped.
Returns
the swap stroke and fill command pointer.
virtual GraphicAttrCacheMessage* IGraphicStateUtils::CreateGraphicAttrCacheMessage (const PMIIDmessageID,
const IGraphicAttrMessage::MessageTypemessageType,
const K2Vector< ClassID > * attrClassList 
)
pure virtual

Create a graphic attribute cache message based of the given data.

Parameters
messageIDis the PMIID of the suite sending the message.
messageTypeis the cache message type.
See Also
also IGraphicAttrMessage.h
Parameters
pClassLists a list of affected class ID. These are attribute class IDs or rendering class IDs.
Returns
a graphic attribute cache message.
virtual GraphicAttrMessage* IGraphicStateUtils::CreateGraphicAttrMessage (const IGraphicAttrMessage::MessageTypemessageID,
const K2Vector< ClassID > & pClassList 
)
pure virtual

Create a graphic attribute suite message based of the given data.

Parameters
messageTypeis the attribute message type.
See Also
also IGraphicAttrMessage.h
Parameters
pClassLists a list of affected class ID. These are attribute class IDs or rendering class IDs.
Returns
a graphic attribute suite message.
virtual IRenderingObject* IGraphicStateUtils::CreateTemporaryRenderObject (ClassID ,
const IRenderingObjectiSourceRenderObject = nil 
)
pure virtual

Create a temporary (in-memory) rendering object for the given rendering class ID. There is no database or UID associated with a temporary rendering object.

Parameters
renderClassIDspecifies the rendering class ID.
iSourceRenderObjectspecifies the source rendering object to use for constructing the in-memory rendering object. If this is nil, default values are used.
Returns
the IRenderingObject* for the rendering class ID.
virtual ICommand* IGraphicStateUtils::CreateTextSwapStrokeAndFillCommand (ITextModeliTextModel,
ITextFocusiTextFocus 
)
pure virtual

Create a swap stroke and fill command for the text.

Parameters
iTextModelspecifies text model.
iTextFocusspecifies the affected text focus.
Returns
the swap stroke and fill command pointer.
virtual IGraphicAttrProxySuite::ActiveProxyType IGraphicStateUtils::GetActiveProxyType ()
pure virtual

Returns the active proxy type.

virtual const K2Vector<ClassID>* IGraphicStateUtils::GetInstalledRenderingTypes (void )
pure virtual

Returns a list of the installed rendering types.

virtual bool16 IGraphicStateUtils::IsFillActive (void )
pure virtual

Return true if fill proxy is active.

virtual bool16 IGraphicStateUtils::IsStrokeActive (void )
pure virtual

Return true if stroke proxy is active.

virtual ErrorCode IGraphicStateUtils::ProcessApplyTargetAttributesToPageItems (IGraphicStyleAttributeBossListiNewAttrList,
ClassIDpClassList,
int32 attrCount,
const UIDListtargetItemList,
bool16 doPrePost = kTrue,
bool16 enableDoNotify = kTrue 
)
pure virtual

Apply a list of attributes to the specified page items. Only those attributes whose class is in the given class list are applied. Optionally, the attribute Pre/Post mechanism can be disabled. And the command's DoNotify() can be disabled.

Parameters
iNewAttrListspecifies the list of attributes to apply.
pClassListspecifies the list of attribute classes in iNewAttrList to apply. If pClassList is nil, then all attributes are applied.
attrCountspecifies the number of attributes in pClassList. If attrCount is 0, then all attributes are applied.
targetItemListspecifies the list of page items to apply attributes to.
doPrePostis true if attribute prepost action is enabled.
enableDoNotifyis true if command notification is enabled.
Returns
kSuccess if no errors otherwise returns an error code.
virtual ErrorCode IGraphicStateUtils::ProcessDefaultStrokeAndFillCmdSequence (IGraphicAttributeSuite = nil)
pure virtual

Swap default stroke and fill for the selection specified by the graphic attribute suite.

Parameters
iGraphicAttrSuitespecifies graphic attribute suite to use.
Returns
kSuccess if no errors otherwise returns an error code.
virtual ErrorCode IGraphicStateUtils::ProcessGfxStateAddMultAttributes (IGraphicStyleAttributeBossListiNewAttrList,
IGraphicAttributeSuiteiGraphicAttrSuite = nil 
)
pure virtual

Apply multiple attributes to the graphic attribute suite. Depending on the state the attribute, will affect defaults or the current selection.

Parameters
iNewAttrListspecifies the list of attributes to apply.
iGraphicAttrSuitespecifies the graphic attribute suite to use.
Returns
kSuccess if no errors otherwise returns error code.
virtual ErrorCode IGraphicStateUtils::ProcessGfxStateApplyAttribute (IPMUnknowniNewAttribute,
ISelectionManageriSelectionMgr = nil 
)
pure virtual

Process either an Add or Change attribute command that is sent to the graphic state. Depending on the state the attribute, will affect defaults or the current selection.

Parameters
iNewAttributespecifies the new attribute to apply.
iSelectionMgrspecifies the selection manager to use.
Returns
kSuccess if no errors otherwise returns error code.
virtual ErrorCode IGraphicStateUtils::ProcessGfxStateApplyAttribute (IPMUnknowniNewAttribute,
IGraphicAttributeSuiteiGraphicAttrSuite = nil 
)
pure virtual

Process either an Add or Change attribute command that is sent to the graphic state. Depending on the state the attribute, will affect defaults or the current selection.

Parameters
iNewAttributespecifies the new attribute to apply.
iGraphicAttrSuitespecifies the graphic attribute suite to use.
Returns
kSuccess if no errors otherwise returns error code.
virtual ErrorCode IGraphicStateUtils::ProcessGfxStateRemoveAttributes (ClassIDpClassList,
uint16 attributeCount,
IGraphicAttributeSuiteiGraphicAttrSuite = nil 
)
pure virtual

Remove multiple attributes from the graphic attribute suite. Depending on the state the attribute, will affect defaults or the current selection.

Parameters
pClassListspecifies the list of attribute classes to remove.
attributeCountspecifies the number of attribute classes in the list.
iGraphicAttrSuitespecifies the graphic attribute suite to use.
Returns
kSuccess if no errors otherwise returns error code.
virtual ErrorCode IGraphicStateUtils::ProcessSwapStrokeAndFillCmdSequence (IGraphicAttributeSuiteiGraphicAttrSuite = nil)
pure virtual

Swap stroke and fill for the selection specified by the graphic attribute suite.

Parameters
iGraphicAttrSuitespecifies graphic attribute suite to use.
Returns
kSuccess if no errors otherwise returns an error code.
virtual ErrorCode IGraphicStateUtils::ProcessToggleStrokeAndFillCmd (void )
pure virtual

Taggle stroke and fill proxy.

Returns
kSuccess if no errors otherwise returns an error code.
virtual ErrorCode IGraphicStateUtils::ProcessUpdateDefinitionRenderDataCmdSequence (ClassID renderObjectClassID,
UID renderUID,
bool16 isFill,
IGraphicAttributeSuiteiGfxAttrSuite = nil 
)
pure virtual

Update rendering data in the given graphic state. The render data to be updated is specified by (a) stroke or fill and (b) by render UID. The change will be forwarded to the Graphic State Rendering Objects if necessary.

Parameters
renderObjectClassIDspecifies rendering class to update.
renderUIDspecifies rendering UID.
isFillis true if updating the fill proxy.
iGfxAttrSuitespecifies graphic attribute suite.
Returns
kSuccess if no errors otherwise returns an error code.
virtual IGraphicAttributeSuite* IGraphicStateUtils::QueryActiveGraphicAttrSuite (ISelectionManageriSelectionMgr = nil)
pure virtual

Query the graphic attribute suite from the given selection manager or the active selection manager is ISelectionManager is nil.

Parameters
iSelectionMgrspecifies the selection manager to use.
Returns
the graphic suite interface pointer.
virtual IPMUnknown* IGraphicStateUtils::QueryActiveGraphicState (const PMIIDrequestedIID = IID_IUNKNOWN,
IActiveContextiActiveContext = nil 
)
pure virtual

Return the active graphic state object pointer.

Parameters
requestedIIDspecifies requested interface IID.
iActiveContextspecifies the active context.
Returns
an IPMUnknown pointer to the requested interface IID.
virtual IWorkspace* IGraphicStateUtils::QueryDataBaseWorkspace (IDataBaseiDataBase)
pure virtual

Return the workspace of the specified database.

Parameters
iDataBasespecifies the database for the graphic state object.
Returns
IWorkspace for the specified database.
virtual IPMUnknown* IGraphicStateUtils::QueryGraphicState (IDataBaseiDataBase,
const PMIIDrequestedIID = IID_IUNKNOWN 
)
pure virtual

Return the graphic state object pointer for the specified database.

Parameters
iDataBasespecifies the database for the graphic state object.
requestedIIDspecifies requested interface IID.
Returns
an IPMUnknown pointer to the requested interface IID.
virtual IRenderObjectService* IGraphicStateUtils::QueryRenderObjectService (ClassID renderClassID)
pure virtual

Return the rendering object service interface for the given rendering class ID.

Parameters
renderClassIDspecifies the rendering class ID.
Returns
the IRenderObjectService* for the rendering class ID.
virtual void IGraphicStateUtils::SwapActiveProxyType (IGraphicAttrProxySuite::ActiveProxyType proxyType)
pure virtual

Swap the specified proxy type as active proxy type.

Parameters
proxyTypeis the proxy type.
virtual void IGraphicStateUtils::TransferAttributesModified (ICommandiSourceCommand,
IClassIDListDataiDestAttrModified 
)
pure virtual

Transfer the list of attributes modified in "iSourceCommand" into the class list interface, "iDestAttrModified".

Parameters
iSourceCommandspecifies source command.
iDestAttrModifiedspecifies the class list interface receiving the attribute classes.
virtual void IGraphicStateUtils::UpdateGfxStateRenderObjectsRenderData (ClassID renderObjectClassID,
IGraphicAttributeSuiteiGfxAttrSuite,
IGraphicStateRenderObjectsiGfxStateRenderObjects,
bool16 doNotify 
)
pure virtual

Use the state of the stroke/fill proxy to copy either the stroke or fill render data from the specified target into the render object's render data object. This is called when the underlying definition has changed and the Render Objects Interface needs to be updated.

Parameters
renderObjectClassIDis the rendering class to update. If this is kInvalidClass, the target's current setting is used.
iGfxAttrSuitespecifies the affected graphic attribute suite.
iGfxStateRenderObjectsspecifies the corresponding graphic state render objects.
doNotifyis true if graphic state should broadcast changed message.