InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SLCGlyphNodeList.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 __SLCGlyphNodeList_h__
25 #define __SLCGlyphNodeList_h__
26 
27 class IComposeScanner;
28 class IDrawingStyle;
29 class PMReal;
30 
39 {
40 public:
52  IDrawingStyle* drawingStyle,
53  TextIndex startingIndex,
54  const PMReal& xOffset);
55 
58  void Clear(void);
59 
62  int32 Length(void) const
63  {
64  return static_cast<int32>(fGlyphNodeList.size());
65  }
66 
70  void Remove(int32 index)
71  {
72  fGlyphNodeList.erase(fGlyphNodeList.begin() + index, fGlyphNodeList.begin() + index + 1);
73  }
74 
78  SLCGlyphNode* operator[](int32 index) const
79  {
80  return fGlyphNodeList[index];
81  }
82 
88  virtual int32 GetTextSpan(int32 fromIndex = 0) const;
89 
94  PMReal GetWidth(int32 fromIndex) const;
95 
100  PMReal GetTrailingWhiteSpaceWidth(int32 fromIndex) const;
101 
108  void FitTrailingWhiteSpace(int32 fromIndex, const PMReal& widthScaleFactor);
109 
112  virtual void Dump(int32 fromIndex = 0, const char* msg = "") const;
113 
114 private:
117  K2Vector<SLCGlyphNode*> fGlyphNodeList;
118 };
119 
120 #endif // __SLCGlyphNodeList_h__
121 
122 // End, SLCGlyphNode.h
123