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

Public Types | |
| enum | SortHint { kIncrementalSort, kTotalSort } |
Public Member Functions | |
| virtual UID | FindByName (const PMString &name) const =0 |
| virtual int32 | GetNumStyles () const =0 |
| virtual void | AddStyle (UID style)=0 |
| virtual void | InsertStyle (UID style, int32 position)=0 |
| virtual void | RemoveStyle (UID style)=0 |
| virtual UID | GetNthStyle (int32 id) const =0 |
| virtual int32 | GetStyleIndex (UID style) const =0 |
| virtual UID | GetDefaultStyleUID () const =0 |
| virtual UID | SetDefaultStyleUID (UID d)=0 |
| virtual UID | GetRootStyleUID () const =0 |
| virtual bool16 | IsBasedOn (UID selfUID, UID otherUID) const =0 |
| virtual bool16 | ReSort (SortHint whichSort=kIncrementalSort)=0 |
| virtual void | SetDefaultTextStyleUID (UID d)=0 |
| virtual UID | GetDefaultTextStyleUID () const =0 |
| virtual void | SetDefaultFrameGridStyleUID (UID d)=0 |
| virtual UID | GetDefaultFrameGridStyleUID () const =0 |
| virtual UID | SetRootStyleUID (UID d)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
IStyleNameTable is a mapping between strings (names) and UIDs (various objects). Many examples exist. The most common being the paragraph text-style name table and the character text-style name table. All of these tables rely on the existance of the IStyleInfo interface on the registered objects.
Sorts the table by name and returns kTrue if anything changed position.
| whichSort | a hint about what kind of sort this is. If you think the list is almost sorted, pass kIncrementalSort. If you think it's totally unsorted, pass kIncrementalSort. Either will work, but you'll get better performance if you pass the right one. |
| pure virtual |
Add an object (usually a style) to the table. This object should have an IStyleInfo or IObjectStyleInfo interface.
Get the UID of the object (usually a kStyleBoss) with the specified name.
| pure virtual |
USED ONLY BY OBJECT STYLES CURRENTLY Gets the Default Frame Grid Style for this name table
| pure virtual |
Returns the object considered the "default". This corresponds to the object that the user has specified as the default – it does not correspond to a base or root object. See GetRootStyleUID()
| pure virtual |
USED ONLY BY OBJECT STYLES CURRENTLY Gets the Default Text Style for this name table
| pure virtual |
Return an object from the table by index. Used when iterating over the table.
| pure virtual |
Return the number of objects in this table
| pure virtual |
Many tables have an idea of a "root" object. For text style name tables, this is the [No xxx Style] object. You are not allowed to set the root style.
| pure virtual |
Returns the index of an object in the table. Returns -1 if non-existant.
| pure virtual |
Add an object (usually a style) to the table. This object should have an IStyleInfo or IObjectStyleInfointerface.
Is the selfUID object based on the otherUID parameter? This can be through any levels of hierarchy. This relies on the IStyleInfo interface.
| pure virtual |
Remove the (usually a style) from the table.
| pure virtual |
USED ONLY BY OBJECT STYLES CURRENTLY Sets the Default Frame Grid Style for this name table
Sets the default, and returns the object previously considered the "default". This corresponds to the object that the user has specified as the default – it does not correspond to a base or root object. See GetRootStyleUID()
| pure virtual |
USED ONLY BY OBJECT STYLES CURRENTLY Sets the Default Text Style for this name table