InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextWalkerScope Class Referenceabstract
Inheritance diagram for ITextWalkerScope:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITEXTWALKERSCOPE }
 
enum  LockType { kLockForRead, kLockForWrite }
 

Public Member Functions

virtual bool16 LockScope (LockType lockType) const =0
 
virtual bool16 UnlockScope () const =0
 
virtual bool16 IsLocked () const =0
 
virtual bool16 IsEmpty () const =0
 
virtual void SetNextDoc (const UIDRef &doc)=0
 
virtual void SetNextStory (UID story)=0
 
virtual void SetNextRange (const Text::StoryRangeList *list)=0
 
virtual bool16 RemoveDoc (const UIDRef &doc)=0
 
virtual bool16 RemoveStory (const UIDRef &doc, UID story)=0
 
virtual int32 GetCharTotal () const =0
 
virtual const UIDRefGetCursorDoc (void *token) const =0
 
virtual UID GetCursorStory (void *token) const =0
 
virtual ITextFocusGetCursorRange (void *token, bool16 *pAdjustable=nil, int32 *pCharOffset=nil, bool16 searchBackwards=kFalse) const =0
 
virtual bool16 AdjustRangeToStoryStart (void *token, int32 delta)=0
 
virtual bool16 AdjustRangeToStoryEnd (void *token, int32 delta)=0
 
virtual bool16 ExtendRangeToEndOfStory (void *token)=0
 
virtual bool16 ExtendRangeToStory (void *token)=0
 
virtual bool16 MoveToNextDoc (void *token) const =0
 
virtual bool16 MoveToNextStory (void *token) const =0
 
virtual bool16 MoveToNextRange (void *token) const =0
 
virtual void * GetNewCursor (void *basedOn=nil) const =0
 
virtual bool16 ReleaseCursor (void *token) const =0
 
virtual void SetPosition (void *token, TextIndex nPosition)=0
 
virtual TextIndex GetPosition (void *token) const =0
 
virtual void SetClientSelection (void *token, TextIndex nStart, int32 nLength)=0
 
virtual ITextFocusGetClientSelection (void *token, TextIndex &start, int32 &length) const =0
 
virtual void AllowClientSelectionSetRange (void *token, bool16 bAllow)=0
 
virtual void ClearClientSelection (void *token)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Enumeration Documentation

scope state lock type
Enumerator
kLockForRead 

read lock

kLockForWrite 

write lock

Member Function Documentation

virtual bool16 ITextWalkerScope::AdjustRangeToStoryEnd (void * token,
int32 delta 
)
pure virtual

Resets cursor range to end of the story.

Parameters
tokenToken for the cursor range.
deltaDistance to recede for the range.
Returns
bool16 kTrue if range was adjusted successfully.
virtual bool16 ITextWalkerScope::AdjustRangeToStoryStart (void * token,
int32 delta 
)
pure virtual

Resets cursor range to start of the story.

Parameters
tokenToken for the cursor range.
deltaDistance to advance for the range.
Returns
bool16 kTrue if range was adjusted successfully.
virtual void ITextWalkerScope::AllowClientSelectionSetRange (void * token,
bool16 bAllow 
)
pure virtual

Specified whether to allow the client focus to set range.

Parameters
tokentoken for the client focus.
bAllowkTrue if allows to set range, kFalse otherwise.
virtual void ITextWalkerScope::ClearClientSelection (void * token)
pure virtual

Clears client focus for the specified token.

Parameters
tokentoken for the client focus.
virtual bool16 ITextWalkerScope::ExtendRangeToEndOfStory (void * token)
pure virtual

This method is called when we are a full story scope and we wish to limit the walk to the end of the story. In this regard we are really trying to interrupt the full walk and stop at the bottom. If we already have passed the end and are wrapping around then this does nothing.

Parameters
tokentoken for the cursor range.
Returns
bool16 kTrue if range was extended successfully.
virtual bool16 ITextWalkerScope::ExtendRangeToStory (void * token)
pure virtual

This method is called when we are a partial (end-of-story) scope and we wish to limit the walk to the end of the story. Although we expect to only be called with end-of-story scope, this algorithm will extend any scope to the full story.

Parameters
tokentoken for the cursor range.
Returns
bool16 kTrue if range was extended successfully.
virtual int32 ITextWalkerScope::GetCharTotal () const
pure virtual

Gets the total character count in all the doc list documents .

Returns
int32 Total character count.
virtual ITextFocus* ITextWalkerScope::GetClientSelection (void * token,
TextIndex & start,
int32 & length 
) const
pure virtual

Gets the client focus for the specified token.

Parameters
tokentoken for the cursor to get focus.
start[OUT] start text index of retrieved focus.
length[OUT] length of the text of retrieved focus.
Returns
ITextFocus* Client focus for the specified token.
virtual const UIDRef& ITextWalkerScope::GetCursorDoc (void * token) const
pure virtual

