InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IParagraphComposer::RecomposeHelper Class Referenceabstract
Inheritance diagram for IParagraphComposer::RecomposeHelper:
IParagraphComposer::Tiler

Public Member Functions

virtual IDataBaseGetDataBase () const =0
 
virtual IComposeScannerGetComposeScanner () const =0
 ComposeScanner for the story being composed.
 
virtual TextIndex GetThreadStart () const =0
 Return the starting TextIndex of the TextStoryThread being composed.
 
virtual int32 GetThreadSpan () const =0
 Return the span of the TextStoryThread being composed.
 
virtual TextIndex GetThreadEnd () const =0
 Return the ending TextIndex of the TextStoryThread being composed.
 
virtual TextIndex GetParagraphStart () const =0
 Return the TextIndex of the start of the paragraph.
 
virtual int32 GetParagraphSpan () const =0
 Returns the span of the paragraph including the final CR.
 
virtual TextIndex GetParagraphEnd () const =0
 Return the TextIndex of the end of the paragraph.
 
virtual const ITextParcelListGetTextParcelList () const =0
 ITextParcelList for the TextStoryThread being composed.
 
virtual bool16 ShouldFakeTabAlignToChar () const =0
 
virtual const ITextOptionsGetTextOptions () const =0
 
virtual const IStoryOptionsGetStoryOptions () const =0
 
virtual bool16 GetIsVertical () const =0
 
virtual IPairKernDictGetPairKernDict (ClassID whichAlgorithm) const =0
 
virtual IEdgeAlignDictGetEdgeAlignDict (ClassID whichAlgorithm) const =0
 
virtual IHyphenationServiceGetSimpleHyphenator () const =0
 
virtual IHyphenationServiceGetHyphenator (const ILanguage *pLanguage) const =0
 
virtual IHyphenationExceptionsGetHyphenationExceptions (bool16 *pCheckUserDictionary) const =0
 
virtual IdleTimerGetIdleTimer () const =0
 
virtual const
OwnedItemDataList::const_iterator 
GetOwnedItemBeginIter () const =0
 
virtual const
OwnedItemDataList::const_iterator 
GetOwnedItemEndIter () const =0
 
virtual bool16 GetOwnedItemsHaveStandOffsIn (TextIndex start, TextIndex end) const =0
 
virtual TextIndex GetStartingTextIndex () const =0
 
virtual ParcelKey GetStartingParcelKey () const =0
 Returns the ParcelKey of the Parcel where tiling should begin from.
 
virtual PMReal GetStartingYPosition () const =0
 Returns the YPosition where tiling should begin from.
 
virtual bool16 GetKeptWithPrevByNextNLines () const =0
 
virtual bool16 GetKeptWithPrevByFirstNLines () const =0
 
virtual bool16 GetKeptWithPrevByAllLines () const =0
 
virtual bool16 GetIsContentDamaged () const =0
 
virtual bool16 GetIsKeepsDamaged () const =0
 
virtual bool16 GetParagraphCalculatedStateInvalid () const =0
 
virtual TextIndex GetWaxLineTextIndex () const =0
 
virtual ParcelKey GetWaxLineParcelKey () const =0
 
virtual PMReal GetWaxLineCompositionYPosition () const =0
 
virtual PMReal GetWaxLineLineHeightLeadingDiff () const =0
 
virtual bool16 GetWaxLineKeepsViolation () const =0
 
virtual int32 GetWaxLineTextSpan () const =0
 
virtual const IWaxLineGetPreviousWaxLine () const =0
 
virtual TextIndex GetPreviousWaxLineTextIndex () const =0
 
virtual uchar GetPreviousHyphenLadderPattern () const =0
 
virtual IWaxIteratorNewWaxIterator (bool16 changeAware=kFalse) const =0
 
virtual bool16 BackupTowardsParagraphStart ()=0
 
virtual bool16 BackupOneLineTowardsParagraphStart ()=0
 
virtual bool16 DestroyAllWaxLinesInParagraph ()=0
 
virtual void OwnedItemsChanged ()=0
 
virtual IWaxLineQueryNewWaxLine () const =0
 Creates a new IWaxLine suitable for applying into the WaxStrand.
 
virtual void ApplyComposedLine (IWaxLine *newWaxLine, int32 newTextSpan, bool16 disableApplyDamage=kFalse, bool16 disableApplyInval=kFalse, bool16 forceInkCache=kFalse)=0
 
virtual void SetNoShuffle ()=0
 
virtual void MarkContentDamage (int32 nChars)=0
 
virtual void ResetDamageToContent ()=0
 
virtual void MarkContentDamagePreviousAt (TextIndex at)=0
 
