#include <IHyphenationStyle.h>
|
| enum | { kDefaultIID = IID_IHYPHENATIONSTYLE } |
| |
| enum | HyphenationMethod { kHyphensOff = 0, kHyphensManual, kHyphensDictionary, kHyphensAlgorithm } |
| |
| enum | ProviderHyphenationStyle { kHyph_All = 0, kHyph_AllButUnaesthetic, kHyph_Aesthetic, kHyph_PreferredAesthetic } |
| |
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
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.
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
| b | is if capitalized words should be hyphenated. |
Set the hyphenation mode. We only support "manual" vs. "algorithm" in the current user interface.
- See Also
- GetHyphenationMethod.
- Parameters
| method | is 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
| p | is 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
| zone | is 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
| ladderCount | is the maximum number of hyphenated lines. |
| virtual void IHyphenationStyle::SetLanguageUID | ( | UID | nLanguage | ) | |
| pure virtual |
Set the UID of the language boss applied.
- Parameters
| nLanguage | is 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
| virtual void IHyphenationStyle::SetLastWordHyphenPrevention | ( | bool16 | b | ) | |
| pure virtual |
Should the last word in the paragraph be considered for hyphenation?
- Parameters
| b | is 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
| i | is 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
| i | is 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
| p | is kTrue when preventing cross frame hyphens. |
Set the hyphenation style for the provider. The provider Duden has four styles that give different hyphenation points.
- Parameters
| virtual void IHyphenationStyle::SetShortestWord | ( | int16 | i | ) | |
| pure virtual |
Set the shortest word that can hyphenate.
- Parameters
| i | is 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.