You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_CRT_Highlight object:
Cvo_CRT_Highlight
Cvo_RootedList
This object is used to define highlighted regions in a Cvo_CRT
object. See the function
NewHighlight()
under the Cvo_CRT
object for creation.
A Cvo_CRT_Highlight may cause the text within it to be reversed, underlined, or have a different foreground and/or a different background. The only real special case is reversed. This mode turns off all other modes (as it implies a foreground and background. Also, it was easier to implement this way.) A Cvo_CRT_Highlight may also be turned off without actually deleting it, although deletion will certainly cause the hightlight to go away.
This object defines the following member functions in addition to those defined by its parent and ancestor objects.
ResetRange (
[ int srow, int scolumn, int erow, int ecolumn ] )
This function sets the range for the Highlight to start on the line srow, column scolumn, and continue through line erow, column ecolumn. If srow, scolumn, erow and ecolumn are missing, the range is reset to the default cause, which is null range. Ecolumn make take the value Cvo_HL_MAX_COLUMN to indicate that the highlight should extend to the end of the line.
ExtendRange (
int row,
int column )
This function will change either the starting or ending position of the range to be the specified row and column. If row and column represent a point prior to the current starting position of the Highlight, the starting position is modified. If row and column represent a point after the starting position, the ending position is modified.
TurnOff (
)
This functions causes the highlight to have no effect, but it does not reset the range of the highlight.
TurnOn (
)
This functions causes the highlight to have an effect.
SetReverse (
)
This causes the highlight to simply be a foreground/background color reversal when drawing.
SetUnderline (
[ BOOL value ] )
This function turns off reverse mode and causes the highlight to
provide an underline if value is not specified or is True
. If
value is False
, both reverse mode and underline mode are
turned off.
SetEnbolden (
[ BOOL value ] )
This function turns off reverse mode and causes the highlight to
enbolden the text if value is not specified or is True
. If
value is False
, both reverse mode and enbolden mode are turned
off.
This function turns off reverse mode and sets the foreground color for drawing text to be color.
This function turns off reverse mode and sets the background color for drawing text to be color.
GetText (
{ wchar_t | char } **pstring )
This function retrieves the text of the highlight and points the
pointer pointed to by pstring at the text. This value may be
overwritten by the next call to GetText()
.
See the legend for information about the conventions used in this documentation.