virtual void SetDeferredCompositionDueToKeeps ()=0
 
virtual TextIndex GetNoDamageBackTextIndex ()=0
 
virtual int32 GetShapingEngine () const =0
 
virtual void SetShapingEngine (int32 shapingEngine)=0
 
- Public Member Functions inherited from IParagraphComposer::Tiler
virtual IParcelListGetParcelList () const =0
 
virtual ParcelKey GetFirstParcelKey () const =0
 
virtual ParcelKey GetNextParcelKey (ParcelKey key) const =0
 
virtual bool16 GetHasAnyValidStartBreakLocation () const =0
 
virtual bool16 GetParcelIsValidStartBreakLocation (ParcelKey key, Text::StartBreakLocation mode) const =0
 
virtual ParcelKey GetNextParcelKeyByBreak (ParcelKey key, Text::StartBreakLocation mode) const =0
 
virtual ParcelKey GetPreviousParcelKey (ParcelKey key) const =0
 
virtual bool16 MoveToTopNextParcelByBreak (Text::StartBreakLocation mode, ParcelKey *pKey, PMReal *pYPosition) const =0
 
virtual PMRect GetParcelContentBounds (ParcelKey key) const =0
 
virtual bool16 GetParcelContentIsAnArea (ParcelKey key) const =0
 
virtual bool16 GetHasAnyIntrusionsAt (ParcelKey key) const =0
 
virtual PMReal GetParcelEffectiveVerticalSpacing (ParcelKey key) const =0
 
virtual UID GetParcelFrameUID (ParcelKey key) const =0
 
virtual PMMatrix GetParcelContentToFrameMatrix (ParcelKey key) const =0
 
virtual bool16 GetParcelAppearsMultiplePlaces (ParcelKey key) const =0
 
virtual bool16 GetTiles (PMReal minWidth, PMReal height, PMReal TOPHeight, Text::GridAlignmentMetric gridAlignment, PMReal gridAlignmentAdj, Text::LeadingModel leadingModel, PMReal leading, PMReal leadingModelOffset, PMReal minHeightLeadingDiff, TextIndex nCurrentPosition, bool16 affectedByVerticalJustification, ParcelKey *pParcelKey, PMReal *pYOffset, Text::FirstLineOffsetMetric *pTOPHeightMetric, PMRectCollection &tiles, bool16 *pAtTOP, bool16 *pParcelPositionDependent, PMReal *pLeftMargin, PMReal *pRightMargin) const =0
 
virtual PMReal GetParcelGrowableContentBottom (ParcelKey key) const =0
 In the context of the composing paragraph.
 
virtual PMReal GetParcelTileableContentTop (ParcelKey key) const =0
 
virtual PMReal GetParcelTileableContentBottom (ParcelKey key) const =0
 
virtual bool16 GetParcelShouldInvalNewWax (ParcelKey key) const =0
 

Member Function Documentation

virtual void IParagraphComposer::RecomposeHelper::ApplyComposedLine (IWaxLinenewWaxLine,
int32 newTextSpan,
bool16 disableApplyDamage = kFalse,
bool16 disableApplyInval = kFalse,
bool16 forceInkCache = kFalse 
)
pure virtual

Apply a WaxLine into the WaxStrand previously created by a call to QueryNewWaxLine(). The TextIndex used for the apply will be the current value returned by GetStartingTextIndex() which will be advanced by this call by the amount of newTextSpan. By default, the next WaxLine in the same TextStoryThread will be Geometry damaged, but this can be disabled by setting 'applyDamageDisable' to kTrue.

Parameters
newWaxLine
newTextSpan
applyDamageDisableIf set to kTrue, the next WaxLine will NOT be Geometry damaged after the new WaxLine is applied.
disableApplyInvalSome composers take responsibility for invalidating sub-portions of the WaxLine being composed and thus do not want the WaxStrand to automatically invalidate the entire WaxLine on apply. This applies to both the invaliation of the target WaxLine AND the new WaxLine.
forceInkCacheIf kTrue, the WaxLine will be asked for its InkBounds after it has been applied.
virtual bool16 IParagraphComposer::RecomposeHelper::BackupOneLineTowardsParagraphStart ()
pure virtual

This method is similar to BackupTowardsPargraphStart() with the exception that it always succeeds, as long as the starting TextIndex is not already at the beginning of the Paragraph, and is not stopped by the presence of soft CRs and WaxAnchors. Note that after successfully backing up any amount the callee MUST not attempt to apply new WaxLines and should instead return kFalse from Recompose() immediately. The ParagraphComposer will be called back at a later time with the new starting TextIndex.

Returns
kTrue if the position changed.
virtual bool16 IParagraphComposer::RecomposeHelper::BackupTowardsParagraphStart ()
pure virtual

