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

#include <IQuickComposer.h>

Inheritance diagram for IQuickComposer:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IQUICKCOMPOSER }
 

Public Member Functions

virtual void Compose (const UIDRef &textModelRef, int32 startLineIndex, TextIndex textStartPosition, int32 numCharsAdded, bool16 clearLines, bool16 isGalleyDisplayStartPosition=kFalse, bool16 startNewStory=kFalse, RunDescription::RunType startRunTypeClue=RunDescription::regularText)=0
 
virtual bool16 InitializeRange (const UIDRef &textModelRef, TextIndex textStartPosition, TextIndex textEndPosition)=0
 
virtual void CreatePsuedoRange (const UIDRef &textModelRef, TextIndex startIndex, int32 length)=0
 
virtual bool16 UnPsuedoLine (const UIDRef &textModelRef, int32 startLineIndex, IdleTimer *timeCheck)=0
 
virtual TextIndex ComposeRange (const UIDRef &textModelRef, int32 startLineIndex, TextIndex textStartPosition, TextIndex textEndPosition, int32 numCharsAdded, bool16 ownedItemDamage=kFalse)=0
 
virtual bool16 ComposeLine (const UIDRef &textModelRef, int32 at, TextIndex textStartPosition, int32 numCharsAdded, bool16 isGalleyDisplayStartPosition=kFalse, bool16 startNewStory=kFalse, bool16 ownedItemDamage=kFalse)=0
 
virtual void ComposeOversetAle (const UIDRef &textModelRef, int32 startLineIndex, TextIndex textStartPosition, int32 numCharsAdded, int32 startLineNumber)=0
 
virtual int32 ComposeAleLine (const UIDRef &textModelRef, int32 at, LineDescription &description, bool16 layoutLineIsHyphenated=kFalse)=0
 
virtual void SetInstantDraw (bool16 instantDraw)=0
 
virtual bool16 CompositionEnabled ()=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

Methods to compose text in story and galley views.

Member Function Documentation

virtual void IQuickComposer::Compose (const UIDReftextModelRef,
int32 startLineIndex,
TextIndex textStartPosition,
int32 numCharsAdded,
bool16 clearLines,
bool16 isGalleyDisplayStartPosition = kFalse,
bool16 startNewStory = kFalse,
RunDescription::RunType startRunTypeClue = RunDescription::regularText 
)
pure virtual

Compose a range of text for a story view.

Parameters
textModelRefreference of the text model to use.
startLineIndexline where composition should start.
textStartPositiontext index where composition should start can be display index or text model index value of isGalleyDisplayStartPosition tells which.
numCharsAddednumber of characters added or deleted from the model (negative if deleted).
clearLinesused when initializing the view, tells the composer to remove all existing text lines before starting.
isGalleyDisplayStartPositiontell composer whether the textStartPosition is a text model index or a galley display index.
startNewStoryused internally pass false
startRunTypeCluecan be used the help the composer figure out what type of run the textStartPosition starts in.
Returns
none
virtual int32 IQuickComposer::ComposeAleLine (const UIDReftextModelRef,
int32 at,
LineDescriptiondescription,
bool16 layoutLineIsHyphenated = kFalse 
)
pure virtual

Used to compose ale lines to window after layout composition creates the line ends for us.

Parameters
textModelRefreference of the text model to use.
atstartLineIndex of line to compose
descriptioninitial line description created from data in the waxline
layoutLineIsHyphenatedtrue if the associated waxline is ends in a hyphen
Returns
textindex where composition stopped.
virtual bool16 IQuickComposer::ComposeLine (const UIDReftextModelRef,
int32 at,
TextIndex textStartPosition,
int32 numCharsAdded,
bool16 isGalleyDisplayStartPosition = kFalse,
bool16 startNewStory = kFalse,
bool16 ownedItemDamage = kFalse 
)
pure virtual

Compose a specific textline for Story View normally called from Compose().

