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

Public Types | |
| enum | { kDefaultIID = IID_ITOCSTYLENAMETABLE } |
Public Member Functions | |
| virtual const int32 | GetNumStyles () const =0 |
| virtual const UID | GetDefaultTOCStyleUID () const =0 |
| virtual void | SetDefaultTOCStyleUID (UID uid)=0 |
| virtual void | AddStyle (UID style)=0 |
| virtual void | RemoveStyle (UID style)=0 |
| virtual const UID | GetNthStyle (int32 id) const =0 |
| virtual const UID | FindByName (const PMString &name) const =0 |
| virtual void | GetNthStyleName (int32 index, PMString *pName) const =0 |
| virtual int32 | GetStyleIndexByName (PMString &pName) const =0 |
| virtual PMString | GetUniqueStyleName (PMString &baseName)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface keeps track of the table of content(TOC) styles on Session/Doc workspace. It is a subset of IStyleNameTable except that it does NOT have information related to based on, KBSC(keyboard shortcut), import flag etc.
| pure virtual |
Add a new style to the style name table.
| style | IN the style to be added in the style name table. |
Get the style UID with the given name.
| name | IN the style name. |
| pure virtual |
Get the default TOC style.
| none |
| pure virtual |
Get the style UID with the given index(0-based).
| id | IN the index. |
| pure virtual |
Get the style name with the given index(0-based).
| index | IN the index of style. |
| pName | OUT the name corresponding to the given index. |
| pure virtual |
Get the total number of styles in table of content style table.
| none |
| pure virtual |
Get the style index with the given name.
| pName | IN the style name. |
Get a unique style name with the given base name. It usually uses for duplicating a style. The returned string will have " copy" appended after base name. If "baseName copy" exists, it will append number after copy and look like "baseName copy 1".
| baseName | IN the base name. |
| pure virtual |
Remove style from style name table.
| style | IN the style to be removed from the style name table. |
| pure virtual |
Set the default style.
| uid | IN the style to be set as a default style. |