Important: The information in this document is obsolete and should not be used for new development.
TEContinuousStyle
TheTEContinuousStylefunction 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,
modeidentifies 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
modeattributes 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 themodeparameter 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
TEContinuousStylefunction returnsTRUEif all of the attributes to be checked are continuous and returnsFALSEif none or some are continuous.If the current selection range is an insertion point,
TEContinuousStylefirst checks the null scrap. If the null scrap contains character attributes, then they are used based on the value of themodeparameter. Otherwise, if the null scrap is empty,TEContinuousStylereturns the attributes of the character preceding the insertion point. TheTEContinuousStylefunction always returnsTRUEin this case, and each field of the text style record is set if the corresponding bit in themodeparameter is set.If the value of
hTEis a handle to a monostyled edit record,TEContinuousStylereturns the set of character attributes that are consistent for the entire record.Note that fields in the text style record specified by
aStyleare only valid if the corresponding bits are set in themodevariable.How the
tsFacefield of theaStylerecord is used requires some consideration. For example, ifTEContinuousStylereturns amodeparameter that containsdoFaceand the text style recordtsFacefield 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 thetsFacefield. If thetsFacefield is an empty set, then all of the selected text is plain.