Parameters
textModelRefreference of the text model to use.
atindex of line to compose
textStartPositiontext model index to start composing at
numCharsAddednumber of characters that the change that caused this compose added or deleted
isGalleyDisplayStartPositionif the textStartPosition is a galleyDisplayIndex pass kTrue for this
startNewStoryinternal use pass kFalse or let auto initialization take care of it
ownedItemDamageinternal use
Returns
textindex where composition stopped.
virtual void IQuickComposer::ComposeOversetAle (const UIDReftextModelRef,
int32 startLineIndex,
TextIndex textStartPosition,
int32 numCharsAdded,
int32 startLineNumber 
)
pure virtual

Compose a Galley View overset line (ALE = accurate line endings). This routine is really a failsafe normally overset lines are composed by normal means because a extra frame is added so to the layout composer there is no difference between overset and normal text while in InCopy. However, some text cannot be composed into a overset frame because it is too big etc. That's where this routine will get called to compose something reasonable for the overset text so that it can be displayed in the galley view. (INCOPY ONLY)

Parameters
textModelRefreference of the text model to use.
startLineIndexof line to compose
textStartPositiontext model index to start composing at
numCharsAddednumber of characters that the change that caused this compose added or deleted
startLineNumberline number to display in info column
Returns
textindex where composition stopped.
virtual TextIndex IQuickComposer::ComposeRange (const UIDReftextModelRef,
int32 startLineIndex,
TextIndex textStartPosition,
TextIndex textEndPosition,
int32 numCharsAdded,
bool16 ownedItemDamage = kFalse 
)
pure virtual

When you know you need to compose through a range of text call this. Useful, when composing attribute changes or similar type things. Returns the last character it composed through

Parameters
textModelRefreference of the text model to use.
startLineIndexindex of line to start composing at
textStartPositiontext model index to start composing at
textEndPositiontext model index to stop composing at (or that it may stop composing at the routine may decide to compose further)
numCharsAddedhow many characters have been added or deleted from the model.
ownedItemDamagetrue if the notes or other owned item type things caused the compose
Returns
textindex where composition stopped.
virtual bool16 IQuickComposer::CompositionEnabled ()
pure virtual

If composition is temporarily suppressed this will return false.

Returns
none
virtual void IQuickComposer::CreatePsuedoRange (const UIDReftextModelRef,
TextIndex startIndex,
int32 length 
)
pure virtual

Used to create a range of lines to compose in the background to speed up opening a new story editor window. Psuedo lines are lines that are not composed but are a placeholder for later replacement with actual true composed TextLines. The ranges to create psuedo lines for are more of a guide the actual psuedo lines will begin and end only at paragraph boundaries.

Parameters
textModelRefreference of the text model to use.
startIndextext model index to start creating psuedo lines for.
lengthhow many characters to create psuedolines for.
Returns
none
virtual bool16 IQuickComposer::InitializeRange (const UIDReftextModelRef,
TextIndex textStartPosition,
TextIndex textEndPosition 
)
pure virtual

When a story is first created or you want to destroy all lines and recreate all or part of them again call this. Will trigger background composition if only some of the story is composed

Parameters
textModelRefreference of the text model to use.
textStartPositiontext model index to start composing at.
textEndPositiontext model index to start composing at.
Returns
none
virtual void IQuickComposer::SetInstantDraw (bool16 instantDraw)
pure virtual

Internal use only

virtual bool16 IQuickComposer::UnPsuedoLine (const UIDReftextModelRef,
int32 startLineIndex,
IdleTimertimeCheck 
)
pure virtual

Given the location of a psuedoline created by CreatePsuedoRange convert the psuedo line to a truly composed line.

Parameters
textModelRefreference of the text model to use.
startLineIndextext model index of the start of the psuedo line.
timeCheckcan pass a time limit (used when called from idle task) to limit the amount of time this routine is allowed to perform its task.
Returns
kTrue if success