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

Public Types

enum  { kDefaultIID = IID_IOBJSTYLESATTRHANDLER }
 
enum  HowToUseCategories { kApplyAllCategories, kApplyOnlyCheckedCategoriesFromSource, kApplyOnlyUncheckedCategoriesInTarget }
 

Public Member Functions

virtual void GetFillStyleTargetFromSelectionTarget (const IPMUnknown *modelTarget, IPMUnknown *styleTarget, const IWorkspace *ws) const =0
 
virtual void SetStyleAttrsInDefaultSelection (const IPMUnknown *styleTarget, const IWorkspace *ws, K2Vector< ClassID > &categoriesToOverride)=0
 
virtual void SetStyleAttrsInUIDList (const UIDList &list, const IPMUnknown *styleTarget, const IWorkspace *ws, K2Vector< ClassID > &categoriesToOverride)=0
 
virtual void GetDefaultGraphicFrameStyleAttrs (IPMUnknown *targetBoss, const IWorkspace *ws, const bool16 isRootStyle=kFalse) const =0
 
virtual void GetDefaultTextFrameStyleAttrs (IPMUnknown *targetBoss, const IWorkspace *ws) const =0
 
virtual void GetDefaultFrameGridStyleAttrs (IPMUnknown *targetBoss, const IWorkspace *ws) const =0
 
virtual void SetAttrsInTarget (IPMUnknown *fillTargetBoss, const IPMUnknown *applyTargetBoss, const IPMUnknown *oldTargetBoss, bool16 clearOverrides)=0
 
virtual void GetAttrsFromObjectStyle (const UIDRef &objectStyleUIDRef, IPMUnknown *targetBoss, const HowToUseCategories howToUseCat=kApplyAllCategories)=0
 
virtual void SetAttrsIntoObjectStyle (const UIDRef &objectStyleUIDRef, const IPMUnknown *targetBoss, const HowToUseCategories howToUseCat=kApplyAllCategories)=0
 
virtual void CopyAttrsBetweenObjectStyles (const IWorkspace *sourceWS, const UID &sourceObjectStyle, const IWorkspace *targetWS, const UID &targetObjectStyle)=0
 
virtual void MergeAttrsIntoObjectStyle (const IPMUnknown *sourceObjectStyle, const IWorkspace *targetWS, const UID &targetObjectStyle)=0
 
virtual bool16 IsStyleOverridenBySelection (const IPMUnknown *modelTargetBoss, const IWorkspace *ws, const IPMUnknown *style, const K2Vector< ClassID > *categories=nil) const =0
 
virtual bool16 SelectionContainsMixedOverrides (const IPMUnknown *modelTarget, const IWorkspace *ws, const K2Vector< ClassID > *categories) const =0
 
virtual void FillTargetWithAllSupportedAttrCategories (IPMUnknown *targetBoss)=0
 
virtual K2Vector< ClassIDGetAcceptedCategories () const =0
 
virtual ObjStyleCategoryAttrMap GetOverrideList (const IPMUnknown *modelTargetBoss, const IWorkspace *ws, const IPMUnknown *target, const K2Vector< ClassID > *categories, ObjStyleCategoryNameMap &categoryNameMap) const =0
 
virtual ObjStyleCategoryAttrMap GetAcceptedAttributeList (const IPMUnknown *target, const IWorkspace *ws, ObjStyleCategoryNameMap &categoryNameMap) const =0
 
virtual ProtocolCollection GetNotificationProtocolList () const =0
 
virtual void DoAttrConversion (IDataBase *targetDB, IPMUnknown *iTargetStyleAttributes, const IWorkspace *targetWS, IDataBase *sourceDB)=0
 
virtual void RemoveStyleAttributes (const UIDRef &styleUIDRef)=0
 
virtual K2Vector< ClassIDGetCategoriesThatAffectTextFrameDefaults () const =0
 
virtual K2Vector< ClassIDGetCategoriesThatAffectGraphicFrameDefaults () const =0
 
virtual void GetCategoryByAttribute (const ClassID &attributeID, ClassID &categoryClass) const =0
 
virtual void SetStyleAttrsInUIDListPostAddToHierarchy (const UIDList &list, const IPMUnknown *styleTarget, const IWorkspace *ws, K2Vector< ClassID > &categoriesToOverride)=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 void IObjStylesAttrHandler::CopyAttrsBetweenObjectStyles (const IWorkspacesourceWS,
const UIDsourceObjectStyle,
const IWorkspacetargetWS,
const UIDtargetObjectStyle 
)
pure virtual

CopyAttrsBetweenObjectStyles: Get the attributes from object style and set it into targetBoss Convert them if necessary

