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

#include <ITextStoryThread.h>

Inheritance diagram for ITextStoryThread:
IPMUnknownCPMUnknown< ITextStoryThread >HidTxtStoryThread

Public Types

enum  { kDefaultIID = IID_ITEXTSTORYTHREAD }
 

Public Member Functions

virtual IParcelListQueryParcelList () const =0
 
virtual UID GetDictUID () const =0
 
virtual uint32 GetDictKey () const =0
 
virtual TextIndex GetTextStart (int32 *pSpan=nil) const =0
 
virtual TextIndex GetTextEnd (TextIndex *pStart=nil) const =0
 
virtual int32 GetTextSpan (TextIndex *pStart=nil) const =0
 
virtual ITextModelQueryTextModel () const =0
 
virtual UID GetTextStyle () const =0
 
virtual IScriptQueryParent (const ScriptInfo::RequestContext &context) const =0
 
virtual TextIndex GetAdjustedTextStart (const ScriptInfo::RequestContext &context, int32 *pAdjustedSpan) const =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

ITextStoryThreads subdivide the entire length of the ITextModel into discrete ranges that contain at least one paragraph. Each ITextStoryThread is composable into one and only one IParcelList. It is not necessary to have a IParcelList to have a ITextStoryThread, only if it is to be composed in some way.

Examples of objects which implement ITextStoryThread are Table Cells, Footnotes, Notes, Text Macros and Deleted Text.

Every ITextModel has at least one ITextStoryThread that begins at TextIndex zero. This ITextStoryThread is known as the "primary story thread" and is the one that composes into the IParcelList that is mapped to the IFrameList.

ITextStoryThreads are not required to be UID based objects, so their management is handled by a parent UID based object which implements the ITextStoryThreadDict interface. All the ITextStoryThreads managed by the same parent dictionary are stored contiguously and will return the same value for GetDictUID() but will return unique values, with respect to the parent dictionary, for GetDictKey().

See Also
ITextModel
IParcelList
ITextStoryThreadDict
IFrameList

Member Function Documentation

virtual TextIndex ITextStoryThread::GetAdjustedTextStart (const ScriptInfo::RequestContextcontext,
int32 * pAdjustedSpan 
) const
pure virtual

Returns the adjusted thread start/end for the specified scripting context. Some implementations do not support making the full range of the StoryThread available to scripting and this method allows them to clip off the beginning and/or the end of the thread. This adjusted range will limit the natural extensions that take place for scripting objects such as Words, Lines, Paragraphs, etc that occur beyond a sub-range of the thread. Most implementations need simply forward this call to GetTextStart().

Parameters
RequestContextReference to Scripting RequestContext
pAdjustedSpanPointer to out parameter which will be filled in with the adjusted text span
Returns
TextIndex of the adjusted text start

Implemented in HidTxtStoryThread.

virtual UID ITextStoryThread::GetDictUID () const
pure virtual

The Dictionary is a UID based object that implements the ITextStoryThreadDict interfaces.

Returns
UID of parent dictionary boss.

Implemented in HidTxtStoryThread.

virtual TextIndex ITextStoryThread::GetTextEnd (TextIndex * pStart = nil) const
pure virtual

Returns information about the subset of the ITextModel mapped to the ITextStoryThread. The span of the ITextStoryThread is always greater than 0.

Parameters
pStartOptional pointer to out parameter which will be filled in with the TextIndex of the first character in the ITextStoryThread.
Returns
TextIndex within the ITextModel of the last character, plus 1, in the ITextStoryThread.

Implemented in HidTxtStoryThread.

virtual int32 ITextStoryThread::GetTextSpan (TextIndex * pStart = nil) const
pure virtual

Returns information about the subset of the ITextModel mapped to the ITextStoryThread. The span of the ITextStoryThread is always greater than 0.

Parameters
pStartOptional pointer to out parameter which will be filled in with the TextIndex of the first character in the ITextStoryThread.
Returns
Span within the ITextModel.

Implemented in HidTxtStoryThread.

virtual TextIndex ITextStoryThread::GetTextStart (int32 * pSpan = nil) const
pure virtual

Returns information about the subset of the ITextModel mapped to the ITextStoryThread. The span of the ITextStoryThread is always greater than 0.

Parameters
pSpanOptional pointer to out parameter which will be filled in with the span.
Returns
TextIndex within the ITextModel of the first character in the ITextStoryThread.

Implemented in HidTxtStoryThread.

virtual UID ITextStoryThread::GetTextStyle () const
pure virtual

Returns the UID of the style that this story thread uses for story thread attributes.

Returns
The UID of the style applied.

Implemented in HidTxtStoryThread.

virtual IParcelList* ITextStoryThread::QueryParcelList () const
pure virtual

Returns the IParcelList that this ITextStoryThread will compose into.

Returns
Pointer to IParcelList, may be nil.

Implemented in HidTxtStoryThread.

virtual IScript* ITextStoryThread::QueryParent (const ScriptInfo::RequestContextcontext) const
pure virtual

Returns IScript object that is considered to be the Parent of any TextObject in the Thread. See ITextObjectParent for more information.

Parameters
RequestContextReference to Scripting RequestContext
Returns
Pointer to IScript object

Implemented in HidTxtStoryThread.

virtual ITextModel* ITextStoryThread::QueryTextModel () const
pure virtual

Returns the ITextModel that this ITextStoryThread is part of.

Returns
Pointer to ITextModel

Implemented in HidTxtStoryThread.