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

#include <IStyleUtils.h>

Inheritance diagram for IStyleUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISTYLEUTILS }
 

Public Member Functions

virtual void CreateUniqueName (IStyleNameTable *pStyleTable, PMString &sName, bool16 appendCopy=kFalse)=0
 
virtual void CreateUniqueName (const IStyleGroupHierarchy *hierarchy, PMString &sName)=0
 
virtual ICommandCreateEditStyleCmd (const ScriptInfo::RequestContext &context, const IStyleInfo *style, const IPMUnknown *addAttribute=nil, ClassID removeAttribute=kInvalidClass)=0
 
virtual ICommandCreateEditStyleCmd (const ScriptInfo::RequestContext &context, const IStyleInfo *style, const AddAttributeList &addAttrList, const RemoveAttributeList &removeAttrList)=0
 
virtual IStyleNameTableQueryStyleNameTable (const IScript *script, const ScriptInfo::RequestContext &context, const ScriptID &desiredType)=0
 
virtual IStyleGroupManagerQueryStyleGroupManager (const IScript *script, const ScriptInfo::RequestContext &context, const ScriptID &desiredType)=0
 
virtual ErrorCode GetStyleRef (const ScriptInfo::RequestContext &context, IScript *script, const ScriptID &propID, UIDRef &styleRef)=0
 
virtual ErrorCode AccessStyle (IScriptRequestData *data, IScript *script, const ScriptID &propID, ScriptID dataLocation, bool16 clearOverrides=kTrue)=0
 
virtual bool16 CopyStyle (const IStyleInfo *pFrom, IStyleInfo *pTo, bool16 bCopyInherited)=0
 
virtual void CopyStyleInfo (const IStyleInfo *pFrom, IStyleInfo *pTo)=0
 
virtual ICommandCreateEditStyleCmd (const IStyleInfo *style, const IPMUnknown *addAttribute=nil, ClassID removeAttribute=kInvalidClass)=0
 
virtual ICommandCreateEditStyleCmd (const IStyleInfo *style, const AddAttributeList &addAttrList, const RemoveAttributeList &removeAttrList)=0
 
virtual void LogStyleApplied (IDataBase *db, const UID styleUID)=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

Utilities related to styles (Paragraph, Character, Table, Object...)

e.g.

Utils&;t;IStyleUtils>()->MethodName( ... ) ;

Member Function Documentation

virtual ErrorCode IStyleUtils::AccessStyle (IScriptRequestDatadata,
IScriptscript,
const ScriptIDpropID,
ScriptID dataLocation,
bool16 clearOverrides = kTrue 
)
pure virtual

Handle the applied style properties

virtual bool16 IStyleUtils::CopyStyle (const IStyleInfopFrom,
IStyleInfopTo,
bool16 bCopyInherited 
)
pure virtual

CopyStyle – copy the info and the attributes from pFrom to pTo. if bCopyInherited is true, then the attributes will contain all attributes of the style plus what it is based on. StyleInfo is still from pFrom itself.

Parameters
pFrom- the style to copy
pTo- the style to copy to
bCopyInherited- whether to copy based on style
Returns
false if pFrom == pTo already.
virtual void IStyleUtils::CopyStyleInfo (const IStyleInfopFrom,
IStyleInfopTo 
)
pure virtual

CopyStyleInfo – copy JUST the style info fields from pFrom to pTo.

Parameters
pFrom- the style to copy
pTo- the style to copy to
virtual ICommand* IStyleUtils::CreateEditStyleCmd (const ScriptInfo::RequestContextcontext,
const IStyleInfostyle,
const IPMUnknownaddAttribute = nil,
ClassID removeAttribute = kInvalidClass 
)
pure virtual

DEPRECATED: Use the version that doesn't pass ScriptInfo::RequestContext as a parameter. Create a command to change the attributes of a style

Parameters
context- the scripting request context
style- the style to edit
addAttribute- an attribute to add (or nil for none)
removeAttribute- an attribute to remove (or kInvalidClass for none)
virtual ICommand* IStyleUtils::CreateEditStyleCmd (const IStyleInfostyle,
const IPMUnknownaddAttribute = nil,
ClassID removeAttribute = kInvalidClass 
)
pure virtual

Create a command to change the attributes of a style

Parameters
style- the style to edit
addAttribute- an attribute to add (or nil for none)
removeAttribute- an attribute to remove (or kInvalidClass for none)
virtual void IStyleUtils::CreateUniqueName (IStyleNameTablepStyleTable,
PMStringsName,
bool16 appendCopy = kFalse 
)
pure virtual

Return a unique style name within the specified style name table.

Parameters
pStyleTableis the style name table in which to make sName unique
sNameis the base name("My Para "), a number is appended to make the name unique like "My Para 1".
appendCopyis set to true if translated "Copy" should be appended to the sName separated by a space before making the name unquie by appending a number. Example: "My copy Para" -> "My copy Para copy n", "My Para copy" -> "My Para copy n", where n is a number appended.
virtual void IStyleUtils::CreateUniqueName (const IStyleGroupHierarchyhierarchy,
PMStringsName 
)
pure virtual

Returns a unique style name with in immediate children of a hierarchy.

Parameters
hierarchy[IN] Style set hierarchy which is to be searched.
sName[INOUT] sName is the base name(My Para), a number is appended to make the name unique like My Para 1.
virtual ErrorCode IStyleUtils::GetStyleRef (const ScriptInfo::RequestContextcontext,
IScriptscript,
const ScriptIDpropID,
UIDRefstyleRef 
)
pure virtual

Get the applied style

virtual void IStyleUtils::LogStyleApplied (IDataBasedb,
const UID styleUID 
)
pure virtual

LogStyleApplied – logs the highbeam data that a paragraph style is applied

Parameters
db- style data base - style UID
virtual IStyleGroupManager* IStyleUtils::QueryStyleGroupManager (const IScriptscript,
const ScriptInfo::RequestContextcontext,
const ScriptIDdesiredType 
)
pure virtual

Query the appropriate style set manager

virtual IStyleNameTable* IStyleUtils::QueryStyleNameTable (const IScriptscript,
const ScriptInfo::RequestContextcontext,
const ScriptIDdesiredType 
)
pure virtual

Query the appropriate style name table