![]() |
TESetWordBreak |
||||
Header: | TextEdit.h | Carbon status: | Unsupported | |
Installs the address of a customized word-selection break function in the wordBreak field of the specified edit structure.
void TESetWordBreak ( WordBreakUPP wBrkProc, TEHandle hTE );
A pointer to the customized word-selection break function.
A handle to the edit structure containing the wordBreak field to be modified.
A word break function determines which word is highlighted when the user double-clicks in the text. It also determines where TextEdit breaks the text at the end of a line. You can use TESetWordBreak to replace the default function in the wordBreak field that is used for word selection and line breaking under certain circumstances. Whether or not TextEdit uses the word-selection break function referenced by this field is determined by the algorithm implemented in the default TEFindWord function.
When you replace the wordBreak field hook function, your customized word break function is used instead of the default one. The default function breaks words at any character with an ASCII value of $20 or less (the space character or nonprinting control characters). Your function can use a different value.
Before non-Roman script systems were supported, TextEdit used the word break hook function installed in the wordBreak field for all word selection and line breaking. However, in order to support both Roman and non-Roman script systems, TextEdit now uses the function installed in the low-memory global variable TEFindWord. The default TEFindWord hook function determines which hook TextEdit should use for word selection and line breakingthe wordBreak hook or the Text Utilities FindWordBreaks functionbased on what script systems are installed and some other factors. You can replace the TEFindWord hook function with a customized version.
Not supported in Carbon. Not available in Carbon.
You should override the FindWord hook using the TESetFindWordHook accessor function instead of calling TESetWordBreak.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)