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

#include <ITextTarget.h>

Inheritance diagram for ITextTarget:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITEXTTARGET }
 

Public Member Functions

virtual void SetTextFocus (const UIDRef &textModel, const RangeData &range, bool16 doNotify=kTrue)=0
 
virtual void SetTextUnmanaged (const UIDRef &textModel, const RangeData &range, bool16 doNotify=kTrue)=0
 
virtual void ClearTextFocus (bool16 doNotify=kTrue)=0
 
virtual void SetTextModel_Internal (const UIDRef &textModel, bool16 doNotify=kTrue)=0
 
virtual void SetRange_Internal (const RangeData &r, bool16 doNotify=kTrue)=0
 
virtual ITextModelQueryTextModel () const =0
 
virtual UIDRef GetTextModel () const =0
 
virtual RangeData GetRange () const =0
 
virtual ITextFocusQueryTextFocus () const =0
 
virtual void Clear_Internal (bool16 doNotify=kTrue)=0
 
virtual UID GetRangeThreadDictUID () const =0
 
virtual uint32 GetRangeThreadDictKey () const =0
 
virtual bool16 HasContent (void) const =0
 
virtual void Initialize (IDataBase *db)=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

ITextTarget (analogous to ILayoutTarget and ICellFocus) represents a range of a text model for use by suites on the text suite boss (inherited by the text selection boss).

The resemblance to ITextFocus is striking and ITextTarget currently stores and exposes an ITextFocus. (formerly store in the IOldSelection implementation) Eventually the focus boss and concrete selection boss might become one, in which case one of these interfaces will be redundant. That is a larger refactoring than seemed prudent at this time. In the meantime this interface allows the kTextSuiteBoss to be self contained and lets us take another step towards getting rid of the IOldSelection on the text selection boss.

[rrodseth]

Member Function Documentation

virtual void ITextTarget::Clear_Internal (bool16 doNotify = kTrue)
pure virtual

Release the text focus.

virtual void ITextTarget::ClearTextFocus (bool16 doNotify = kTrue)
pure virtual

Clears the text focus

virtual RangeData ITextTarget::GetRange () const
pure virtual

Return the range of text

Returns
RangeData
virtual uint32 ITextTarget::GetRangeThreadDictKey () const
pure virtual

Return the thread dict key of the range's start index

Returns
uint32
virtual UID ITextTarget::GetRangeThreadDictUID () const
pure virtual

Return the thread UID of the range's start index

Returns
uid
virtual UIDRef ITextTarget::GetTextModel () const
pure virtual

Return the UIDRef of the text model associated with this range

Returns
UIDRef
virtual bool16 ITextTarget::HasContent (void ) const
pure virtual

Return whether or not the Text Target references text.

Returns
bool16
virtual void ITextTarget::Initialize (IDataBasedb)
pure virtual

Initialize

Parameters
dbDatabase the text target is associated with.
virtual ITextFocus* ITextTarget::QueryTextFocus () const
pure virtual

Return the text focus, created when a range is first set.

Returns
ITextFocus
virtual ITextModel* ITextTarget::QueryTextModel () const
pure virtual

Return the text model associated with this range

Returns
ITextModel
virtual void ITextTarget::SetRange_Internal (const RangeDatar,
bool16 doNotify = kTrue 
)
pure virtual

Set the range of text

Parameters
rthe range data to set it to
virtual void ITextTarget::SetTextFocus (const UIDReftextModel,
const RangeDatarange,
bool16 doNotify = kTrue 
)
pure virtual

Sets the text focus of the target

Parameters
textModelThe text model
rangethe range data to set it to
virtual void ITextTarget::SetTextModel_Internal (const UIDReftextModel,
bool16 doNotify = kTrue 
)
pure virtual

Initialize the text target with a text model. This must be done before a range can be set.

Parameters
textModelThe text model
virtual void ITextTarget::SetTextUnmanaged (const UIDReftextModel,
const RangeDatarange,
bool16 doNotify = kTrue 
)
pure virtual

Sets the text focus of the target but leaves it unmanaged by the text model so it doesn't get notification when model changes occur hense it isn't modified by deletes, inserts, etc.

Parameters
textModelThe text model
rangethe range data to set it to