InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IHyphenationStyle.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 __IHyphenationStyle__
25 #define __IHyphenationStyle__
26 
27 
28 #include "IPMUnknown.h"
29 #include "TextID.h"
30 
31 class ILanguage;
32 
33 
50 {
51  public:
52  enum { kDefaultIID = IID_IHYPHENATIONSTYLE };
53 
61  typedef enum { kHyphensOff = 0, kHyphensManual, kHyphensDictionary,
62  kHyphensAlgorithm } HyphenationMethod;
63 
66  kHyph_All = 0,
67  kHyph_AllButUnaesthetic,
68  kHyph_Aesthetic,
69  kHyph_PreferredAesthetic
70  };
71 
75  virtual int16 MinCharsBefore() const = 0;
76 
80  virtual int16 MinCharsAfter() const = 0;
81 
85  virtual int16 ShortestWord() const = 0;
86 
90  virtual void SetMinCharsBefore(int16 i) = 0;
91 
95  virtual void SetMinCharsAfter(int16 i) = 0;
96 
100  virtual void SetShortestWord(int16 i) = 0;
101 
106  virtual PMReal HyphenationZone() const = 0;
107 
112  virtual void SetHyphenationZone(PMReal zone) = 0;
113 
117  virtual void SetLadderLimit(int16 ladderCount) = 0;
118 
122  virtual int16 GetLadderLimit() const = 0;
123 
133  virtual HyphenationMethod GetHyphenationMethod() const = 0;
134 
140  virtual void SetHyphenationMethod(HyphenationMethod method) = 0;
141 
146  virtual bool16 HyphenateCapitalized() const = 0;
147 
152  virtual void SetHyphenateCapitalized(bool16 b) = 0;
153 
158  virtual double GetHyphenationPenaltyFactor() const = 0;
159 
164  virtual void SetHyphenationPenaltyFactor(double p) = 0;
165 
169  virtual double GetLastLineHyphenPenalty() const = 0;
170 
174  virtual void SetLastLineHyphenPenalty(double d) = 0;
175 
179  virtual bool16 PreventLastWordHyphen() const = 0;
180 
184  virtual void SetLastWordHyphenPrevention(bool16 b) = 0;
185 
189  virtual ILanguage *QueryLanguage() const = 0;
190 
194  virtual void SetLanguageUID(UID nLanguage) = 0;
195 
199  virtual UID GetLanguageUID() const = 0;
200 
205  virtual bool16 GetPreventCrossFrameHyphen() const = 0;
206 
211  virtual void SetPreventCrossFrameHyphen(bool16 p) = 0;
212 
213  /* Get the hyphenation style for the provider. The provider Duden has four styles that give different hyphenation points.
214  @return the provider hyphenations style.
215  */
216  virtual ProviderHyphenationStyle GetProviderHyphenationStyle() const = 0;
217 
221  virtual void SetProviderHyphenationStyle(IHyphenationStyle::ProviderHyphenationStyle providerHyphenationStyle) = 0;
222 };
223 
224 
225 #endif // __IHyphenationStyle__
226