The implementation is given the opportunity to adjust the starting TextIndex of the composition, potentially adjusting the starting TextIndex all the way back to the beginning of the paragraph. This method and BackupOneLineTowardsParagraphStart() are the only approved ways for implementations to change the TextIndex that they are asked to compose at. Note that this method may not succeed in backing up all the way to the paragraph start because of the presence of Keeps damage, soft CRs and WaxAnchors, although it may succeeded in changing the starting TextIndex part way. Callers should call GetStartingTextIndex() to determine the new TextIndex. Note that after successfully backing up any amount the callee MUST not attempt to apply new WaxLines and should instead return kFalse from Recompose() immediately. The ParagraphComposer will be called back at a later time with the new starting TextIndex.

Returns
kTrue if the position changed.
virtual bool16 IParagraphComposer::RecomposeHelper::DestroyAllWaxLinesInParagraph ()
pure virtual

All WaxLines in the Paragraph are marked destroyed.

Returns
kTrue if the implementation damaged behind the current point of composition.
virtual IdleTimer* IParagraphComposer::RecomposeHelper::GetIdleTimer () const
pure virtual

Returns optional Idle timer. Implementations are encouraged to call this function to see if composition should be interrupted once they have made some progress.

virtual bool16 IParagraphComposer::RecomposeHelper::GetIsContentDamaged () const
pure virtual

Returns kTrue if the WaxLine at the TextIndex returned by GetStartingTextIndex() is Content damaged.

virtual bool16 IParagraphComposer::RecomposeHelper::GetIsKeepsDamaged () const
pure virtual

Returns kTrue if the WaxLine at the TextIndex returned by GetStartingTextIndex() is Keeps damaged.

virtual bool16 IParagraphComposer::RecomposeHelper::GetKeptWithPrevByAllLines () const
pure virtual

Returns kTrue if the newly composed WaxLine will be kept with the previous WaxLine because of KeepTogether. kFalse if otherwise.

virtual bool16 IParagraphComposer::RecomposeHelper::GetKeptWithPrevByFirstNLines () const
pure virtual

Returns kTrue if the newly composed WaxLine will be kept with the previous WaxLine because of KeepFirstNLines. kFalse if otherwise.

virtual bool16 IParagraphComposer::RecomposeHelper::GetKeptWithPrevByNextNLines () const
pure virtual

Returns kTrue if the newly composed WaxLine will be kept with the previous WaxLine because of KeepWithNextNLines. kFalse if otherwise.

virtual TextIndex IParagraphComposer::RecomposeHelper::GetNoDamageBackTextIndex ()
pure virtual

ADOBE INTERNAL USE ONLY

virtual const OwnedItemDataList::const_iterator IParagraphComposer::RecomposeHelper::GetOwnedItemBeginIter () const
pure virtual

Returns a "begin" iterator to a private OwnedItemDataList representing the OwnedItems in the span fromthe initial value for GetStartingTextIndex() to the end of the current Paragraph.

Returns
begin iterator
virtual const OwnedItemDataList::const_iterator IParagraphComposer::RecomposeHelper::GetOwnedItemEndIter () const
pure virtual

Returns a "begin" iterator to a private OwnedItemDataList representing the OwnedItems in the span fromthe initial value for GetStartingTextIndex() to the end of the current Paragraph.

Returns
end iterator
virtual bool16 IParagraphComposer::RecomposeHelper::GetOwnedItemsHaveStandOffsIn (TextIndex start,
TextIndex end 
) const
pure virtual

Returns kTrue if any OwnedItems in the specified range has a StandOff which affects Text composition. It is recommended that clients call this method rather than computing this on their own to avoid duplication of effort.

virtual bool16 IParagraphComposer::RecomposeHelper::GetParagraphCalculatedStateInvalid () const
pure virtual

Returns kTrue at the start of the Paragraph if the calculated state from the ParagraphStrand is invalid. Note that at the time of the call the state will have been already been set valid.

Returns
kTrue if the state was invalid
virtual uchar IParagraphComposer::RecomposeHelper::GetPreviousHyphenLadderPattern () const
pure virtual

Returns the hyphenation ladder pattern for previous WaxLines in the same paragraph and in the same Parcel as returned by a call to GetStartingParcelKey(). The LSB bit of the uchar will be 1 in the previous WaxLine (as returned by GetPreviousWaxLine()) has a hyphen and on in the same way until the MSB bit of the uchar correponding to the 8th previous WaxLine.

virtual const IWaxLine* IParagraphComposer::RecomposeHelper::GetPreviousWaxLine () const
pure virtual

