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

#include <IPathStrokerList.h>

Inheritance diagram for IPathStrokerList:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPATHSTROKERLIST }
 

Public Member Functions

virtual uint32 GetStrokerCount () const =0
 
virtual IPathStrokerQueryNthStroker (uint32 index) const =0
 
virtual bool16 GetNthStrokerClassAndUID (uint32 index, ClassID &implClass, UID &implUID) const =0
 
virtual bool16 AddStroker (UID stroker, uint32 &index)=0
 
virtual bool16 InsertStroker (UID stroker, uint32 index)=0
 
virtual bool16 RemoveNthStroker (uint32 index)=0
 
virtual bool16 FindStroker (ClassID implClass, UID implUID, uint32 &index) const =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

Interface defining the list of path strokers available in a document.

This includes methods for enumeration of existing strokers, querying by sequence and by ClassID/UID, adding or inserting new a stroker, removing a stroker, and searching for a stroker by ClassID/UID.

Note: There are two different flavors of path stroker in InDesign 3.0:

Static path strokers are implemented as services, and are maintained as holdovers from the InDesign 2.0 and prior stroker architecture. They are identified using their ClassID only (the UID for these strokers will always be kInvalidUID).

Custom path strokers are new to InDesign 3.0. They are implemented internally using a stock path stroker - kCustomPathStrokerBoss - that defers to an instance of IPathStroker identified as a UID. This allows the old model and the new model to co-exist.

Implementation note: The stroker list stores static path strokers in a reserved section at the front of the list. This can impact the use of insert and remove methods. Insert will fail if asked to insert into the static section. Likewise, remove will fail if asked to remove a static stroker.

See Also
IPathStroker

Member Function Documentation

virtual bool16 IPathStrokerList::AddStroker (UID stroker,
uint32 & index 
)
pure virtual

Adds a new stroker to the end of the list. The new stroker must be a valid object in the list's database, must be unique in the list, and must be an instance of kCustomPathStrokerBoss. If path stroker is successfully added, returns kTrue, and index out parameter is set to the stroker's index in the list. Otherwise, kFalse is returned, and index is undefined.

Parameters
strokerIN UID of the stroker to add
indexOUT Index of the path stroker if success, else undefined
Returns
kTrue if successful, else kFalse
virtual bool16 IPathStrokerList::FindStroker (ClassID implClass,
UID implUID,
uint32 & index 
) const
pure virtual

Finds a stroker in the list based on ClassID and UID. If a stroker is found, the method returns kTrue and the index out parameter is set to its index in the list. Otherwise, kFalse is returned and index is undefined.

Parameters
implClassIN ClassID of stroker to find
implUIDIN UID of stroker to find
indexOUT Index of found stroker if successful
Returns
kTrue if stroker is found, else kFalse
virtual bool16 IPathStrokerList::GetNthStrokerClassAndUID (uint32 index,
ClassIDimplClass,
UIDimplUID 
) const
pure virtual

Retrieves class and UID for n'th stroker in the list. If index identifies a valid path stroker, the method returns kTrue, and sets the implClass and implUID out parameters to the ClassID and UID, respectively, of the stroker. Otherwise, kFalse is returned, and the values of implClass and implUID are undefined.

Parameters
indexIN The index of the path stroker
implClassOUT The ClassID of the stroker if success, else undefined
implUIDOUT The UID of the stroker if success, else undefined
Returns
kTrue if successful, else kFalse
virtual uint32 IPathStrokerList::GetStrokerCount () const
pure virtual

Returns count of strokers in the list

Returns
count of strokers in the list
virtual bool16 IPathStrokerList::InsertStroker (UID stroker,
uint32 index 
)
pure virtual

Inserts a new stroker in the list at the given index. The new stroker must be a valid object in the list's database, must be unique in the list, and must be an instance of kCustomPathStrokerBoss. Index must fall within the custom stroker section of the list or the call will fail. If index is greater than the length of the list, the stroker is implicitly added to the end of the list.

If path stroker is successfully added, returns kTrue. Otherwise, kFalse is returned.

Parameters
strokerIN UID of the stroker to add
indexIN Index in the list at which to insert stroker
Returns
kTrue if successful, else kFalse
virtual IPathStroker* IPathStrokerList::QueryNthStroker (uint32 index) const
pure virtual

Queries for the n'th stroker in list. If index identifies a valid path stroker, and AddRef'd instance of the stroker is returned. Otherwise, nil is returned.

Parameters
indexIN The index of the path stroker to query
Returns
The n'th IPathStroker in the list
virtual bool16 IPathStrokerList::RemoveNthStroker (uint32 index)
pure virtual

Removes a stroker from the list. Index must be a valid index in the list and the stroker at index must be custom (static strokers cannot be removed). Returns kTrue if successful. Otherwise kFalse is returned.

Parameters
indexIN Index of the path stroker to remove
Returns
kTrue if successful, else kFalse