Important: The information in this document is obsolete and should not be used for new development.
TEContinuousStyle
TheTEContinuousStyle
function determines whether a given character attribute is continuous over the current selection range.
FUNCTION TEContinuousStyle (VAR mode: Integer; VAR aStyle: TextStyle; hTE: TEHandle): Boolean;
mode
- On input, a selector specifying the attributes to be checked. On output,
mode
identifies only those attributes determined to be continuous over the selection range.aStyle
- On input, a text style record. On output, this record contains the values for the
mode
attributes determined to be continuous over the selection.hTE
- A handle to the edit record containing the selected text whose attributes are to be checked.
DESCRIPTION
This function does not modify the text selection. Possible values for themode
parameter are defined by the following constants.
Constant Value Description doFont 1 Specifies the font family ID doFace 2 Specifies the character style doSize 4 Specifies the type size doColor 8 Specifies the color doAll 15 Specifies all the attributes The
TEContinuousStyle
function returnsTRUE
if all of the attributes to be checked are continuous and returnsFALSE
if none or some are continuous.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 themode
parameter. Otherwise, if the null scrap is empty,TEContinuousStyle
returns the attributes of the character preceding the insertion point. TheTEContinuousStyle
function always returnsTRUE
in this case, and each field of the text style record is set if the corresponding bit in themode
parameter is set.If the value of
hTE
is a handle to a monostyled edit record,TEContinuousStyle
returns the set of character attributes that are consistent for the entire record.Note that fields in the text style record specified by
aStyle
are only valid if the corresponding bits are set in themode
variable.How the
tsFace
field of theaStyle
record is used requires some consideration. For example, ifTEContinuousStyle
returns amode
parameter that containsdoFace
and the text style recordtsFace
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 thetsFace
field. If thetsFace
field is an empty set, then all of the selected text is plain.