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

Public Types

enum  { kDefaultIID = IID_ITEXTWALKER }
 

Public Member Functions

virtual void Initialize (ITextWalkerClient *pClient, ITextWalkerScope *pScope, IFindChangeOptions *pOptions, void *token=nil)=0
 
virtual bool16 Walk ()=0
 
virtual int32 MoveBy (int32 nDelta)=0
 
virtual void MoveTo (TextIndex nPosition)=0
 
virtual void Suspend ()=0
 
virtual void Halt ()=0
 
virtual bool16 IsSuspended () const =0
 
virtual bool16 IsWalking () const =0
 
virtual TextIndex GetWalkerPosition () const =0
 
virtual ITextWalkerScopeQueryScope ()=0
 
virtual ITextWalkerClientQueryClient ()=0
 
virtual void * GetCursorToken ()=0
 
virtual void SetClientSelection (TextIndex nStart, int32 nLength)=0
 
virtual ITextFocusGetClientSelection (TextIndex *pStart, int32 *pLength) const =0
 
virtual bool16 AdjustRangeToStoryStart (int32 delta)=0
 
virtual bool16 AdjustRangeToStoryEnd (int32 delta)=0
 
virtual void ExtendCurrentRangeToEndOfStory ()=0
 
virtual void ExtendCurrentRangeToStory ()=0
 
virtual IFindChangeOptionsQueryFindChangeOptions ()=0
 
virtual void SetStateForRangeLock (bool16 state)=0
 
virtual bool16 IsCompleted () const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual bool16 ITextWalker::AdjustRangeToStoryEnd (int32 delta)
pure virtual

Resets cursor range to end of the story.

Parameters
deltaDistance to recede for the cursor range.
Returns
bool16 kTrue if range was adjusted successfully.
virtual bool16 ITextWalker::AdjustRangeToStoryStart (int32 delta)
pure virtual

Resets cursor range to start of the story.

Parameters
deltaDistance to advance for the cursor range.
Returns
bool16 kTrue if range was adjusted successfully.
virtual void ITextWalker::ExtendCurrentRangeToEndOfStory ()
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.

virtual void ITextWalker::ExtendCurrentRangeToStory ()
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.

virtual ITextFocus* ITextWalker::GetClientSelection (TextIndex * pStart,
int32 * pLength 
) const
pure virtual

Gets the client focus for current cursor token.

Parameters
pStart[OUT] start text index of retrieved focus.
pLength[OUT] length of the text of retrieved focus.
Returns
ITextFocus* Client focus retrieved.
virtual void* ITextWalker::GetCursorToken ()
pure virtual

Returns current cursor token.

Returns
void* current cursor token.
virtual TextIndex ITextWalker::GetWalkerPosition () const
pure virtual

Returns the last index of the current selection.

Returns
TextIndex last index of the current selection.
virtual void ITextWalker::Halt ()
pure virtual

Halts the walking.

virtual void ITextWalker::Initialize (ITextWalkerClientpClient,
ITextWalkerScopepScope,
IFindChangeOptionspOptions,
void * token = nil 
)
pure virtual

Initializes text walker.

Parameters
pClientUsed to initialize text walker client .
pScopeUsed to initialize text walker scope.
pOptionsUsed to initialize find change options.
tokenUsed to initialize cursor token.
virtual bool16 ITextWalker::IsCompleted () const
pure virtual

Returns whether walking has been completed.

Returns
bool16 kTrue if the walker has been completed.
virtual bool16 ITextWalker::IsSuspended () const
pure virtual

Returns the suspend state.

Returns
bool16 kTrue if the walker is suspended.
virtual bool16 ITextWalker::IsWalking () const
pure virtual

Returns whether walking has been started.

Returns
bool16 kTrue if the walker has been started.
virtual int32 ITextWalker::MoveBy (int32 nDelta)
pure virtual

Moves the walker, returns the amount.

Parameters
nDeltaThe distance to move the walker position.
Returns
int32 real distance which walker position moved.
virtual void ITextWalker::MoveTo (TextIndex nPosition)
pure virtual

Moves the walker.

Parameters
nPositionText index to move the walker position to.
virtual ITextWalkerClient* ITextWalker::QueryClient ()
pure virtual

Queries text walker client.

Returns
ITextWalkerClient* text walker client associated with text walker.
virtual IFindChangeOptions* ITextWalker::QueryFindChangeOptions ()
pure virtual

Returns find change options.

Returns
IFindChangeOptions* find change options associated with text walker.
virtual ITextWalkerScope* ITextWalker::QueryScope ()
pure virtual

Queries text walker scope.

Returns
ITextWalkerScope* text walker scope associated with text walker.
virtual void ITextWalker::SetClientSelection (TextIndex nStart,
int32 nLength 
)
pure virtual

Sets the client focus for current cursor token.

Parameters
nStartstart text index to set focus to.
nLengthlength of the text to set focus to.
virtual void ITextWalker::SetStateForRangeLock (bool16 state)
pure virtual

This method is called when moving backward and change of current range is undesirable. Via this function a lock can be enabled which will disable change in the current range. Note: For every call for a lock there should be a corresponding call for the unlock too.

Parameters
stateIf value is kTrue, the lock is turned on and for the value kFalse, lock is turned off.
virtual void ITextWalker::Suspend ()
pure virtual

Suspends the walking.

virtual bool16 ITextWalker::Walk ()
pure virtual

Walks the text scope.

Returns
bool16 kTrue if successfully walked the scope.