Parameters
sourceWSThe source style workspce
sourceObjectStyleThe source style we are pulling from
targetWSThe target style workspce
targetObjectStyleThe target style we are pushing the attriubtes to
virtual void IObjStylesAttrHandler::DoAttrConversion (IDataBasetargetDB,
IPMUnknowniTargetStyleAttributes,
const IWorkspacetargetWS,
IDataBasesourceDB 
)
pure virtual

Convert the UID based attributes from source db to target db.

Parameters
targetDBthe targetDB for the new attributes.
iTargetStyleAttributesthe source attributes.
targetWSthe target workspace for the new attributes.
sourceDbthe sourceDB for the source attributes.
virtual void IObjStylesAttrHandler::FillTargetWithAllSupportedAttrCategories (IPMUnknowntargetBoss)
pure virtual

FillTargetWithAllSupportedAttrCategories: Fills the target with the categories this handler supports

Parameters
styleTargetThe style target attribute information we are filling
virtual ObjStyleCategoryAttrMap IObjStylesAttrHandler::GetAcceptedAttributeList (const IPMUnknowntarget,
const IWorkspacews,
ObjStyleCategoryNameMapcategoryNameMap 
) const
pure virtual

Get supported attribute list of the specified target in this handler.

virtual K2Vector<ClassID> IObjStylesAttrHandler::GetAcceptedCategories () const
pure virtual

Get accepted categories of this handler.

Returns
K2Vector<ClassID> the categories that we support in this handler.
virtual void IObjStylesAttrHandler::GetAttrsFromObjectStyle (const UIDRefobjectStyleUIDRef,
IPMUnknowntargetBoss,
const HowToUseCategories howToUseCat = kApplyAllCategories 
)
pure virtual

GetAttrsFromObjectStyle: Get the attributes from object style and set it into targetBoss

Parameters
objectStyleUIDRefThe style we are pulling from
howToUseCatThe flag indicates if we should ignore categories status when setting attributes, use only the attributes in the checked categories or use only the attributes in the unchecked categories (note uses SOURCE cateories)
virtual K2Vector<ClassID> IObjStylesAttrHandler::GetCategoriesThatAffectGraphicFrameDefaults () const
pure virtual

Returns a list of categories supported by this handler which affect the graphic defaults

virtual K2Vector<ClassID> IObjStylesAttrHandler::GetCategoriesThatAffectTextFrameDefaults () const
pure virtual

Returns a list of categories supported by this handler which affect the text defaults

Returns
K2Vector<ClassID>
virtual void IObjStylesAttrHandler::GetCategoryByAttribute (const ClassIDattributeID,
ClassIDcategoryClass 
) const
pure virtual

Get the category ID which the given attribute belongs to.

Parameters
attributeID[IN] the given attribute.
categoryClass[OUT] the category that the attribute belongs to.
virtual void IObjStylesAttrHandler::GetDefaultFrameGridStyleAttrs (IPMUnknowntargetBoss,
const IWorkspacews 
) const
pure virtual

GetDefaultFrameGridStyleAttrs: Gets the default attribute and fills in the target for the default frame grid style

Parameters
styleTargetThe style target attribute information we are filling
wsThe current workspce
virtual void IObjStylesAttrHandler::GetDefaultGraphicFrameStyleAttrs (IPMUnknowntargetBoss,
const IWorkspacews,
const bool16 isRootStyle = kFalse 
) const
pure virtual

GetDefaultGraphicFrameStyleAttrs: Gets the default attribute and fills in the target for the default graphic frame style

Parameters
styleTargetThe style target attribute information we are filling
wsThe current workspce
isRootStyleThe flag indicating if the attrs are for root style or not.
virtual void IObjStylesAttrHandler::GetDefaultTextFrameStyleAttrs (IPMUnknowntargetBoss,
const IWorkspacews 
) const
pure virtual

GetDefaultTextFrameStyleAttrs: Gets the default attribute and fills in the target for the default text frame style

Parameters
styleTargetThe style target attribute information we are filling
wsThe current workspce
virtual void IObjStylesAttrHandler::GetFillStyleTargetFromSelectionTarget (const IPMUnknownmodelTarget,
IPMUnknownstyleTarget,
const IWorkspacews 
) const
pure virtual

GetFillStyleTargetFromSelectionTarget: Gets the attributes from the model and fills in the target

Parameters
modelTargetThe csb representing the selection
styleTargetThe style target attribute information we are filling
wsThe current workspce
virtual ProtocolCollection IObjStylesAttrHandler::GetNotificationProtocolList () const
pure virtual

