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

Public Types | |
| enum | GlyphNodeType { kGNTText = 0, kGNTInlineGraphic } |
Public Member Functions | |
| SLCGlyphNode (IComposeScanner *composeScanner, IDrawingStyle *drawingStyle, TextIndex startingIndex, const PMReal &xOffset, GlyphNodeType glyphNodeType) | |
| virtual SLComposerStatusCode | GetStatus () const |
| virtual | ~SLCGlyphNode () |
| virtual SLComposerStatusCode | GetGlyph (const UTF32TextChar &character, Text::GlyphID &glyphID, PMReal &glyphWidth)=0 |
| virtual SLComposerStatusCode | BufferGlyph (const UTF32TextChar &character, const Text::GlyphID &glyphID, const PMReal &glyphWidth)=0 |
| virtual PMReal | GetWidth () const =0 |
| virtual SLComposerStatusCode | FindTextBreak ()=0 |
| virtual bool16 | GetTrailingWhiteSpaceWidth (PMReal &width) const =0 |
| virtual bool16 | FitTrailingWhiteSpace (const PMReal &widthScaleFactor)=0 |
| virtual SLComposerStatusCode | CreateWax (const IWaxLine *waxLine) const =0 |
| virtual IWaxRun * | CreateWaxRun () const =0 |
| virtual IDrawingStyle * | GetDrawingStyle () const |
| virtual const int32 & | GetTextSpan () const |
| const PMReal & | GetLeading () const |
| const PMReal & | GetAscent () const |
| const PMReal & | GetCapHeight () const |
| const PMReal & | GetXHeight () const |
| const TextIndex & | GetTextIndex () const |
| bool16 | IsTrailingWhiteSpace (const UTF32TextChar &character) const |
| virtual void | Dump (const char *msg) const |
| void | SetTextSpan (int32 count) |
Protected Attributes | |
| SLComposerStatusCode | fStatus |
| IComposeScanner * | fComposeScanner |
| IDrawingStyle * | fDrawingStyle |
| PMReal | fXOffset |
| TextIndex | fTextIndex |
| PMReal | fLeading |
| PMReal | fAscent |
| PMReal | fCapHeight |
| PMReal | fXHeight |
| int32 | fTextSpan |
| const GlyphNodeType | fGlyphNodeType |
Base class for a glyph node, the intermediate representation of a run of text used by this implementation during composition. The role of a glyph node is to maintain the information required to compose and ultimately generate a wax run(IWaxRun).
This class is specialised and completed to handle text(SLCTextGlyphNode) or inline graphics(SLCInlineGraphicGlyphNode) each of which have a distinct wax run boss class. A full composer implementation might have further sub-classes capable of creating other types of wax run(see IWaxRun).
Each sub-class should add an enum to identify the type wax run it represents.
| SLCGlyphNode::SLCGlyphNode | ( | IComposeScanner * | composeScanner, |
| IDrawingStyle * | drawingStyle, | ||
| TextIndex | startingIndex, | ||
| const PMReal & | xOffset, | ||
| GlyphNodeType | glyphNodeType | ||
| ) |
Initialises the common state required to compose the any text.
| composeScanner | IN for the story. |
| drawingStyle | IN for the run of text. |
| startingIndex | IN into the text model of the first character in the run. |
| xOffset | IN relative to the left edge of the wax line. |
| glyphNodeType | IN |
| virtual |
Tidies up.
| pure virtual |
Store glyph information for this character.
| character | |
| glyphID | |
| glyphWidth |
Implemented in SLCInlineGraphicGlyphNode, and SLCTextGlyphNode.
| pure virtual |
Create a wax run and add it to the given line.
| waxLine | to which run should be added. |
Implemented in SLCInlineGraphicGlyphNode, and SLCTextGlyphNode.
| pure virtual |
Create a wax run from the buffered glyph and style information.
Implemented in SLCInlineGraphicGlyphNode, and SLCTextGlyphNode.
| virtual |
Dump diagnostic info to Trace.
| pure virtual |
Determine a point where the text in this object can be broken.
Implemented in SLCInlineGraphicGlyphNode, and SLCTextGlyphNode.
| pure virtual |
Adjust the width of any trailing white space in the node by the given scale factor.
| widthScaleFactor | IN Scaling factor of trailing white space. Must be between 0.0 and 1.0, non-inclusive. |
Implemented in SLCInlineGraphicGlyphNode, and SLCTextGlyphNode.
| inline |
| inline |
| inlinevirtual |
| pure virtual |
Get glyph information for the given character.
| character | for which glyph info is desired. |
| glyphID | the character maps to in the font or kInvalidGlyphID if not in the font. |
| glyphWidth | of the glyph in the style that applies to this run. |
Implemented in SLCInlineGraphicGlyphNode, and SLCTextGlyphNode.
| inline |
| inlinevirtual |
Get status of object (should be called after object construction).
| inline |
| inlinevirtual |
| pure virtual |
Get the width of trailing white space in the node.
Implemented in SLCInlineGraphicGlyphNode, and SLCTextGlyphNode.
| pure virtual |
Implemented in SLCInlineGraphicGlyphNode, and SLCTextGlyphNode.
| inline |
| bool16 SLCGlyphNode::IsTrailingWhiteSpace | ( | const UTF32TextChar & | character | ) | const |
Determines if the character is a trailing white space character.
| character | IN Text char to test. |
| inline |
Set the number of glyphs in this object.
| count |
| protected |
Scanner for the story.
| protected |
Drawing style for the glyphs in the run.
| protected |
Object status, kCompSuccess means object successfully constructed.
| protected |
Index into the text model of the first character in the run.
| protected |
Number of glyphs in the node.
| protected |
x offset from left edge of the line to edge of first glyph.