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

#include <ITOCStyleNameTable.h>

Inheritance diagram for ITOCStyleNameTable:
IPMUnknown

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 IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

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.

Member Function Documentation

virtual void ITOCStyleNameTable::AddStyle (UID style)
pure virtual

Add a new style to the style name table.

Parameters
styleIN the style to be added in the style name table.
virtual const UID ITOCStyleNameTable::FindByName (const PMStringname) const
pure virtual

Get the style UID with the given name.

Parameters
nameIN the style name.
Returns
UID the style corresponding to the given name.
virtual const UID ITOCStyleNameTable::GetDefaultTOCStyleUID () const
pure virtual

Get the default TOC style.

Parameters
none
Returns
UID the default style.
virtual const UID ITOCStyleNameTable::GetNthStyle (int32 id) const
pure virtual

Get the style UID with the given index(0-based).

Parameters
idIN the index.
Returns
UID the nth style.
virtual void ITOCStyleNameTable::GetNthStyleName (int32 index,
PMStringpName 
) const
pure virtual

Get the style name with the given index(0-based).

Parameters
indexIN the index of style.
pNameOUT the name corresponding to the given index.
virtual const int32 ITOCStyleNameTable::GetNumStyles () const
pure virtual

Get the total number of styles in table of content style table.

Parameters
none
Returns
int32 total number of styles.
virtual int32 ITOCStyleNameTable::GetStyleIndexByName (PMStringpName) const
pure virtual

Get the style index with the given name.

Parameters
pNameIN the style name.
Returns
int32 the index of the style(0-based).
virtual PMString ITOCStyleNameTable::GetUniqueStyleName (PMStringbaseName)
pure virtual

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".

Parameters
baseNameIN the base name.
Returns
PMString the style name.
virtual void ITOCStyleNameTable::RemoveStyle (UID style)
pure virtual

Remove style from style name table.

Parameters
styleIN the style to be removed from the style name table.
virtual void ITOCStyleNameTable::SetDefaultTOCStyleUID (UID uid)
pure virtual

Set the default style.

Parameters
uidIN the style to be set as a default style.