InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SLCLineBreaker Class Reference

#include <SLCLineBreaker.h>

Public Member Functions

 SLCLineBreaker (void)
 
virtual ~SLCLineBreaker (void)
 
virtual bool16 Recompose (IParagraphComposer::RecomposeHelper *helper)
 

Detailed Description

Positions the line, decides where text should be broken if necessary, and creates a wax line(IWaxLine) to represent the text. Positioning and fitting of the glyphs that represent the characters in the line and the creation of wax runs(IWaxRun) is the role of SLCLineFitter.

In essence composition proceeds by flowing characters into the line until the width of the characters reaches the maximum width of the line or an end of line character is encountered. If the maximum width of the line is reached a character where the line can be broken is sought.

In reality a couple of things complicate this overview.

Firstly text wrap can affect where in the line text can flow. Frames with text wrap settings can intrude into the line creating areas where text should not flow. To account for this the composer obtains tiles for the line from a tiler(IParagraphComposer::Tiler). The tiler takes care of the effect of text wrap and irregular frame shapes. Interaction with the tiler is delegated to SLCTileManager. Characters are flowed into each tile within the line.

Secondly care must be taken not to break text before trailing white space characters. These must be included in the line and may cause the tile width to be exceeded initially until they are scaled to fit the width of the tile.

Flowing of text into tiles is delegated to SLCTileComposer which represents composed text as glyph nodes in SLCGlyphNodeList.

As output a wax line(IWaxLine) is created and added to the wax strand(IWaxStrand). Note that the wax runs are added to the line by SLCLineFitter which gets called as a result of SLCLineBreaker calling IWaxStrand to apply the composed wax line.

Note that this implementation does not perform hyphenation. But if hyphenation were to be supported it would be added here since it affects where the text can be broken across tiles and lines.

See Also
SLCParagraphComposer
SLCTileManager
SLCTileComposer
SLCGlyphNode
SLCGlyphNodeList
IComposeScanner
IDrawingStyle
IWaxStrand
IWaxLine

Constructor & Destructor Documentation

SLCLineBreaker::SLCLineBreaker (void )
inline

Nothing much is done here. Initialisation is done each time through Recompose.

virtual SLCLineBreaker::~SLCLineBreaker (void )
inlinevirtual

Nothing is done here. Clean up is done each time through Recompose.

Member Function Documentation

bool16 SLCLineBreaker::Recompose (IParagraphComposer::RecomposeHelperhelper)
virtual