InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IHyphenationStyle Class Referenceabstract

#include <IHyphenationStyle.h>

Inheritance diagram for IHyphenationStyle:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IHYPHENATIONSTYLE }
 
enum  HyphenationMethod { kHyphensOff = 0, kHyphensManual, kHyphensDictionary, kHyphensAlgorithm }
 
enum  ProviderHyphenationStyle { kHyph_All = 0, kHyph_AllButUnaesthetic, kHyph_Aesthetic, kHyph_PreferredAesthetic }
 

Public Member Functions

virtual int16 MinCharsBefore () const =0
 
virtual int16 MinCharsAfter () const =0
 
virtual int16 ShortestWord () const =0
 
virtual void SetMinCharsBefore (int16 i)=0
 
virtual void SetMinCharsAfter (int16 i)=0
 
virtual void SetShortestWord (int16 i)=0
 
virtual PMReal HyphenationZone () const =0
 
virtual void SetHyphenationZone (PMReal zone)=0
 
virtual void SetLadderLimit (int16 ladderCount)=0
 
virtual int16 GetLadderLimit () const =0
 
virtual HyphenationMethod GetHyphenationMethod () const =0
 
virtual void SetHyphenationMethod (HyphenationMethod method)=0
 
virtual bool16 HyphenateCapitalized () const =0
 
virtual void SetHyphenateCapitalized (bool16 b)=0
 
virtual double GetHyphenationPenaltyFactor () const =0
 
virtual void SetHyphenationPenaltyFactor (double p)=0
 
virtual double GetLastLineHyphenPenalty () const =0
 
virtual void SetLastLineHyphenPenalty (double d)=0
 
virtual bool16 PreventLastWordHyphen () const =0
 
virtual void SetLastWordHyphenPrevention (bool16 b)=0
 
virtual ILanguageQueryLanguage () const =0
 
virtual void SetLanguageUID (UID nLanguage)=0
 
virtual UID GetLanguageUID () const =0
 
virtual bool16 GetPreventCrossFrameHyphen () const =0
 
virtual void SetPreventCrossFrameHyphen (bool16 p)=0
 
virtual ProviderHyphenationStyle GetProviderHyphenationStyle () const =0
 
virtual void SetProviderHyphenationStyle (IHyphenationStyle::ProviderHyphenationStyle providerHyphenationStyle)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IHyphenationStyle is the primary interface of hyphenation related text attribute summary data. Text attributes can be summarized into a kComposeStyleBoss object, which is a non-persistent summary of every text attribute applied to some text. IHyphenationStyle should be considered a "read-only" interface because the set operations have no impact beyond this data interface. It does not apply through to the text that this interface derived from. The text attributes themselves set the values in this data interface.

See Also
IComposeScanner
kComposeStyleBoss
ICompositionStyle
IDrawingStyle
IJustificationStyle

Member Enumeration Documentation

note: off means only hard hyphens manual means also use discretionary hyphens dictionary means ALSO use dictionary hyphens algorithm means ALSO use algorithm. These are additive methods, not exclusive. We only support "manual" vs. "algorithm" in the current user interface.

Provider Hyphenation Style. Currently only used by the Duden hyphenation provider.

Member Function Documentation

virtual HyphenationMethod IHyphenationStyle::GetHyphenationMethod () const
pure virtual

Get the hyphenation mode. Note: off means only hard hyphens manual means also use discretionary hyphens dictionary means ALSO use dictionary hyphens algorithm means ALSO use algorithm. These are additive methods, not exclusive. We only support "manual" vs. "algorithm" in the current user interface.

Returns
the hyphenation mode.
virtual double IHyphenationStyle::GetHyphenationPenaltyFactor () const
pure virtual

Get the global hyphenation penalty factor – higher values mean fewer hyphens. Used by the paragraph composer.

Returns
the hyphenation penalty factor..
virtual int16 IHyphenationStyle::GetLadderLimit () const
pure virtual

Get the maximum number of consecutive hyphenated lines.

Returns
the maximum number of hyphenated lines.
virtual UID IHyphenationStyle::GetLanguageUID () const
pure virtual

Get the UID of the language boss applied.

Returns
the UID of the language.
virtual double IHyphenationStyle::GetLastLineHyphenPenalty () const
pure virtual

Get the penalty for hyphenating the last full line in a paragraph.

Returns
the penalty value.
virtual bool16 IHyphenationStyle::GetPreventCrossFrameHyphen () const
pure virtual

Get the global hyphenation penalty factor for hyphenating across frames. Used by the paragraph composer.

