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

#include <IItemStrand.h>

Inheritance diagram for IItemStrand:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IITEMSTRAND }
 

Public Member Functions

virtual void SetOwnedUID (TextIndex position, ClassID objectType, UID object)=0
 
virtual UID GetOwnedUID (TextIndex position, ClassID objectType, int32 *count=nil, TextIndex *runBegin=nil)=0
 
virtual void GetAllItems (TextIndex position, int32 length, UIDList *uidListToFill, ClassList *classListToFill=nil)=0
 
virtual int32 CountOwnedItems (TextIndex position, int32 *count=nil, TextIndex *runBegin=nil)=0
 
virtual UID GetNthOwnedUID (TextIndex position, int32 n, ClassID *objectType, int32 *count=nil, TextIndex *runBegin=nil)=0
 
virtual TextIndex GetOwnedItemIndex (ClassID objectType, UID object, TextIndex hint=0)=0
 
virtual TextIndex GetOwnedItemIndex (const IOwnedItem *ownedItem) const =0
 
virtual void CollectOwnedItems (TextIndex start, int32 len, OwnedItemDataList *resultList) 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 to the owned item strand.

Member Function Documentation

virtual void IItemStrand::CollectOwnedItems (TextIndex start,
int32 len,
OwnedItemDataListresultList 
) const
pure virtual

Collect all owned items in a range.

Parameters
startIN range start,
lenIN range length.
resultListOUT list of the offset in the story, class id, and uid of each owned item found.
virtual int32 IItemStrand::CountOwnedItems (TextIndex position,
int32 * count = nil,
TextIndex * runBegin = nil 
)
pure virtual
Returns
the number of owned items referenced at a position.
Parameters
positionIN text index where we should look.
countOUT length from position to the end of the range where the owned items are referenced.
runBeginOUT text index of the beginning of the range where the owned items are referenced.
virtual void IItemStrand::GetAllItems (TextIndex position,
int32 length,
UIDListuidListToFill,
ClassListclassListToFill = nil 
)
pure virtual
Returns
all owned items referenced in a range.
Parameters
positionIN start of range.
lengthIN length of the range.
uidListToFillOUT list of found owned item uids
classListToFillOUT list of found owned item classes.
virtual UID IItemStrand::GetNthOwnedUID (TextIndex position,
int32 n,
ClassIDobjectType,
int32 * count = nil,
TextIndex * runBegin = nil 
)
pure virtual
Returns
the uid of the nth owned item referenced at a certain position.
Parameters
positionIN text index where to look.
nIN rank of the owned item to look for.
objectTypeOUT class of owned item.
countOUT length from position to the end of the range where the owned item is referenced. runBegin OUT text index of the beginning of the range where the owned item is referenced.
virtual TextIndex IItemStrand::GetOwnedItemIndex (ClassID objectType,
UID object,
TextIndex hint = 0 
)
pure virtual
Returns
the position where an owned item is referenced.
Parameters
objectTypeIN class of owned item.
objectIN uid of owned item.
hintIN helps speed up the search if caller has an idea where the owned item may be located.
virtual TextIndex IItemStrand::GetOwnedItemIndex (const IOwnedItemownedItem) const
pure virtual
Returns
the position where an owned item is referenced.
Parameters
ownedItemIN an interface pointer to the owned item.
virtual UID IItemStrand::GetOwnedUID (TextIndex position,
ClassID objectType,
int32 * count = nil,
TextIndex * runBegin = nil 
)
pure virtual
Returns
the uid of the owned item with a certain class referenced at a certain position. Return kInvalidUID if such an owned item does not exist.
Parameters
positionIN text index of owned item.
objectTypeIN class of owned item.
countOUT length from position to the end of the range where the owned item is referenced. runBegin OUT text index of the beginning of the range where the owned item is referenced.
virtual void IItemStrand::SetOwnedUID (TextIndex position,
ClassID objectType,
UID object 
)
pure virtual

Insert an owned item at a certain position. If an owned item with the same class already exists at this location, replace it.

Parameters
positionIN text index where to reference owned item.
objectTypeIN class of owned item.
objectIN uid of owned item.