Returns the protocol list for attributes in this style. This is used by observers so they know when the attributes which may make the object propertes different then the object style change (example – to observer for overrides to the style)

Parameters
styleThe style to get the protocol list for
Returns
K2Vector<PMIID> List of protocols
virtual bool16 IObjStylesAttrHandler::IsStyleOverridenBySelection (const IPMUnknownmodelTargetBoss,
const IWorkspacews,
const IPMUnknownstyle,
const K2Vector< ClassID > * categories = nil 
) const
pure virtual

IsStyleOverridenBySelection: Checks to see if its portion of the object style is overriden on the selection

Parameters
modelTargetThe csb representing the selection
wsThe current workspce
styleThe boss with the style data
categoriesOptional parameter to indicate which categories to check for overrides – when nil we assume all
virtual void IObjStylesAttrHandler::MergeAttrsIntoObjectStyle (const IPMUnknownsourceObjectStyle,
const IWorkspacetargetWS,
const UIDtargetObjectStyle 
)
pure virtual

MergeAttrsIntoObjectStyle: Only adds the attributes which are in the source, but not in the target

Parameters
sourceObjectStyleThe source style we are pulling from
targetWSThe target style workspce
targetObjectStyleThe source style we are mergring the attriubtes to
virtual void IObjStylesAttrHandler::RemoveStyleAttributes (const UIDRefstyleUIDRef)
pure virtual

Remove the attributes that are not supported anymore.

Parameters
styleUIDRefThe UIDRef of the style.
virtual bool16 IObjStylesAttrHandler::SelectionContainsMixedOverrides (const IPMUnknownmodelTarget,
const IWorkspacews,
const K2Vector< ClassID > * categories 
) const
pure virtual
SelectionContainsMixedOverrides: Checks to see if its portion of the object style is overriden on the selection

Parameters
modelTargetThe csb representing the selection
wsThe current workspce
categoriesOptional parameter to indicate which categories to check for overrides – when nil we assume all
virtual void IObjStylesAttrHandler::SetAttrsInTarget (IPMUnknownfillTargetBoss,
const IPMUnknownapplyTargetBoss,
const IPMUnknownoldTargetBoss,
bool16 clearOverrides 
)
pure virtual

SetAttrsInTarget: Applies attributes from the first target to the second target based on the override rules May not have a full set of attributes when done

Parameters
fillTargetBossThe style target we are filling
applyTargetBossThe style target attribute information we would like to apply (that we are
oldTargetBossThe style target attribute information from the old style
clearOverridesTrue if we are clearing overrides (attributes which are different then the current style)
virtual void IObjStylesAttrHandler::SetAttrsIntoObjectStyle (const UIDRefobjectStyleUIDRef,
const IPMUnknowntargetBoss,
const HowToUseCategories howToUseCat = kApplyAllCategories 
)
pure virtual

SetAttrsIntoObjectStyle: Get the attributes from object style and set it into targetBoss

Parameters
objectStyleUIDRefThe style we are putting the attriubtes on
styleTargetThe style target attribute information
howToUseCatThe flag indicates if we should ignore categories status when setting attributes, use only the attributes in the checked categories or use only the attributes in the unchecked categories (note uses SOURCE cateories)
virtual void IObjStylesAttrHandler::SetStyleAttrsInDefaultSelection (const IPMUnknownstyleTarget,
const IWorkspacews,
K2Vector< ClassID > & categoriesToOverride 
)
pure virtual

SetStyleAttrsInDefaultSelection: Sets the attributes in the default selection state

Parameters
styleTargetThe style target attribute information
wsThe current workspce
categoriesToOverrideA list of the categories to override
virtual void IObjStylesAttrHandler::SetStyleAttrsInUIDList (const UIDListlist,
const IPMUnknownstyleTarget,
const IWorkspacews,
K2Vector< ClassID > & categoriesToOverride 
)
pure virtual

SetStyleAttrsInUIDList: Sets the attributes in the model and from the target

Parameters
listThe UIDList of the pageitems to change
styleTargetThe style target attribute information
wsThe current workspce
categoriesToOverrideA list of the categories to override
virtual void IObjStylesAttrHandler::SetStyleAttrsInUIDListPostAddToHierarchy (const UIDListlist,
const IPMUnknownstyleTarget,
const IWorkspacews,
K2Vector< ClassID > & categoriesToOverride 
)
pure virtual

Apply the attributes which need to be applied only after the page item is added to hierarchy. Relevant for size and position attributes in object styles.

Parameters
listThe UIDList of the pageitems to change
styleTargetThe style target attribute information
wsThe current workspce
categoriesToOverrideA list of the categories to override