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

#include <IGalleyTextNavigationSuite.h>

Inheritance diagram for IGalleyTextNavigationSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGALLEYTEXTNAVIGATIONSUITE }
 
enum  Units {
  kNone, kChar, kWord, kLine,
  kParagraph, kStory
}
 
enum  Direction {
  kNext, kPrev, kStart, kEnd,
  kAll
}
 

Public Member Functions

virtual bool16 SetTextSelection (TextSelectionIndex nStart, TextSelectionIndex nEnd, bool16 endUsedLast=kTrue, bool16 drawIt=kFalse)=0
 
virtual bool16 SelectAll (bool16 drawIt=kFalse)=0
 
virtual bool16 MoveTextSelection (TextSelectionIndex nTo=kInvalidTextSelectionIndex, bool16 drawIt=kFalse, Units nUnits=kNone, Direction nDirection=kNext)=0
 
virtual bool16 ExpandTextSelection (TextSelectionIndex nTo=kInvalidTextSelectionIndex, bool16 drawIt=kFalse, Units nUnits=kNone, Direction nDirection=kNext)=0
 
virtual bool16 ScrollViewToSelection (TextSelectionIndex nStart, TextSelectionIndex nEnd)=0
 
virtual void Reset ()=0
 
virtual void GetAnchorData (TextSelectionIndex *anchorIndex, bool16 *usedEndLast)=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 galley 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 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

Member Function Documentation

virtual bool16 IGalleyTextNavigationSuite::ExpandTextSelection (TextSelectionIndex nTo = kInvalidTextSelectionIndex,
bool16 drawIt = kFalse,
Units nUnits = kNone,
Direction nDirection = kNext 
)
pure virtual

Expands the selection to the specified index

Parameters
nTo- Location to expand the selection to
drawIt- Should the selection be drawn
nUnits- Amount to expand the selection
nDirection- Which way to expand the selection
Returns
- kTrue if selection was set
virtual void IGalleyTextNavigationSuite::GetAnchorData (TextSelectionIndexanchorIndex,
bool16 * usedEndLast 
)
pure virtual

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

Parameters
*anchorIndex- Index of the anchor point
*usedEndLast- Is this point the end of the selection (kTrue) or the beginning (kFalse)
virtual bool16 IGalleyTextNavigationSuite::MoveTextSelection (TextSelectionIndex nTo = kInvalidTextSelectionIndex,
bool16 drawIt = kFalse,
Units nUnits = kNone,
Direction nDirection = kNext 
)
pure virtual

Moves the selection to the specified index

Parameters
nTo- Location to move the selection to
drawIt- should the selection be drawn
nUnits- If the index is invalid, then the units are used to figure things out.
nDirection- Which way to move the selection
Returns
- kTrue if selection was set
virtual void IGalleyTextNavigationSuite::Reset ()
pure virtual

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

virtual bool16 IGalleyTextNavigationSuite::ScrollViewToSelection (TextSelectionIndex nStart,
TextSelectionIndex nEnd 
)
pure virtual

Scrolls the view to the selection

Parameters
nStart- Start of the selection
nEnd- End of the selection
Returns
- Could the operation be completed
virtual bool16 IGalleyTextNavigationSuite::SelectAll (bool16 drawIt = kFalse)
pure virtual

Select everything

Returns
- kTrue if selection was set
virtual bool16 IGalleyTextNavigationSuite::SetTextSelection (TextSelectionIndex nStart,
TextSelectionIndex nEnd,
bool16 endUsedLast = kTrue,
bool16 drawIt = kFalse 
)
pure virtual

Method to set a text selection.

Parameters
nStart- The beginning of the text range to select
nEnd- The end of the text range to select
endUsedLast- used for extending selection
drawIt- Should the selection be drawn.
Returns
kTrue if selection was set.