TEXT_EDIT Type (Structure)

textedit.h

typedef struct TextEditStruct {
WINDOW *Parent; /* Pointer to the parent window */
unsigned short ReadOnly; /* Number of bytes at start that are read only */
WIN_RECT Rect; /* Editor area descriptor */
unsigned short BufSize; /* Number of currently allocated bytes */
unsigned short CurSize; /* Current number of characters in the editor */
unsigned short CursorOffset; /* Offset of the cursor */
unsigned short StartOffset; /* ScrollX, position at which text is displayed */
union {
unsigned short SelStart; /* Position of the start of the selection, if any */
unsigned short PreChars; /* Deprecated old name of SelStart */
};
unsigned short CharWidth; /* Width in characters */
unsigned short CharHeight; /* Height in characters */
unsigned short LineNum; /* Line number: cursor is on 0..CharHeight-1 */
unsigned short CursorX; /* Horizontal char position */
unsigned short Flags; /* Editor flags */
union {
HANDLE h; /* Handle of the editor buffer, if opened with TE_open */
const char *p; /* Ptr to the editor buffer, if opened with TE_openFixed */
} Text;
} TEXT_EDIT;

A structure used to coordinate all text editor operations.

Note: StartOffset is the first shown character of the entry line, but it may be covered by an arrow or ellipsis if the corresponding flag is set. SelStart is the position of the non-extensible end of the selection. This may be either the beginning or the end of the selection, depending on whether it expands to the right or to the left. Its value is undefined if there is no selection. CursorX is the horizontal character position in the line, or position relative to StartOffset.