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

#include <ITrapStyleListMgr.h>

Inheritance diagram for ITrapStyleListMgr:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITRAPSTYLELISTMGR }
 
enum  { kInvalidStyleIndex = -1, kNoStyleIndex = 0, kDefaultStyleIndex }
 
enum  { kExcludeDefault = (1L<<0) }
 
enum  { kExcludeEditLocked = (1L<<1) }
 
enum  { kExcludeDeleteLocked = (1L<<2) }
 

Public Member Functions

virtual ErrorCode Init (bool16 doCreateBasicStylesOnly=kTrue)=0
 
virtual int32 GetNumStyles (void)=0
 
virtual ErrorCode GetNthStyleName (int32 index, PMString *pName)=0
 
virtual bool32 IsNthStyleEditable (int32 index)=0
 
virtual bool32 IsNthStyleDeleteable (int32 index)=0
 
virtual int32 GetStyleIndexByName (const PMString &pName)=0
 
virtual int32 GetStyleIndexByUID (UID styleUID)=0
 
virtual PMString GetUniqueStyleName (PMString &baseName)=0
 
virtual UIDRef GetNthStyleRef (int32 index)=0
 
virtual PMString GetNoStyleName (void)=0
 
virtual UIDRef GetNoStyleUIDRef (void)=0
 
virtual PMString GetDefaultStyleName (void)=0
 
virtual UIDRef GetDefaultStyleUIDRef (void)=0
 
virtual int32 GetNumReservedStyles (void)=0
 
virtual ErrorCode SetNthStyleName (int32 index, PMString &name)=0
 
virtual ErrorCode AddStyle (PMString &name, bool16 nameLocked=kFalse, bool16 editLocked=kFalse, bool16 deleteLocked=kFalse)=0
 
virtual ErrorCode CopyNthStyle (int32 srcIndex, PMString &newName)=0
 
virtual ErrorCode DeleteNthStyle (int32 index)=0
 
virtual ErrorCode EditNthStyle (int32 index, ITrapStyle *iStyleSetting, bool16 updateLockInfo=kFalse, bool16 nameLocked=kFalse, bool16 editLocked=kFalse, bool16 deleteLocked=kFalse)=0
 
virtual void ListInsert (UID uid, int32 index=-1)=0
 
virtual void ListRemove (int32 index)=0
 
virtual void ListReplace (UID uid, int32 index)=0
 
virtual ErrorCode CopyStyleData (UIDRef srcStyle, UIDRef dstStyle)=0
 
virtual ErrorCode ImportStyles (const UIDRef &, RangeProgressBar *=nil)=0
 
virtual ErrorCode ExportStyles (const UIDRef &, K2Vector< int32 > &indexList, RangeProgressBar *=nil)=0
 
virtual UIDList GetReferencedStyles (const UIDList &styeList, int32 flag)=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 for managing the trap style list in the application or the document workspace.

Member Enumeration Documentation

anonymous enum

kExcludeDefault indicate default styles should be excluded from the search.

anonymous enum

kExcludeDefault indicate all styles that cannot be edited should be excluded from the search.

anonymous enum

kExcludeDefault indicate all styles that cannot be deleted should be excluded from the search.

Member Function Documentation

virtual ErrorCode ITrapStyleListMgr::AddStyle (PMStringname,
bool16 nameLocked = kFalse,
bool16 editLocked = kFalse,
bool16 deleteLocked = kFalse 
)
pure virtual

Add a style with the specified name .

Parameters
indexspecifies the nth style
nameis the new style name
nameLockedis true if name can not be edited,
editLockedis true if none of the properties can be edited
deleteLockedis true if style cannot be delete
Returns
kSuccess if successful otherwise returns an error code
virtual ErrorCode ITrapStyleListMgr::CopyNthStyle (int32 srcIndex,
PMStringnewName 
)
pure virtual

Copy the nth style with the specified new style name.

Parameters
indexspecifies the nth style
newNameis the new style name
Returns
kSuccess if successful otherwise returns an error code
virtual ErrorCode ITrapStyleListMgr::CopyStyleData (UIDRef srcStyle,
UIDRef dstStyle 
)
pure virtual

Copy style settings from srcStyle to the dstStyle.

Parameters
srcStyleis the source style to copy from.
dstStyleis the target style.
virtual ErrorCode ITrapStyleListMgr::DeleteNthStyle (int32 index)
pure virtual

Delete the nth style .

Parameters
indexspecifies the nth style
Returns
kSuccess if successful otherwise returns an error code
virtual ErrorCode ITrapStyleListMgr::EditNthStyle (int32 index,
ITrapStyleiStyleSetting,
bool16 updateLockInfo = kFalse,
bool16 nameLocked = kFalse,
bool16 editLocked = kFalse,
bool16 deleteLocked = kFalse 
)
pure virtual

Edit the nth style with the specified style settings.

Parameters
indexspecifies the nth style
iStyleSettingis the new style name
updateLockInfotrue if the style's lock properties should be udpated
nameLockedis true if name can not be edited
editLockedis true if none of the properties can be edited
deleteLockedis true if style cannot be delete
Returns
kSuccess if successful otherwise returns an error code
virtual ErrorCode ITrapStyleListMgr::ExportStyles (const UIDRef,
K2Vector< int32 > & indexList,
RangeProgressBar = nil 
)
pure virtual

