![]() |
TEContinuousStyle |
||||
Header: | TextEdit.h | Carbon status: | Not Recommended | |
Determines whether a given character attribute is continuous over the current selection range.
Boolean TEContinuousStyle ( SInt16 *mode, TextStyle *aStyle, TEHandle hTE );
On input, a pointer to a selector specifying the attributes to be checked. On output, mode identifies only those attributes determined to be continuous over the selection range. Possible values for the mode parameter are defined in
On input, a pointer to a text style structure. On output, this structure contains the values for the mode attributes determined to be continuous over the selection.
A handle to the edit structure containing the selected text whose attributes are to be checked. If the value of hTE is a handle to a monostyled edit structure, TEContinuousStyle returns the set of character attributes that are consistent for the entire structure.
TRUE if all of the attributes to be checked are continuous; FALSE if none or some are continuous.
This function does not modify the text selection. If the current selection range is an insertion point, TEContinuousStyle first checks the null scrap. If the null scrap contains character attributes, then they are used based on the value of the mode parameter. Otherwise, if the null scrap is empty, TEContinuousStyle returns the attributes of the character preceding the insertion point. The TEContinuousStyle function always returns TRUE in this case, and each field of the text style structure is set if the corresponding bit in the mode parameter is set.
Note that fields in the text style structure specified by aStyle are only valid if the corresponding bits are set in the mode variable.
How the tsFace field of the aStyle structure is used requires some consideration. For example, if TEContinuousStyle returns a mode parameter that contains doFace and the text style structure tsFace field is bold, it means that the selected text is all bold, but may contain other text styles, such as italic, as well. Italic does not apply to all of the selected text, or it would have been included in the tsFace field. If the tsFace field is an empty set, then all of the selected text is plain.
Not recommended in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)