![]() | InDesign SDK 20.5 |
#include <IObjectStylesUtils.h>

Public Types | |
| enum | { kDefaultIID = IID_IOBJECTSTYLESUTILS } |
Public Member Functions | |
| virtual void | FillStyleTargetFromSelection (const IPMUnknown *modelTargetBoss, IPMUnknown *targetBoss, IWorkspace *ws, bool16 fillInCategories=kTrue) const =0 |
| virtual void | SetStyleTargetOnDefaultSelection (const IPMUnknown *targetBoss, IWorkspace *ws, K2Vector< ClassID > &categoriesToOverride)=0 |
| virtual void | SetStyleTargetOnUIDList (const UIDList &list, const IPMUnknown *targetBoss, IWorkspace *ws, K2Vector< ClassID > &categoriesToOverride)=0 |
| virtual void | GetTargetFromObjectStyle (const UIDRef &objectStyleUIDRef, IPMUnknown *target, UID fillInUncheckedCategoriesWithThisUID=kInvalidUID)=0 |
| virtual void | SetTargetIntoObjectStyle (const UIDRef &objectStyleUIDRef, const IPMUnknown *target, const IObjStylesAttrHandler::HowToUseCategories howToUseCat=IObjStylesAttrHandler::kApplyOnlyCheckedCategoriesFromSource)=0 |
| virtual void | CopyTargetBetweenObjectStyles (IWorkspace *sourceWS, const UID &sourceObjectStyle, IWorkspace *targetWS, const UID &targetObjectStyle)=0 |
| virtual void | MergeAttrsIntoObjectStyle (const IPMUnknown *sourceObjectStyle, IWorkspace *targetWS, const UID &targetObjectStyle)=0 |
| virtual void | FillInDefaultGraphicStyle (IWorkspace *ws, IPMUnknown *target, bool16 isRootStyle=kFalse)=0 |
| virtual void | FillInDefaultTextStyle (IWorkspace *ws, IPMUnknown *target)=0 |
| virtual void | FillInDefaultFrameGridStyle (IWorkspace *ws, IPMUnknown *target)=0 |
| virtual PMString | GetUniqueDuplicateName (IWorkspace *ws, const PMString &baseName)=0 |
| virtual ICommand * | CreateSetDefaultStyleCmd (IWorkspace *ws, const PMString &newDefaultStyleName, bool16 applyAttrs, const IPMUnknown *target, bool16 clearOverrides=kFalse)=0 |
| virtual ICommand * | CreateSetDefaultStyleCmd (IWorkspace *ws, const PMString &newDefaultStyleName, bool16 applyAttrs, const IPMUnknown *target, K2Vector< ClassID > &categoriesToOverride)=0 |
| virtual ICommand * | CreateSetDefaultTextStyleCmd (IWorkspace *ws, const PMString &newDefaultStyleName, bool16 applyAttrs, const IPMUnknown *target, bool16 clearOverrides=kFalse, bool16 bDefaultFrameGridCmd=kFalse)=0 |
| virtual ICommand * | CreateSetDefaultTextStyleCmd (IWorkspace *ws, const PMString &newDefaultStyleName, bool16 applyAttrs, const IPMUnknown *target, K2Vector< ClassID > &categoriesToOverride, bool16 bDefaultFrameGridCmd=kFalse)=0 |
| virtual ICommand * | CreateSetDefaultFrameGridStyleCmd (IWorkspace *ws, const PMString &newDefaultStyleName, bool16 applyAttrs, const IPMUnknown *target, bool16 clearOverrides=kFalse, bool16 bDefaultFrameGridCmd=kTrue)=0 |
| virtual ICommand * | CreateSetDefaultFrameGridStyleCmd (IWorkspace *ws, const PMString &newDefaultStyleName, bool16 applyAttrs, const IPMUnknown *target, K2Vector< ClassID > &categoriesToOverride, bool16 bDefaultFrameGridCmd=kTrue)=0 |
| virtual bool16 | IsStyleOverridenBySelection (const IPMUnknown *modelTargetBoss, const IWorkspace *ws, const IPMUnknown *style, const K2Vector< ClassID > *categories=nil)=0 |
| virtual ObjStyleCategoryAttrMap | GetSelectionOverridesToStyle (const IPMUnknown *modelTargetBoss, const IWorkspace *ws, const UID styleUID, ObjStyleCategoryNameMap &categoryNameMap, const K2Vector< ClassID > *categories=nil)=0 |
| virtual bool16 | SelectionContainsMixedOverrides (const IPMUnknown *modelTargetBoss, const IWorkspace *ws, const K2Vector< ClassID > *categories=nil)=0 |
| virtual void | SetAttrsInTarget (IPMUnknown *fillTargetBoss, const IPMUnknown *applyTargetBoss, const IPMUnknown *oldTargetBoss, const IWorkspace *ws, bool16 clearOverrides)=0 |
| virtual void | FillStyleTargetWithAllSupportedCategories (IPMUnknown *targetBoss) const =0 |
| virtual void | FillStyleTargetCategoriesFromStyle (const UIDRef &styleUIDRef, IPMUnknown *targetBoss)=0 |
| virtual bool16 | CanItemsBreakLinkFromObjectStyles (IWorkspace *ws, const UIDList &itemList)=0 |
| virtual bool16 | CanBaseStyleOnStyle (IWorkspace *ws, UID style1, UID style2) const =0 |
| virtual IWorkspace * | QueryWorkspaceFromDataBase (IDataBase *db) const =0 |
| virtual void | RemoveStyleAttributes (const UIDRef &styleUIDRef) const =0 |
| virtual K2Vector< ClassID > | GetCateogryList () const =0 |
| virtual ProtocolCollection | GetNotificationProtocolListForObjectStyles (IWorkspace *ws) const =0 |
| virtual void | NotifyObjectStyleInfoChanged (const UIDList *itemList, ICommand *cmd, ClassID cmdClassID, const LazyNotificationData *data=nil) const =0 |
| virtual void | NotifyObjectStyleNameTableChanged (const UIDList *itemList, ICommand *cmd, ClassID cmdClassID=kInvalidClass, const LazyNotificationData *data=nil) const =0 |
| virtual K2Vector< ClassID > | GetCategoriesThatAffectTextFrameDefaults () const =0 |
| virtual K2Vector< ClassID > | GetCategoriesThatAffectGraphicFrameDefaults () const =0 |
| virtual bool16 | IsReservedObjectStyleName (const PMString &styleName) const =0 |
| virtual void | GetFormattedString (const PMReal &value, const bool16 &bHorizontal, const IWorkspace *ws, PMString &outString)=0 |
| virtual void | FixTextStylesInDefaultObjectStyles (IWorkspace *ws)=0 |
| virtual bool16 | IsItemWithCategoryAppliedByObjectStyle (const UIDRef &item, const ClassID &categoryClass, UIDRef &objectStyleUIDRef) const =0 |
| virtual IObjStylesAttrHandler * | QueryObjectStyleHandler (const ClassID &handlerClass) const =0 |
| virtual bool16 | DoesItemHaveSameTextAttrsWithObjectStyle (const UIDRef &item, const ClassID &category) 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 IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Utility methods for working with object styles.
| pure virtual |
Returns true if no circular reference is creating when basing style 1 on style 2
| ws | The current workspce |
| style1 | The style we are changing the based on info for |
| style2 | The style to base style1 on |
| pure virtual |
Check if the passed in items has non-root object style embedded.
| ws | The current workspce |
| itemList | The item list that we are going to check. |
| pure virtual |
CopyAttrsBetweenObjectStyles: Get the attributes from object style and set it into targetBoss Convert them if necessary
NOTE: MUST BE CALLED FROM A COMMAND OR IN A DATABASE TRANSACTION
| sourceWS | The source style workspce |
| sourceObjectStyle | The source style we are pulling from |
| targetWS | The target style workspce |
| targetObjectStyle | The target style we are pushing the attriubtes to |
| pure virtual |
CreateSetDefaultFrameGridStyleCmd: Creates a command to change the default frame grid style for the workspace
| ws | The current workspce |
| newDefaultStyleName | The new default style name |
| applyAttrs | True if we should apply the attrs from the style, this is not true when creating the style |
| target | The style target (kObjectStylesTargetBoss) |
| clearOverrides | True if we want to clear overrides, otherwise kFalse. |
| bDefaultFrameGridCmd | True if this command is for set the default frame grid style, otherwise kFalse(set default text style) |
| pure virtual |
CreateSetDefaultFrameGridStyleCmd: Same as above except it takes a list of overrides instead of just a bool
| ws | The current workspce |
| newDefaultStyleName | The new default style name |
| applyAttrs | True if we should apply the attrs from the style, this is not true when creating the style |
| target | The style target (kObjectStylesTargetBoss) |
| categoriesToOverride | A list of categories to clear overrides in |
| bDefaultFrameGridCmd | True if this command is for set the default frame grid style, otherwise kFalse(set default text style) |
| pure virtual |
CreateSetDefaultStyleCmd: Creates a command to change the default style for the workspace
| ws | The current workspce |
| newDefaultStyleName | The new default style name |
| applyAttrs | True if we should apply the attrs from the style, this is not true when creating the style |
| target | The style target (kObjectStylesTargetBoss) |
| clearOverrides | True if we want to clear overrides, otherwise kFalse. |
| pure virtual |
CreateSetDefaultStyleCmd: Same as above except it takes a list of overrides instead of just a bool
| ws | The current workspce |
| newDefaultStyleName | The new default style name |
| applyAttrs | True if we should apply the attrs from the style, this is not true when creating the style |
| target | The style target (kObjectStylesTargetBoss) |
| categoriesToOverride | A list of categories to clear overrides in |
| pure virtual |
CreateSetDefaultTextStyleCmd: Creates a command to change the default style for the workspace
| ws | The current workspce |
| newDefaultStyleName | The new default style name |
| applyAttrs | True if we should apply the attrs from the style, this is not true when creating the style |
| target | The style target (kObjectStylesTargetBoss) |
| clearOverrides | True if we want to clear overrides, otherwise kFalse. |
| bDefaultFrameGridCmd | True if this command is for set the default frame grid style, otherwise kFalse(set default text style) |
| pure virtual |
CreateSetDefaultTextStyleCmd: Same as above except it takes a list of overrides instead of just a bool
| ws | The current workspce |
| newDefaultStyleName | The new default style name |
| applyAttrs | True if we should apply the attrs from the style, this is not true when creating the style |
| target | The style target (kObjectStylesTargetBoss) |
| categoriesToOverride | A list of categories to clear overrides in |
| bDefaultFrameGridCmd | True if this command is for set the default frame grid style, otherwise kFalse(set default text style) |
| pure virtual |
Check if the given item has the same text attributes or not comparing with the given object style's category applied to it.
| item | [IN] the given item. |
| category | [IN] the given category. kTrue indicates the attributes are same; otherwise return kFalse. |
| pure virtual |
FillInDefaultFrameGridStyle: Gets the default attribute and fills in the target for the default frame grid style
| ws | The current workspce |
| target | The style target attribute information we are filling |
| pure virtual |
FillInDefaultGraphicStyle: Gets the default attribute and fills in the target for the default graphic frame style
| ws | The current workspce |
| target | The style target attribute information we are filling |
| isRootStyle | The flag indicates if we fill default graphic attributes for root style. |
| pure virtual |
FillInDefaultTextStyle: Gets the default attribute and fills in the target for the default text frame style
| ws | The current workspce |
| target | The style target attribute information we are filling |
| pure virtual |
FillStyleTargetCategoriesFromStyle: Fills in the IObjStylesAttrCategoriesList interface on the object style to have all supported categories of the style passed in.
| styleUIDRef | The style we get category information from |
| targetBoss | The style target attribute information we are filling |
| pure virtual |
FillStyleTargetFromSelection: Gets the attributes from the model and fills in the target
| modelTargetBoss | The csb representing the selection |
| targetBoss | The style target attribute information we are filling |
| ws | The current workspce fillInCategories Optional Param – true by default, fills in the categories with the default values |
| pure virtual |
FillStyleTargetWithAllSupportedCategories: Fills in the IObjStylesAttrCategoriesList interface on the object style to have all supported categories
| targetBoss | The style target (kObjectStylesTargetBoss) |
| pure virtual |
INTERNAL USE ONLY Must call within database transaction, will much with your default object styles
| ws | The workspace containing the styles |
| pure virtual |
Returns a list of categories which affect the graphic defaults
| pure virtual |
Returns a list of categories which affect the text defaults
Get all the categories we supported in object style.
| pure virtual |
TEMPORARY
| pure virtual |
Get observer protocol list see ::GetNotificationProtocolList.
| ws | The workspace containing the styls |
| pure virtual |
GetSelectionOverridesToStyle: Returns a list of the current overrides in the selection
| modelTargetBoss | The csb representing the selection |
| ws | The current workspce |
| styleUID | The style UID we are checking |
| categoryNameMap | Out – category name list |
| categories | Optional parameter to indicate which categories to check for overrides – when nil we assume all |
| pure virtual |
GetAttrsFromObjectStyle: Get the attributes from object style and set it into targetBoss
| objectStyleUIDRef | The style we are pulling from |
| target | The style target attribute information we are filling |
| fillInUncheckedCategoriesWithThisUID | optional param – Usually the root style if we are filling in the missing categories |
| pure virtual |
GetUniqueDuplicateName: Gets a unique duplicate string for the new style
| ws | The current workspce |
| baseName | The base name to start from |
| pure virtual |
Check if the item has object style or not and the attributes within the passed in category has been applied to it or not.
| item | [IN] the item to check. |
| categoryClass | [IN] the category ID related to the attributes we are going to check. |
| objectStyleUIDRef | [OUT] if the item has object style, it will be set as the object style's UIDRef. |
| pure virtual |
Check if the styleName passed in is a reserved style name or not.
| styleName | IN the style name to be checked. |
| pure virtual |
IsStyleOverridenBySelection: Checks to see if its portion of the object style is overriden on the selection
| modelTargetBoss | The csb representing the selection |
| ws | The current workspce |
| style | The boss with the style data |
| categories | Optional parameter to indicate which categories to check for overrides – when nil we assume all |
| pure virtual |
MergeAttrsIntoObjectStyle: Only adds the attributes which are in the source, but not in the target
NOTE: MUST BE CALLED FROM A COMMAND OR IN A DATABASE TRANSACTION
| sourceObjectStyle | The source style we are pulling from |
| targetWS | The target style workspce |
| targetObjectStyle | The source style we are mergring the attriubtes to |
| pure virtual |
Called from the commands, notifys when a object style info changes
| itemList | item list to notify – expected, first item is the workspace |
| cmd | calling command |
| cmdClassID | class of calling command |
| pure virtual |
Called from the commands, notifys when a object style name table changes
| itemList | item list to notify – expected, first item is the workspace |
| cmd | calling command |
| pure virtual |
Query the object style handler with the passed in handler ID. The caller will take the ownship.
| handlerClass | [IN] the ID of handler. |
| pure virtual |
Query the workspace by passing the database.
| db | The database used by querying workspace. |
| pure virtual |
Remove the attributes that are not supported anymore.
| styleUIDRef | The UIDRef of the style. |
| pure virtual |
SelectionContainsMixedOverrides: Checks to see if current selection has mixed overrides or not.
| modelTargetBoss | The csb representing the selection |
| ws | The current workspce |
| categories | Optional parameter to indicate which categories to check for overrides – when nil we assume all |
| 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
NOTE: MUST BE CALLED FROM A COMMAND OR IN A DATABASE TRANSACTION
| fillTargetBoss | The style target we are filling |
| applyTargetBoss | The style target attribute information we would like to apply (that we are |
| oldTargetBoss | The style target attribute information from the old style |
| clearOverrides | True if we are clearing overrides (attributes which are different then the current style) |
| 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.
| list | The UIDList of the pageitems to change |
| styleTarget | The style target attribute information |
| ws | The current workspce |
| categoriesToOverride | A list of the categories to override |
| pure virtual |
SetStyleTargetOnDefaultSelection: Sets the attributes in the default selection state
| targetBoss | The style target (kObjectStylesTargetBoss) |
| ws | The current workspce |
| categoriesToOverride | This of categories we are overriding attributes in |
| pure virtual |
SetStyleAttrsInUIDList: Sets the attributes in the model and from the target
| list | The UIDList of the pageitems to change |
| targetBoss | The style target (kObjectStylesTargetBoss) |
| ws | The current workspce |
| categoriesToOverride | This of categories we are overriding attributes in |
| pure virtual |
SetTargetIntoObjectStyle: Get the attributes from object style and set it into targetBoss
NOTE: MUST BE CALLED FROM A COMMAND OR IN A DATABASE TRANSACTION
| objectStyleUIDRef | The style we are putting the attriubtes on |
| target | The style target (kObjectStylesTargetBoss) |
| howToUseCat | The 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 |