![]() | InDesign SDK 20.5 |
#include <ITextFocus.h>

Public Types | |
| enum | { kDefaultIID = IID_ITEXTFOCUS } |
Public Member Functions | |
| virtual void | Initialize (ITextModel *model, const RangeData &range)=0 |
| virtual ITextModel * | QueryModel () const =0 |
| virtual void | PreDirtyFocus ()=0 |
| virtual void | SetRange (bool16 allowNotify, const RangeData &range, bool16 excludeCacheEnd=kTrue)=0 |
| virtual RangeData | GetCurrentRange () const =0 |
| virtual TextIndex | GetStart (RangeData::Lean *lean) const =0 |
| virtual TextIndex | GetEnd () const =0 |
| virtual bool16 | IsRange () const =0 |
| virtual uint32 | Length () const =0 |
| virtual void | Inserted (TextIndex start, int32 count, bool16 allowNotify)=0 |
| virtual void | Deleted (TextIndex start, int32 count, bool16 allowNotify)=0 |
| virtual void | Update (const ITextFocusManager::FocusUpdateInfoList &updateInfoList, bool16 allowNotify)=0 |
| virtual void | NotifyChanged (bool16 excludeCacheEnd=kTrue)=0 |
| virtual void | DeRegisterFromModel (void)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface describes a text selection. It describes the start, end and the story selected. There are methods to get and set the range. In the current implementation, the TextModel has a TextFocusManager that maintains the foci positions during editing.
| pure virtual |
Only called by the TextFocusManager to maintain foci during editing.
| start | is the location of the delete. |
| count | is the number of characters deleted. |
| allowNotify | tells whether to tell the focus cache about the change. |
| pure virtual |
Get the range of text in the selection.
| pure virtual |
Get the end of the selection.
| pure virtual |
Get the start of the selection. Lean indicates whether the caret "sticks" left or right. This affects shift selecting among other things.
| lean | is set based on the direction stickiness of the selection. |
| pure virtual |
Initialize the TextFocus. DO NOT call this to move a selection from one model to another, that isn't supported, and is done through ITextFocusManager.
| model | is the textModel. is the selection start/end. |
| pure virtual |
Only called by the TextFocusManager to maintain foci during editing.
| start | is the location of the insert. |
| count | is the number of characters inserted. |
| allowNotify | tells whether to tell the focus cache about the change. |
| pure virtual |
Get whether a range of text is selected. The alternative is a caret.
| pure virtual |
| pure virtual |
NotifyChanged is called during the undo/redo of certain Text editing operations to try and maintain a legal selection.
| excludeCacheEnd | indicates whether the range-damage (IFocusCache) will damage when at the end. |
| pure virtual |
This function must be called before the text focus scope changes.
Provide an implementation of PreDirty that will help restore the text focus at undo and redo.
| pure virtual |
Query for the TextModel from this focus
| pure virtual |
Only called by the TextFocusManager to maintain foci during editing.
| updateInfoList | is a list of changes. |
| allowNotify | tells whether to tell the focus cache about the change. |