InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SLCLineBreaker.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Adobe Developer Technologies
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __SLCLineBreaker_h__
25 #define __SLCLineBreaker_h__
26 
27 #include "IParagraphComposer.h"
28 
29 class IComposeScanner;
30 class IWaxLine;
31 class IDrawingStyle;
32 class SLCTileMeasure;
33 class SLCTileManager;
34 
82 {
83 public:
87  SLCLineBreaker(void) : fComposeScanner(nil), fFirstLine(kFalse), fTextIndex(0), fGridAlignmentMetric(Text::kGANone)
88  {
89  }
90 
93  virtual ~SLCLineBreaker(void)
94  {
95  }
96 
99  virtual bool16 Recompose(IParagraphComposer::RecomposeHelper* helper);
100 
101 private:
104  SLComposerStatusCode Initialise(const IParagraphComposer::RecomposeHelper* helper, ParcelKey parcelKey);
105 
108  void Finish(void);
109 
114  Text::GridAlignmentMetric GetGridAlignmentMetric(IDrawingStyle* drawingStyle);
115 
125  virtual IWaxLine* ComposeLine(const TextIndex& startingIndex);
126 
131  virtual SLComposerStatusCode GetTiles(void);
132 
140  virtual SLComposerStatusCode FillLine(void);
141 
154  virtual SLComposerStatusCode FillTile(SLCTileMeasure& tile);
155 
176  virtual SLComposerStatusCode ProcessGlyphNodes(int32 fromGlyphNodeIndex);
177 
188  virtual SLComposerStatusCode FindTextBreak(int32 fromGlyphNodeIndex);
189 
195  IWaxLine* CreateWaxLine(void);
196 
201  virtual void UpdateLineHeight(const SLCGlyphNode* glyphNode);
202 
205  bool16 IsStoryOverset(void) const;
206 
209  IComposeScanner* fComposeScanner;
210 
213  bool16 fFirstLine;
214 
219  SLCLineMetrics fLineMetrics;
220 
223  TextIndex fTextIndex;
224 
229  PMReal fYPosition;
230 
233  PMReal fXPosition;
234 
237  Text::GridAlignmentMetric fGridAlignmentMetric;
238 
241  SLCTileManager fSLCTileManager;
242 
245  SLCGlyphNodeList fGlyphNodeList;
246 
247 };
248 
249 #endif // __SLCLineBreaker_h__
250 
251 // End, SLCLineBreaker.h
252