InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICompositionUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Eric Menninga
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 __ICompositionUtils__
25 #define __ICompositionUtils__
26 
27 #include "IPMUnknown.h"
28 #include "ICalculatedTextResult.h"
29 #include "Utils.h"
30 #include "CTextEnum.h"
31 #include "OTFeature.h"
32 #include "TCID.h"
33 
34 
35 class ITextModel;
36 class IWaxIterator;
37 
38 
45 {
46 public:
47  enum { kDefaultIID = IID_ICOMPOSITIONUTILS };
48 
60  virtual ICalculatedTextResult* NewCalculatedText(const ITextModel *model, TextIndex position, UTF32TextChar c, const IDrawingStyle *style = nil) = 0;
61 
71  virtual ICalculatedTextResult* NewCalculatedText(const UIDRef& forFrame, UTF32TextChar c, const IDrawingStyle *style, TextIndex position) = 0;
72 
77  virtual ErrorCode GetCalculatedTextString(const ITextModel *model, TextIndex position, UTF32TextChar c, const IDrawingStyle *style, WideString *calcText) = 0;
78 
83  virtual ErrorCode GetCalculatedTextString(const UIDRef& forFrame, UTF32TextChar c, const IDrawingStyle *style, WideString *calcText, TextIndex position) = 0;
84 
88  virtual ICalculatedTextResult::CalculatedStringContent ScanStringContents(const PMString &s) const = 0;
89 
96  virtual bool16 RemapCharactersIfNecessary(const IDrawingStyle *style, const PMString &original, WideString &calcString) const = 0;
97 
104  virtual ICalculatedTextResult* InitializeCalcResult(const PMString& str, const IDrawingStyle* baseDrawStyle) = 0;
105 
114  virtual PMReal CalcLeadingModelYPosAdjustment(PMReal lineHeight,
115  Text::LeadingModel prevLeadingModel, PMReal prevLeading, PMReal prevLeadingModelOffset,
116  Text::LeadingModel leadingModel, PMReal leading, PMReal leadingModelOffset) = 0;
117 
121  virtual void PregenerateWaxRuns(const IWaxIterator *waxIter, TextIndex startPos, TextIndex endPos) = 0;
122 
123 
134  virtual OpenTypeFeatureList GetCalculatedOTFeaturesList(const IDrawingStyle *draw, bool japanese = false, bool vertical = false, bool isTCY = false) = 0;
135 
136 
137 };
138 
139 
140 #endif // __ICompositionUtils__
141 
142 
143 
144