![]() |
TEReplaceStyle |
||||
Header: | TextEdit.h | Carbon status: | Not Recommended | |
Replaces any character attributes in the current selection range that match the specified existing character attributes with the specified new character attributes.
void TEReplaceStyle ( SInt16 mode, const TextStyle *oldStyle, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE );
A selector that specifies which attributes to replace. It corresponds to any additive combination of the
A pointer to a text style structure that specifies the current character attributes to search for in the selected text.
A pointer to a text style structure that specifies the new attributes to be set. This structure contains the character attributes to be applied to the current selection range based on the value of mode.
A flag that specifies whether or not TextEdit should immediately redraw the text to reflect the attribute changes. A value of FALSE delays redrawing until another event forces the update. A value of TRUE causes the text to be redrawn immediately using the new character attributes.
A handle to the multistyled edit structure containing the text selection whose character attributes are to be changed.
The TEReplaceStyle function replaces any attribute in the current selection range that matches the attribute specified by oldStyle with that given by newStyle. Only the character attributes specified by mode are affected.
Attribute changes are made directly to the style elements (STElement) within the style table itself (TEStyleTable). If you specify the value doAll for the mode parameter, newStyle replaces oldStyle outright. The TEReplaceStyle function has no effect on a monostyled edit structure.
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)