InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IRubyAdornmentData.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 __IRubyAdornmentData__
25 #define __IRubyAdornmentData__
26 
27 #include "IRubyStyle.h" // for ruby enums
28 #include "TextAttrID.h" // for IID_IRUBYADORNMENTDATA
29 #include "CTextEnum.h" // for Text::GlyphID
30 #include "IKRAdornmentData.h"
31 
32 class PMPoint;
33 class PMReal;
34 
40 {
41 public:
42  enum { kDefaultIID = IID_IRUBYADORNMENTDATA };
43 
44  enum RubyKind {
45  kGroup = IRubyStyle::kRubyKind_Group,
46  kMono /* = IRubyStyle::kRubyKind_Mono */
47  };
48 
49  enum RubyPosition {
50  kTopRight = IRubyStyle::kRubyPosition_TopRight, // Horizontal: Top Vertical: Right
51  kBottomLeft /* = IRubyStyle::kRubyPosition_BottomLeft */ // Horizontal: Bottom Vertical: Left
52  };
53 
54  enum RubyOverHang {
55  kOHNone = IRubyStyle::kRubyOverHang_None, // None
56  kOHOneRuby /* = IRubyStyle::kRubyOverHang_OneRuby */, // One width of Ruby character
57  kOHHalfRuby /* = IRubyStyle::kRubyOverHang_HalfRuby */, // Half width of Ruby character
58  kOHOneChar /* = IRubyStyle::kRubyOverHang_OneChar */, // One width of base text character
59  kOHHalfChar /* = IRubyStyle::kRubyOverHang_HalfChar */, // Half width of base text character
60  kOHNoLimit /* = IRubyStyle::kRubyOverHang_NoLimit */
61  };
62 
63  enum RubyAdjustBaseText {
64  kABTAdjustNone = IRubyStyle::kRubyAdjustParent_None, // None
65  kABTBothSide /* = IRubyStyle::kRubyAdjustParent_BothSide */, // Add space both side of base text characters.
66  kABTMojikumi /* = IRubyStyle::kRubyAdjustParent_Mojikumi */, // Add space 1:2:1 in base text characters.
67  kABTEqualAki /* = IRubyStyle::kRubyAdjustParent_EqualAki */, // Add space 1:1:1 in base text characters.
68  kABTJustify /* = IRubyStyle::kRubyAdjustParent_Justify */ // Full Justify.
69  };
70 
71  enum RubyAlign {
72  kLeft = IRubyStyle::kRubyAlign_Left, // Left alignment
73  kCenter /* = IRubyStyle::kRubyAlign_Center */, // Center alignment
74  kRight /* = IRubyStyle::kRubyAlign_Right */, // Right alignment
75  kJustify /* = IRubyStyle::kRubyAlign_Justify */, // Full Justify
76  kJISRule /* = IRubyStyle::kRubyAlign_JISRule */, // 1:2:1
77  kEqualSpace /* = IRubyStyle::kRubyAlign_EqualSpace */, // 1:1:1
78  kEdgeOneRuby /* = IRubyStyle::kRubyAlign_EdgeOneRuby */ // add one width of ruby character. (both side)
79  };
80 
81  enum RubyPlacementResult {
82  kNotPlaced = 0,
83  kGreat = 0x8,
84  kGood = 0x10,
85  kFine = 0x18,
86  kOk = 0x20,
87  kNotBad = 0x28,
88  kKindaBad = 0x30,
89  kBad = 0x38,
90  kVeryBad = 0x40,
91  kPanic = 0x48
92  };
93 
94 
98  virtual void SetRubyText(int32 length) = 0;
99 
105  virtual void SetRubyFont(UID font, const PMReal& size, PMString style) = 0;
106 
110  virtual void SetRubyPlacementResult(enum RubyPlacementResult result) = 0;
111 
115  virtual void SetBaseTextRun(IWaxRun* baseTextWaxRun) = 0;
116 
120  virtual bool16 IsFeatureOn() const = 0;
121 
125  virtual int32 GetLength() const = 0;
126 
130  virtual enum RubyPlacementResult GetRubyPlacementResult() const = 0;
131 
136  virtual IPMFont* QueryFont(IDataBase *db) const = 0;
137 
143  virtual bool16 SplitInto(IKRAdornmentData* other, int32 offsetInRun) = 0;
144 };
145 
146 #endif