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

#include <IStyleNameTable.h>

Inheritance diagram for IStyleNameTable:
IPMUnknown

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

Detailed Description

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.

See Also
IStyleInfo.

Member Enumeration Documentation

Sorts the table by name and returns kTrue if anything changed position.

Parameters
whichSorta 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.

Member Function Documentation

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

Add an object (usually a style) to the table. This object should have an IStyleInfo or IObjectStyleInfo interface.

virtual UID IStyleNameTable::FindByName (const PMStringname) const
pure virtual

Get the UID of the object (usually a kStyleBoss) with the specified name.

virtual UID IStyleNameTable::GetDefaultFrameGridStyleUID () const
pure virtual

USED ONLY BY OBJECT STYLES CURRENTLY Gets the Default Frame Grid Style for this name table

virtual UID IStyleNameTable::GetDefaultStyleUID () const
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()

virtual UID IStyleNameTable::GetDefaultTextStyleUID () const
pure virtual

USED ONLY BY OBJECT STYLES CURRENTLY Gets the Default Text Style for this name table

virtual UID IStyleNameTable::GetNthStyle (int32 id) const
pure virtual

Return an object from the table by index. Used when iterating over the table.

virtual int32 IStyleNameTable::GetNumStyles () const
pure virtual

Return the number of objects in this table

virtual UID IStyleNameTable::GetRootStyleUID () const
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.

virtual int32 IStyleNameTable::GetStyleIndex (UID style) const
pure virtual

Returns the index of an object in the table. Returns -1 if non-existant.

virtual void IStyleNameTable::InsertStyle (UID style,
int32 position 
)
pure virtual

Add an object (usually a style) to the table. This object should have an IStyleInfo or IObjectStyleInfointerface.

virtual bool16 IStyleNameTable::IsBasedOn (UID selfUID,
UID otherUID 
) const
pure virtual

Is the selfUID object based on the otherUID parameter? This can be through any levels of hierarchy. This relies on the IStyleInfo interface.

virtual void IStyleNameTable::RemoveStyle (UID style)
pure virtual

Remove the (usually a style) from the table.

virtual void IStyleNameTable::SetDefaultFrameGridStyleUID (UID d)
pure virtual

USED ONLY BY OBJECT STYLES CURRENTLY Sets the Default Frame Grid Style for this name table

virtual UID IStyleNameTable::SetDefaultStyleUID (UID d)
pure virtual

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()

virtual void IStyleNameTable::SetDefaultTextStyleUID (UID d)
pure virtual

USED ONLY BY OBJECT STYLES CURRENTLY Sets the Default Text Style for this name table

virtual UID IStyleNameTable::SetRootStyleUID (UID d)
pure virtual

PRIVATE USE ONLY, DO NOT CALL THIS. this is needed for document conversion.