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

#include <IStyleInfo.h>

Inheritance diagram for IStyleInfo:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISTYLEINFO }
 
enum  { kInvalidTimeStamp = 0, kPubConvertedTimeStamp = 1, kRefConvertedTimeStamp = 2 }
 
enum  StyleType { kCharacterStyle = 0, kParagraphStyle = 1, kTableStyle = 2, kCellStyle = 3 }
 

Public Member Functions

virtual UID GetBasedOn () const =0
 
virtual UID GetNextStyle () const =0
 
virtual UID GetCharStyle () const =0
 
virtual UID GetPreviewColor () const =0
 
virtual const PMStringGetName () const =0
 
virtual bool16 IsStyleImported () const =0
 
virtual void SetBasedOn (const UID &base)=0
 
virtual void SetNextStyle (const UID &next)=0
 
virtual void SetCharStyle (const UID &charStyle)=0
 
virtual void SetPreviewColor (const UID &color)=0
 
virtual void SetName (const PMString &s, bool16 translatable=kFalse)=0
 
virtual void SetIsStyleImported (bool16 isStyleImported)=0
 
virtual void SetKeyboardShortcut (VirtualKey virtualKey, int16 modifiers)=0
 
virtual VirtualKey GetKeyboardShortcut (int16 *modifiers) const =0
 
virtual GlobalTime GetKeyboardShortcutTimeStamp () const =0
 
virtual void SetKeyboardShortcutTimeStamp (GlobalTime gtime)=0
 
virtual void SetStyleType (IStyleInfo::StyleType styleType)=0
 
virtual IStyleInfo::StyleType GetStyleType () const =0
 
virtual void Copy (const IStyleInfo *other)=0
 
virtual void SetUniqueID (const PMString &uniqueId)=0
 
virtual const PMStringGetUniqueID () const =0
 
virtual void GenerateAndSetUniqueID ()=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

Data interface for the non-attribute parts of a style. Usually, but not necessarily a text style. Necessary for anything listed by an IStyleNameTable. May be part of the style itself, or part of a command that operates on styles.

See Also
KeyboardDefs.h
IStyleNameTable

Member Function Documentation

virtual void IStyleInfo::Copy (const IStyleInfoother)
pure virtual

Copy the style information from one IStyleInfo instance to this instance.

Parameters
otherthe style information to copy. MAY NOT BE NIL.
virtual void IStyleInfo::GenerateAndSetUniqueID ()
pure virtual

FOR INTERNAL USE ONLY Generates a unique ID and sets it for the style.

virtual UID IStyleInfo::GetBasedOn () const
pure virtual

Get the UID of the style this style is based on

virtual UID IStyleInfo::GetCharStyle () const
pure virtual

Unsupported at this time. Do not use.

virtual VirtualKey IStyleInfo::GetKeyboardShortcut (int16 * modifiers) const
pure virtual

Get the VirtualKey for the keyboard shortcut that triggers this style.

Parameters
modifiersMAY NOT BE NIL
virtual GlobalTime IStyleInfo::GetKeyboardShortcutTimeStamp () const
pure virtual

Get the keyboard shortcut time stamp. If two styles share the same keyboard shortcut, the one with the newer time stamp is used.

virtual const PMString& IStyleInfo::GetName () const
pure virtual

Get the name of this style.

virtual UID IStyleInfo::GetNextStyle () const
pure virtual

Get the UID of the next style. Only applicable to paragraph styles. Only applied after typing a <CR>

virtual UID IStyleInfo::GetPreviewColor () const
pure virtual

Get the color UID to use for the style preview mode.

virtual IStyleInfo::StyleType IStyleInfo::GetStyleType () const
pure virtual

Get the type of the style see

Returns
styleType
virtual const PMString& IStyleInfo::GetUniqueID () const
pure virtual

FOR INTERNAL USE ONLY Get the unique id of this style. Can return empty string if no unique id has been set.

virtual bool16 IStyleInfo::IsStyleImported () const
pure virtual

Was this style imported? Usually during a <Place> operation.

virtual void IStyleInfo::SetBasedOn (const UIDbase)
pure virtual

Set the UID of the style this style is based on. There may be restrictions. For example, you cannot create cycles and paragraph styles must be based on [No Paragraph Style].

Parameters
baseis the UID of the style to base this one on.
virtual void IStyleInfo::SetCharStyle (const UIDcharStyle)
pure virtual

Unsupported at this time. Do not use.

virtual void IStyleInfo::SetIsStyleImported (bool16 isStyleImported)
pure virtual

Is this style a paragraph style?

Parameters
isParaStyleDEPRECATED – used SetStyleType since we now support other style types! Is this style imported?
isStyleImported
virtual void IStyleInfo::SetKeyboardShortcut (VirtualKey virtualKey,
int16 modifiers 
)
pure virtual

Set the keyboard shortcut that triggers this style.

Parameters
virtualKeyis the key code.
modifiersare the modifier keys.
See Also
KeyboardDefs.h
virtual void IStyleInfo::SetKeyboardShortcutTimeStamp (GlobalTime gtime)
pure virtual

Set the keyboard shortcut time stamp. If two styles share the same keyboard shortcut, the one with the newer time stamp is used.

Parameters
gtimespecifies the current time, used to compare conflicted shortcuts.
virtual void IStyleInfo::SetName (const PMStrings,
bool16 translatable = kFalse 
)
pure virtual

Set the name of this style.

Parameters
sis the style name.
translatablewould always be kFalse for user-specified names. [No Paragraph Style] is translated, for example.
virtual void IStyleInfo::SetNextStyle (const UIDnext)
pure virtual

Set the UID of the next style. Only applicable to paragraph styles. Only applied after typing a <CR>

Parameters
baseis the UID of the style that would follow this one.
virtual void IStyleInfo::SetPreviewColor (const UIDcolor)
pure virtual

Get the color UID to use for the style preview mode.

virtual void IStyleInfo::SetStyleType (IStyleInfo::StyleType styleType)
pure virtual

Sets the type of the style see

Parameters
styleType
virtual void IStyleInfo::SetUniqueID (const PMStringuniqueId)
pure virtual

FOR INTERNAL USE ONLY Sets the unique id for the style.