Returns a pointer to the (undamaged) WaxLine previous to the one returned by GetWaxLine(). Return nil if the current WaxLine is at the beginning of the TextStoryThread.

virtual TextIndex IParagraphComposer::RecomposeHelper::GetPreviousWaxLineTextIndex () const
pure virtual

Returns the starting TextIndex of the previous WaxLine. The span of the previous WaxLine can be computed by simply subtracting the TextIndex of the current WaxLine from the value returned by this method.

virtual int32 IParagraphComposer::RecomposeHelper::GetShapingEngine () const
pure virtual

ADOBE INTERNAL USE ONLY

virtual TextIndex IParagraphComposer::RecomposeHelper::GetStartingTextIndex () const
pure virtual

Returns the TextIndex of the WaxLine returned by GetWaxLine(). Note that as new WaxLines are applied through ApplyComposedLine() the value returned by this method will increase by the span of the WaxLine applies.

virtual PMReal IParagraphComposer::RecomposeHelper::GetWaxLineCompositionYPosition () const
pure virtual

If GetIsContentDamaged() returns kTrue, then this method will return the CompositionYPosition of the damaged WaxLine, otherwise it will return 0.0.

virtual bool16 IParagraphComposer::RecomposeHelper::GetWaxLineKeepsViolation () const
pure virtual

If GetIsContentDamaged() returns kTrue, then this method will return the KeepsViolation of the damaged WaxLine, otherwise it will return kFalse.

virtual PMReal IParagraphComposer::RecomposeHelper::GetWaxLineLineHeightLeadingDiff () const
pure virtual

If GetIsContentDamaged() returns kTrue, then this method will return the LineHeightLeadingDiff of the damaged WaxLine, otherwise it will return 0.0.

virtual ParcelKey IParagraphComposer::RecomposeHelper::GetWaxLineParcelKey () const
pure virtual

If GetIsContentDamaged() returns kTrue, then this method will return the ParcelKey of the damaged WaxLine, otherwise it will return an invalid ParcelKey.

virtual TextIndex IParagraphComposer::RecomposeHelper::GetWaxLineTextIndex () const
pure virtual
Returns
TextIndex of current waxWaxLine.
virtual int32 IParagraphComposer::RecomposeHelper::GetWaxLineTextSpan () const
pure virtual

Returns the current TextSpan ofthe damaged WaxLine. Note that this span may exceed the end of the current Paragraph.

virtual void IParagraphComposer::RecomposeHelper::MarkContentDamage (int32 nChars)
pure virtual

Starting with the current WaxLine returned by GetWaxLine(), enough WaxLines to cover the specified number of characters will be Content damaged. Note that if the WaxLines already have more severe damage, such as Geometry or Destroyed, then this method will have no effect.

virtual void IParagraphComposer::RecomposeHelper::MarkContentDamagePreviousAt (TextIndex at)
pure virtual

The WaxLine at the specified TextIndex is content damaged. The specified TextIndex must be less than the current value returned by GetStartingTextIndex() and be within the same TextStoryThread. Unlike the other calls to affect damage, the WaxLines(s) will only be damaged when the ParagraphComposer returns from Recompose().

virtual IWaxIterator* IParagraphComposer::RecomposeHelper::NewWaxIterator (bool16 changeAware = kFalse) const
pure virtual
Returns
a ptr to a new WaxIterator so caller can glean information about previously applied WaxLines. See IWaxStrand for more information. This is not an InterfacePtr! Should be put into a K2::scoped_ptr<IWaxIterator>.
virtual void IParagraphComposer::RecomposeHelper::OwnedItemsChanged ()
pure virtual

This method tells the implementation that one or more OwnedItems have been added or removed during composition. It must be called BEFORE any new WaxLines are applied or the composer returns.

virtual void IParagraphComposer::RecomposeHelper::ResetDamageToContent ()
pure virtual

The current WaxLine returned by GetWaxLine() has its damage reset to Content and its NoShuffle flag set to kTrue.

This method supports certain types of interrupted composition on the starting WaxLine by allowing the caller to reset the damage of the WaxLine to ContentDamage. Most paragraph composers will refuse to be interrupted in the middle of their paragraph but some composers, notably the WaxAnchorComposers, take too much time to compose and need to leave without having finished the composition of their WaxLine. However, since they may have done some work towards composition they need to be able differentiate between getting new damage and damage that they have already seen. This helps them avoid circular composition loops.

virtual void IParagraphComposer::RecomposeHelper::SetNoShuffle ()
pure virtual

The current WaxLine returned by GetWaxLine() has its NoShuffle flag set to kTrue.

virtual void IParagraphComposer::RecomposeHelper::SetShapingEngine (int32 shapingEngine)
pure virtual

ADOBE INTERNAL USE ONLY