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

#include <IHyphenatedWord.h>

Inheritance diagram for IHyphenatedWord:
grRefCountedObjExceptionHyphenWordHypHyphenatedWord

Public Types

enum  {
  kNoHyphenPoint = 0, kVeryUnpreferredHyphenPoint = 10, kUnpreferredHyphenPoint = 25, kRegularHyphenPoint = 50,
  kPreferredHyphenPoint = 75, kDiscretionaryHyphenPoint = 80, kHardHyphenPoint = 90, kBestHyphenPoint = 100,
  kWorstHyphenPoint = 0, kForcedHyphenPoint = kBestHyphenPoint, kRefusedHyphenPoint = kWorstHyphenPoint, kInvalidHyphenPoint = -1
}
 

Public Member Functions

virtual int32 GetPointCount () const =0
 
virtual int32 GetIndexOfPoint (int32 nNthPoint) const =0
 
virtual int32 GetQualityOfPoint (int32 nNthPoint) const =0
 
virtual WideString GetWord () const =0
 
virtual void GetPartsOfPoint (int32 nNthPoint, WideString *pFirstPart, WideString *pLastPart) const =0
 
virtual void GetFirstPartOfPoint (int32 nNthPoint, WideString *pPart) const =0
 
virtual void GetLastPartOfPoint (int32 nNthPoint, WideString *pPart) const =0
 
virtual void Merge (const IHyphenatedWord *pToMergeWith)=0
 
virtual void ValidatePointRanges (void)=0
 
- Public Member Functions inherited from grRefCountedObj
 grRefCountedObj ()
 
virtual ~grRefCountedObj ()=0
 
virtual void AddRef () const
 
virtual void Release () const
 

Additional Inherited Members

- Protected Attributes inherited from grRefCountedObj
int32 fRefCount
 

Detailed Description

IHyphenatedWord stores information about the hyphenation points within a particular word. It is not an interface itself, but rather just an AddRef/Release abstract C++ object.

Member Enumeration Documentation

anonymous enum

Quality values for hyphenation points are ranked between -100 and +100: The negative value should only be use internally.

Member Function Documentation

virtual void IHyphenatedWord::GetFirstPartOfPoint (int32 nNthPoint,
WideStringpPart 
) const
pure virtual

Fills the WideString without hyphen, i.e.: "service" to "ser". Will do spelling changes but doesn't add the hyphen (if it wasn't already there).

Parameters
nNthPointis which break point.
pPartis a pointer (not nil) to a blank WideString, is filled out with the pre-break point part.

Implemented in ExceptionHyphenWord, and HypHyphenatedWord.

virtual int32 IHyphenatedWord::GetIndexOfPoint (int32 nNthPoint) const
pure virtual

The index is the position before the hyphen: i.e. ser-vice returns 2 (zero-based).

Parameters
nNthPointis which point to ask about.
Returns
the index in the word of the Nth hyphenation point.

Implemented in ExceptionHyphenWord, and HypHyphenatedWord.

virtual void IHyphenatedWord::GetLastPartOfPoint (int32 nNthPoint,
WideStringpPart 
) const
pure virtual

Fills the WideString, i.e.: "service" to "vice". Can do spelling changes.

Parameters
nNthPointis which break point.
pPartis a pointer (not nil) to a blank WideString, is filled out with the post-break point part.

Implemented in ExceptionHyphenWord, and HypHyphenatedWord.

virtual void IHyphenatedWord::GetPartsOfPoint (int32 nNthPoint,
WideStringpFirstPart,
WideStringpLastPart 
) const
pure virtual

Fills the WideStrings without hyphen, i.e.: "service" to "ser" and "vice". Will do spelling changes but doesn't add the hyphen (if it wasn't already there).

Parameters
nNthPointis which break point.
pFirstPartis a pointer (not nil) to a blank WideString, is filled out with the pre-break point part.
pLastPartis a pointer (not nil) to a blank WideString, is filled out with the post-break point part.

Implemented in ExceptionHyphenWord, and HypHyphenatedWord.

virtual int32 IHyphenatedWord::GetPointCount () const
pure virtual

How many hyphenation points?

Returns
the count of hyphenation points that has been found.

Implemented in ExceptionHyphenWord, and HypHyphenatedWord.

virtual int32 IHyphenatedWord::GetQualityOfPoint (int32 nNthPoint) const
pure virtual

The quality value of the Nth hyphenation point.

Parameters
nNthPointis which point to ask about.
Returns
the quality in the word of the Nth hyphenation point.

Implemented in ExceptionHyphenWord, and HypHyphenatedWord.

virtual WideString IHyphenatedWord::GetWord () const
pure virtual

Copies the word (might be different because the linguisitc systems do their own character translations).

Returns
a WideString version of the word being hyphenated.

Implemented in ExceptionHyphenWord, and HypHyphenatedWord.

virtual void IHyphenatedWord::Merge (const IHyphenatedWordpToMergeWith)
pure virtual

Merge 2 lists of break points. Used to combine dictionary breakpoints with other types of breaking Used only for to combine hard dash breaking since Discretionary hyphens always take precidence.

Parameters
pToMergeWithis another hyphenated word to merge into this one.

Implemented in ExceptionHyphenWord, and HypHyphenatedWord.

virtual void IHyphenatedWord::ValidatePointRanges (void )
pure virtual

after merging, this routine is called as a post-method clean up

Implemented in ExceptionHyphenWord, and HypHyphenatedWord.