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

#include <ICTextNavigationSuite.h>

Inheritance diagram for ICTextNavigationSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ICTEXTNAVIGATIONSUITE }
 
enum  Units {
  kNone, kChar, kWord, kLine,
  kParagraph, kStory, kSentence
}
 
enum  Direction {
  kNext, kPrev, kStart, kEnd,
  kAll
}
 
enum  ScrollChoice { kDontScrollSelection, kScrollIntoView }
 
enum  LooseEnd { kLooseStart, kLooseEnd }
 

Public Member Functions

virtual bool16 SetTextSelection (const RangeData &range, LooseEnd endUsedLast, ScrollChoice autoScroll, SelectionExtension *extendToUIDPair=nil)=0
 
virtual bool16 SelectAll ()=0
 
virtual bool16 SelectTextAt (TextSelectionIndex nTo, Units nUnits)=0
 
virtual bool16 MoveTextSelection (Units nUnits, Direction nDirection)=0
 
virtual bool16 ExpandTo (TextSelectionIndex nTo)=0
 
virtual bool16 ExpandTextSelection (Units nUnits, Direction nDirection)=0
 
virtual void ResetNavigationState ()=0
 
virtual RangeData GetAnchorData (bool16 *usedEndLast)=0
 
virtual TextIndex InterpretHitTest (int32 clickCount, TextIndex newPosition, TextSelectionIndex *pEnd)=0
 
virtual void MoveSelectionToVisiblePage ()=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

Used to navigate through text in a story

Member Enumeration Documentation

Used to indicate the direction in which to extend/decrease the selection
Enumerator
kNext 

Go forward

kPrev 

Go backward

kStart 

Go to the start

kEnd 

Go to the end

kAll 

No preference

Used to indicate whether the start or end of the selection is allowed to move
Enumerator
kLooseStart 

The start of the selection can move freely

kLooseEnd 

The end of the selection can move freely

Used to indicate whether or not to scroll to the selection
Enumerator
kDontScrollSelection 

Do not scroll the new selection into view

kScrollIntoView 

Scroll the new selection into view

Used to indicate the size to extend/decrease the selection by
Enumerator
kNone 

No preference

kChar 

Extend by a character

kWord 

Extend by a word

kLine 

Extend by a line

kParagraph 

Extend by a paragraph

kStory 

Extend by a story

kSentence 

Extend by a sentence

Member Function Documentation

virtual bool16 ICTextNavigationSuite::ExpandTextSelection (Units nUnits,
Direction nDirection 
)
pure virtual

Expands the selection by a specified unit

Parameters
nUnits- Amount to expand the selection
nDirection- Which way to expand the selection
Returns
- kTrue if selection was set
virtual bool16 ICTextNavigationSuite::ExpandTo (TextSelectionIndex nTo)
pure virtual

Expands the selection to the specified index

Parameters
nTo- Location to expand the selection to
Returns
- kTrue if selection was set
virtual RangeData ICTextNavigationSuite::GetAnchorData (bool16 * usedEndLast)
pure virtual

Returns the location of the anchor point (The end of the selection that is not moving)

Parameters
*usedEndLast- Is this point the end of the selection (kTrue) or the beginning (kFalse)
Returns
- The location of the anchor point
virtual TextIndex ICTextNavigationSuite::InterpretHitTest (int32 clickCount,
TextIndex newPosition,
TextSelectionIndexpEnd 
)
pure virtual

Does what needs to be done when the user clicks, double-clicks, etc. in text.

Parameters
clickCount- The number of clicks received
newPosition- The position of the clicks
*pEnd- Filled with the end of the new selection
Returns
- The start of the new selection
virtual void ICTextNavigationSuite::MoveSelectionToVisiblePage ()
pure virtual

Scrolls the text selection into the window so that it can be viewed

virtual bool16 ICTextNavigationSuite::MoveTextSelection (Units nUnits,
Direction nDirection 
)
pure virtual

Moves the selection by a specified unit

Parameters
nUnits- Amount to move the selection
nDirection- Which way to move the selection
Returns
- kTrue if selection was set
virtual void ICTextNavigationSuite::ResetNavigationState ()
pure virtual

Resets the Up/Down data, anchor data, and end of line data.

virtual bool16 ICTextNavigationSuite::SelectAll ()
pure virtual

Select everything

Returns
- kTrue if selection was set
virtual bool16 ICTextNavigationSuite::SelectTextAt (TextSelectionIndex nTo,
Units nUnits 
)
pure virtual

Moves the selection to the specified index

Parameters
nTo- Location to move the selection to
nUnits- If the index is invalid, then the units are used to figure things out.
Returns
- kTrue if selection was set
virtual bool16 ICTextNavigationSuite::SetTextSelection (const RangeDatarange,
LooseEnd endUsedLast,
ScrollChoice autoScroll,
SelectionExtensionextendToUIDPair = nil 
)
pure virtual

Method to set a text selection.

Parameters
rangeText range to set a text selection on
endUsedLastused for extending selection
autoScrollshould it autoscroll to the newly set selection
extendToUIDPairIf want adjacent track changes to be included in the highlight must set the UID of the track change owned item. this is mainly an internal implementation detail. May pass in nil or nothing to ignore this value (this is the typical case).
Returns
kTrue if selection was set.