InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICalculatedTextResult.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner:
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 __ICalculatedTextResult__
25 #define __ICalculatedTextResult__
26 
27 
28 #include "WideString.h"
29 
30 class IDrawingStyle;
31 
32 
38 {
39 public:
40  ICalculatedTextResult() : fOverrideDrawStyle(nil), fCSC(kContainsUnknown), fMustRegen(kFalse)
41  { }
42  ICalculatedTextResult(const ICalculatedTextResult& copy) : fResultString(copy.fResultString), fCSC(copy.fCSC),
43  fMustRegen(copy.fMustRegen), fOverrideDrawStyle(copy.fOverrideDrawStyle)
44  { }
45 
46  const WideString& GetString() const
47  { return fResultString; }
48  WideString& GetString()
49  { return fResultString; }
50 
51 
52  enum CalculatedStringContent {
53  kContainsUnknown = 0x00,
54  kContainsHalfWidthNumbers = 0x01,
55  kContainsRomanLetters = 0x02,
56  kContainsNonRoman = 0x04
57  };
58 
61  CalculatedStringContent GetContentFlags() const
62  { return fCSC; }
63  CalculatedStringContent& GetContentFlags()
64  { return fCSC; }
65 
68  bool16 GetMustRegen() const
69  { return fMustRegen; }
70 
73  void SetMustRegen(bool16 mustRegen)
74  { fMustRegen = mustRegen; }
75 
76 private:
77  WideString fResultString;
78  IDrawingStyle *fOverrideDrawStyle;
79  CalculatedStringContent fCSC;
80  bool16 fMustRegen;
81 };
82 
83 
84 #endif // __ICalculatedTextResult__