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

Public Member Functions | |
| virtual void | InitializeForDraw ()=0 |
| virtual bool16 | IsVisible (const RunDescription &description)=0 |
| virtual bool16 | DrawsText ()=0 |
| virtual bool16 | GetRunThreadData (const RunDescription &description, ITextModel *primaryTextModel, UID &threadDictUID, uint32 &threadDictKey, TextIndex &threadStart, int32 &threadSpan)=0 |
| virtual PMReal | DrawRun (IGraphicsPort *gPort, int32 at, const RunDescription &description, PMRect &runRect, const PMPoint &textDrawPt, int32 runDrawLength, int32 runIndex, bool16 showInvisibles, const PMRect &highlightRect)=0 |
| virtual void | DrawHilite (int32 at, IGraphicsPort *gPort, const PMPoint &scrollCompensationValue)=0 |
| virtual void | DrawHilite (const TextIndex textModelStart, const TextIndex textModelEnd)=0 |
| virtual void | DrawRunOverlap (IGraphicsPort *gPort, int32 at, const RunDescription &description, PMRect &runRect, int32 runIndex)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
ITextRun is an interface that is used to draw individual run types. There are run types for track change text, inline note text, footnote text, inline note begin/end markers and footnote begin/end markers. Regular text is drawn directly in the implementation of ITextRuns so there is no ITextRun implementation for that. More types may be added later. There is no way for a 3rd party to add a new type of runtype currently. There is not a separate instance of this for each run rather one per run type. Data on each individual run is passed in.
| pure virtual |
Called at line draw time to draw the text highlight and is a good place to also draw any custom run background color.
| at | - index of line to highlight |
| gPort | - port to highlight in |
| scrollCompensationValue | - what is the current scroll value for the view |
| pure virtual |
Draw highlight for a specific range of text corresponding to a text run.
| textModelStart | - index to start drawing highlight at in text model indices |
| textModelEnd | - index to end drawing highlight at in text model indices |
| pure virtual |
Given a run description and some information about the port and where and how to draw the run this routine will draw it.
| gPort | - port to draw into |
| at | - index of line the run lives in |
| description | - description of the specific run to draw |
| runRect | - bounds of the run can be altered by this routine to match width actually drawn |
| textDrawPt | - position to start drawing text associated with this run |
| runDrawLength | - how many characters is this run passed in |
| runIndex | - what is the index of the run within the line, passed in. |
| showInvisibles | - visibly show white space characters, passed in |
| highlightRect | - the currently highlighted area rect within a single line. Use to determine background fill rect for the run. |
| pure virtual |
This is used to draw the overlapping portion of runs that draw inbetween two lines. For instance footnotes and inline notes draw a border line inbetween two lines that must occasionally be refreshed when the line next to it gets erased but the line that this line lives in does not.
| gPort | - port to draw into |
| at | - index of line this run lives in |
| description | - information about the run to draw the overlap for |
| runRect | - bounds to draw into |
| runIndex | - index of run with in the line. |
| pure virtual |
Answers the question of whether this run type draws text
| pure virtual |
Implementation of this will return information about the story thread associated with this run type
| description | - passed in describes the specific run instance in the text that thread information is going to be returned for |
| primaryTextModel | - passed in what text model does this run live in |
| threadDictUID | - returns the dict UID for the story thread (see ITextModel) |
| threadDictKey | - returns the threadDictKey for the story thread (see ITextModel) |
| threadStart | - returns the start text Index of the story thread associated with the run passed in via description param |
| threadSpan | - returns the span of the story thread associated with the run passed in via description param |
| pure virtual |
Called at the beginning of each draw of a line to initialize run data if desired
| pure virtual |
Answers the question of whether this run is currently displayed
| description | - what is the information about this run passed in by TextRuns implementation |