Export a list of styles specified by indexList in the current list to the destination list manager specified by dstListMgrRef.

Parameters
indexListspecifies a list of style to export. If the indexList is empty, export all styles.
pProgressBaseIf a RangeProgressBar proc is passed, progress will be updated.
Returns
kSucess if successful otherwise returns an error code.
virtual PMString ITrapStyleListMgr::GetDefaultStyleName (void )
pure virtual

Returns the style name for the "Default" style.

virtual UIDRef ITrapStyleListMgr::GetDefaultStyleUIDRef (void )
pure virtual

Returns the default "Default" style UIDRef.

virtual PMString ITrapStyleListMgr::GetNoStyleName (void )
pure virtual

Returns the default "No Trap Style" style name.

virtual UIDRef ITrapStyleListMgr::GetNoStyleUIDRef (void )
pure virtual

Returns the default "No Trap Style" style UIDRef.

virtual ErrorCode ITrapStyleListMgr::GetNthStyleName (int32 index,
PMStringpName 
)
pure virtual

Gets the name of the nth style.

Parameters
indexspecifies the nth style to get
pNameis the style name
Returns
kSuccess if successful otherwise returns an error code.
virtual UIDRef ITrapStyleListMgr::GetNthStyleRef (int32 index)
pure virtual

Obtains the UID of the Nth style object.

Parameters
indexspecifies the style index
Returns
the UIDRef of the nth style
virtual int32 ITrapStyleListMgr::GetNumReservedStyles (void )
pure virtual

Get number of reserved styles in the list. Currently two default styles are supported: [No Trap Style] and "Default" Reserved styles are typically grouped at the beginning of the list.

virtual int32 ITrapStyleListMgr::GetNumStyles (void )
pure virtual

Returns the number styles in the list.

virtual UIDList ITrapStyleListMgr::GetReferencedStyles (const UIDListstyeList,
int32 flag 
)
pure virtual

Returns a list style that are used in the database.

Parameters
styeListis the list of style references to check. If style list is empty, then all styles are checked.
flagindicate which style if any to exclude.
Returns
a list of referenced styles
virtual int32 ITrapStyleListMgr::GetStyleIndexByName (const PMStringpName)
pure virtual

Return the index of the given style name.

Parameters
pNamespecifies sytle name
Returns
style index in the list.
virtual int32 ITrapStyleListMgr::GetStyleIndexByUID (UID styleUID)
pure virtual

Return the index of the given style UID.

Parameters
styleUIDspecifies sytle UID
Returns
style index in the list.
virtual PMString ITrapStyleListMgr::GetUniqueStyleName (PMStringbaseName)
pure virtual

Return an unique style name within the style list based on the specified baseName.

Parameters
baseNameis the base name
Returns
an unique style name.
virtual ErrorCode ITrapStyleListMgr::ImportStyles (const UIDRef,
RangeProgressBar = nil 
)
pure virtual

Import the style list specified by the srcListMgrRef into the current list. This method may be processing one or more commands, the caller should enclosed with command sequence for redo/undo.

Parameters
pProgressBaseIf a RangeProgressBar proc is passed, progress will be updated.
Returns
kSucess if successful otherwise returns an error code.
virtual ErrorCode ITrapStyleListMgr::Init (bool16 doCreateBasicStylesOnly = kTrue)
pure virtual

Initialize the trap style list.

Parameters
doCreateBasicStylesOnlyif true it only creates the basic styles.
Returns
kSuccess if successful otherwise returns an error code.
virtual bool32 ITrapStyleListMgr::IsNthStyleDeleteable (int32 index)
pure virtual

Return whether or not the nth style can be deleted.

Parameters
indexspecifies the nth style to get
Returns
true if can be deleted otherwise false.
virtual bool32 ITrapStyleListMgr::IsNthStyleEditable (int32 index)
pure virtual

Return whether or not the nth style is editable.

Parameters
indexspecifies the nth style to get
Returns
true if editable otherwise false.
virtual void ITrapStyleListMgr::ListInsert (UID uid,
int32 index = -1 
)
pure virtual

These manipulate the list. They do NOT do any corresponding maintenance of the style object – they're available for the use of commands which manipulate the list. They should not be used out side of a command!Insert a style UID in list.

Parameters
uidis the style UID to insert is the position to insert at. If index is -1, then uid is appended at the end.
virtual void ITrapStyleListMgr::ListRemove (int32 index)
pure virtual

Remove a style UID from the list.

Parameters
indexis the style to remove
virtual void ITrapStyleListMgr::ListReplace (UID uid,
int32 index 
)
pure virtual

Replace nth style with the specified style UID.

Parameters
uidis the new style UID
indexis the style to replace
virtual ErrorCode ITrapStyleListMgr::SetNthStyleName (int32 index,
PMStringname 
)
pure virtual

Set the style name for the nth style.

Parameters
indexspecifies the nth style
nameis the new style name
Returns
kSuccess if successful otherwise returns an error code