Returns
kTrue when preventing cross frame hyphens.
virtual bool16 IHyphenationStyle::HyphenateCapitalized () const
pure virtual

Should capitalized words be hyphenated? Can be used to globally avoid splitting proper names for example. Doesn't consider "all cap" words capitalized.

Returns
kTrue if capitalized words should be hyphenated.
virtual PMReal IHyphenationStyle::HyphenationZone () const
pure virtual

Get the hyphenation zone. Not used by the paragraph composer. Controls hyphenation in the single line composer in ragged text.

Returns
the amount the line must be short before considering hyphenating the long word.
virtual int16 IHyphenationStyle::MinCharsAfter () const
pure virtual

Get the minimum number of characters that must appear after a hyphen.

Returns
the minimum number of characters.
virtual int16 IHyphenationStyle::MinCharsBefore () const
pure virtual

Get the minimum number of characters that must appear before a hyphen.

Returns
the minimum number of characters.
virtual bool16 IHyphenationStyle::PreventLastWordHyphen () const
pure virtual

Should the last word in the paragraph be considered for hyphenation?

Returns
kTrue if the last word should never be hyphenated..
virtual ILanguage* IHyphenationStyle::QueryLanguage () const
pure virtual

What language is applied?.

Returns
an AddRef'd ILanguage interface.
virtual void IHyphenationStyle::SetHyphenateCapitalized (bool16 b)
pure virtual

Should capitalized words be hyphenated? Doesn't consider "all cap" words capitalized.

Parameters
bis if capitalized words should be hyphenated.
virtual void IHyphenationStyle::SetHyphenationMethod (HyphenationMethod method)
pure virtual

Set the hyphenation mode. We only support "manual" vs. "algorithm" in the current user interface.

See Also
GetHyphenationMethod.
Parameters
methodis the desired hyphenation mode.
virtual void IHyphenationStyle::SetHyphenationPenaltyFactor (double p)
pure virtual

Set the global hyphenation penalty factor – higher values mean fewer hyphens. Used by the paragraph composer.

Parameters
pis the hyphenation penalty factor..
virtual void IHyphenationStyle::SetHyphenationZone (PMReal zone)
pure virtual

Set the hyphenation zone. Not used by the paragraph composer. Controls hyphenation in the single line composer in ragged text.

Parameters
zoneis the amount the line must be short before considering hyphenating a word.
virtual void IHyphenationStyle::SetLadderLimit (int16 ladderCount)
pure virtual

Set the maximum number of consecutive hyphenated lines.

Parameters
ladderCountis the maximum number of hyphenated lines.
virtual void IHyphenationStyle::SetLanguageUID (UID nLanguage)
pure virtual

Set the UID of the language boss applied.

Parameters
nLanguageis the UID of the language.
virtual void IHyphenationStyle::SetLastLineHyphenPenalty (double d)
pure virtual

Set the penalty for hyphenating the last full line in a paragraph.

Parameters
dis the penalty value.
virtual void IHyphenationStyle::SetLastWordHyphenPrevention (bool16 b)
pure virtual

Should the last word in the paragraph be considered for hyphenation?

Parameters
bis kTrue if the last word should never be hyphenated..
virtual void IHyphenationStyle::SetMinCharsAfter (int16 i)
pure virtual

Set the minimum number of characters that must exist after a hyphen.

Parameters
iis the minimum number of characters.
virtual void IHyphenationStyle::SetMinCharsBefore (int16 i)
pure virtual

Set the minimum number of characters that must exist before a hyphen.

Parameters
iis the minimum number of characters.
virtual void IHyphenationStyle::SetPreventCrossFrameHyphen (bool16 p)
pure virtual

Ask the compose to avoid hyphenating across frames. Used by the paragraph composer.

Parameters
pis kTrue when preventing cross frame hyphens.
virtual void IHyphenationStyle::SetProviderHyphenationStyle (IHyphenationStyle::ProviderHyphenationStyle providerHyphenationStyle)
pure virtual

Set the hyphenation style for the provider. The provider Duden has four styles that give different hyphenation points.

Parameters
@seeIHyphenationStyle::ProviderHyphenationStyle
virtual void IHyphenationStyle::SetShortestWord (int16 i)
pure virtual

Set the shortest word that can hyphenate.

Parameters
iis the length of the shortest word.
virtual int16 IHyphenationStyle::ShortestWord () const
pure virtual

Get the shortest word that can hyphenate. Will not be less than MinCharsBefore + MinCharsAfter.

Returns
the length of the shortest word.