Setting the Text Cursor

A text cursor (TTextCursor) is a rectangular area which can optionally be set to flash. It has a height, width, ascent and origin, illustrated below.

Figure: Text cursor

The text cursor is positioned on screen by specifying an offset between its origin and the origin of a window. It can be added to a window group using RWindowGroup::SetTextCursor().

Two predefined types of text cursors are provided: solid and hollow rectangles. In addition bitmaps can be used as text cursors. Custom text cursors are added to the Window Server using RWsSession::SetCustomTextCursor(). They have a unique identifier, which is used by RWindowGroup::SetTextCursor(). They are clipped if too large and their vertical alignment can be adjusted.

Related concepts