Gets document in doc list for the specified token.

Parameters
tokentoken used to retrieve document.
Returns
UIDRef& document retrieved for the token.
virtual ITextFocus* ITextWalkerScope::GetCursorRange (void * token,
bool16 * pAdjustable = nil,
int32 * pCharOffset = nil,
bool16 searchBackwards = kFalse 
) const
pure virtual

Gets cursor range for the specified token.

Parameters
tokentoken used to retrieve cursor range.
pAdjustable[OUT] returns whether the range is adjustable or not when it's not nil. one can only adjust when the cursor is the first of a multi-focus range. In addition, the start of the first range must equal the last of the last range.
pCharOffset[OUT] when non-nil, contains total character count before the range.
searchBackwardsDirection for the current search. Value is kTrue if searching backwards.
Returns
ITextFocus* cursor range for the specified token.
virtual UID ITextWalkerScope::GetCursorStory (void * token) const
pure virtual

Gets story of a document in doc list for the specified token.

Parameters
tokentoken used to retrieve story.
Returns
UID story retrieved for the token.
virtual void* ITextWalkerScope::GetNewCursor (void * basedOn = nil) const
pure virtual

Gets a new cursor based on the token if provided.

Parameters
basedOntoken to be based on for getting the new cursor.
Returns
void* token for the new cursor.
virtual TextIndex ITextWalkerScope::GetPosition (void * token) const
pure virtual

Gets the focus position for the specified cursor.

Parameters
tokentoken for the cursor to get focus from.
Returns
TextIndex text index of the focus position.
virtual bool16 ITextWalkerScope::IsEmpty () const
pure virtual

Checks if doc list is empty.

Returns
bool16 kTrue if the doc list is empty, kFalse if otherwise.
virtual bool16 ITextWalkerScope::IsLocked () const
pure virtual

Checks if scope is lock.

Returns
bool16 kTrue if the scope is unlocked, kFalse if otherwise.
virtual bool16 ITextWalkerScope::LockScope (LockType lockType) const
pure virtual

Sets scope lock state to the specified lock type.

Parameters
lockTypelock type for scope lock state to set to.
Returns
bool16 kTrue if successfully set the lock state.
virtual bool16 ITextWalkerScope::MoveToNextDoc (void * token) const
pure virtual

Moves doc cursor to next document in the doc list.

Parameters
tokentoken for current cursor.
Returns
bool16 kTrue if successfully moved cursor to next document.
virtual bool16 ITextWalkerScope::MoveToNextRange (void * token) const
pure virtual

Moves range cursor to next range in the doc list.

Parameters
tokentoken for current cursor.
Returns
bool16 kTrue if successfully moved cursor to next range.
virtual bool16 ITextWalkerScope::MoveToNextStory (void * token) const
pure virtual

Moves story cursor to next story in the doc list.

Parameters
tokentoken for current cursor.
Returns
bool16 kTrue if successfully moved cursor to next story.
virtual bool16 ITextWalkerScope::ReleaseCursor (void * token) const
pure virtual

Releases the cursor for the specified token.

Parameters
tokentoken for the cursor to be released.
Returns
bool16 kTrue if cursor was released successfully.
virtual bool16 ITextWalkerScope::RemoveDoc (const UIDRefdoc)
pure virtual

Removes the specified document from the doc list.

Parameters
docDocument to be removed.
Returns
bool16 kTrue if successfully removed the document.
virtual bool16 ITextWalkerScope::RemoveStory (const UIDRefdoc,
UID story 
)
pure virtual

Removes the specified story from the specified document in the doc list.

Parameters
docDocument from which the story to be removed.
storyStory to be removed.
Returns
bool16 kTrue if successfully removed the story.
virtual void ITextWalkerScope::SetClientSelection (void * token,
TextIndex nStart,
int32 nLength 
)
pure virtual

Sets the client focus for the specified token.

Parameters
tokentoken for the cursor to set focus.
nStartstart text index to set focus to.
nLengthlength of the text to set focus to.
virtual void ITextWalkerScope::SetNextDoc (const UIDRefdoc)
pure virtual

Adds the specified document to the doc list.

Parameters
docDocument to be added.
virtual void ITextWalkerScope::SetNextRange (const Text::StoryRangeListlist)
pure virtual

Adds the specified story ranges to the document last added.

Parameters
listlist of story ranges to be added.
virtual void ITextWalkerScope::SetNextStory (UID story)
pure virtual

Adds the specified story to the document last added.

Parameters
storyStory to be added.
virtual void ITextWalkerScope::SetPosition (void * token,
TextIndex nPosition 
)
pure virtual

Sets the focus position for the specified cursor.

Parameters
tokentoken for the cursor to be set.
nPositiontext index to set focus to.
virtual bool16 ITextWalkerScope::UnlockScope () const
pure virtual

Releases scope lock.

Returns
bool16 kTrue if successfully released the lock state.