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

#include <IObjectStyleInfo.h>

Inheritance diagram for IObjectStyleInfo:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IOBJECTSTYLEINFO }
 
enum  { kInvalidTimeStamp = 0, kPubConvertedTimeStamp = 1, kRefConvertedTimeStamp = 2 }
 

Public Member Functions

virtual UID GetBasedOn () const =0
 
virtual void SetBasedOn (const UID &newBaseStyleUID)=0
 
virtual const PMStringGetName () const =0
 
virtual void SetName (const PMString &newStyleName, bool16 translatable=kFalse)=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 const PMStringGetBasedOnStyleName () const =0
 
virtual void SetBasedOnStyleName (const PMString &basedOnStyleName)=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

An interface to get object style's name and based on information.

Member Enumeration Documentation

anonymous enum

Timestamp field for style shortcut to be consistent with text style(IStyleInfo.h). It will be better to define them in one place.

Member Function Documentation

virtual UID IObjectStyleInfo::GetBasedOn () const
pure virtual

Get the style UID which this style is based on.

Returns
the UID which this style is based on.
virtual const PMString& IObjectStyleInfo::GetBasedOnStyleName () const
pure virtual

Get based on style name. We don't persist this info and it only facilitate the UI to use based on info, otherwise, we may end up add more interfaces to pass around.

Returns
the PMString.
virtual VirtualKey IObjectStyleInfo::GetKeyboardShortcut (int16 * modifiers) const
pure virtual

Get the keyboard shortcut that triggers this style.

Parameters
modifiersMAY NOT BE NIL.
Returns
VirtualKey.
virtual GlobalTime IObjectStyleInfo::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& IObjectStyleInfo::GetName () const
pure virtual

Returns the style name.

Returns
the PMString.
virtual void IObjectStyleInfo::SetBasedOn (const UIDnewBaseStyleUID)
pure virtual

Set the style UID which this style is based on.

Parameters
newBaseStyleUIDthe style UID which this style is based on.
virtual void IObjectStyleInfo::SetBasedOnStyleName (const PMStringbasedOnStyleName)
pure virtual

Set based on style name. We don't persist this info and it only facilitate the UI to use based on info, otherwise, we may end up add more interfaces to pass around.

Parameters
newStyleNamethe new style name.
virtual void IObjectStyleInfo::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 IObjectStyleInfo::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 IObjectStyleInfo::SetName (const PMStringnewStyleName,
bool16 translatable = kFalse 
)
pure virtual

Set the style name.

Parameters
newStyleNamethe new style name.