(****************************************************************************) (* *) (* GSX Char Module *) (* =============== *) (* This Module contains all text-related GSX functions, which provice a *) (* device-independent access to normal text screens. In future, this module *) (* will be enhanced by a text window manager. *) (* *) (* 20.1.1988 Wolfgang Muees, Hagenring 22, 3300 Braunschweig *) (* *) (****************************************************************************) DEFINITION MODULE GSXCHAR; VAR Rows, Columns : CARDINAL; (* screen dimensions X,Y *) PROCEDURE GetDimensions; (* A call to GetDimensions returns the number of addressable rows & columns on the screen. If access to specific rows/columns is not possible, this values are set to MAX ( CARDINAL ) *) PROCEDURE CursorUp; (* Advances text cursor 1 row up. If the cursor was already on top of screen, nothing happens. *) PROCEDURE CursorDown; (* Advances text cursor 1 row down. If the cursor was already on bottom of screens, nothing happens. *) PROCEDURE CursorRight; (* Advances text cursor 1 column right. If the cursor was already on rightmost column of screen, nothing happens. *) PROCEDURE CursorLeft; (* Advances text cursor 1 column left. If the cursor was already on leftmost column of screen, nothing happens. *) PROCEDURE CursorHome; (* Force text cursor to home position : top left of screen. *) PROCEDURE EraseLineEnd; (* Erase current line from text cursor position to end of line. The new cursor position is undetermined and must be set by CursorAt. *) PROCEDURE EraseScreenEnd; (* Erase screen from text cursor position to end of screen. The new cursor position is undetermined and must be set by CursorAt. *) PROCEDURE CursorAt ( Row, Column : CARDINAL ); (* Sets text cursor to specified position. Valid range for Row/Column is [1..Rows/Columns]. If Row/Column are out of range, cursor positon is trunced to allowed range. *) PROCEDURE WriteText ( Text : ARRAY OF CHAR ); (* Writes a text string at cursor position. The cursor position advances with each displayed character until rightmost column is reached. If there are more characters in Text, they are ignored. Note that the length of Text is trunced to CinLen ( see GSXMAIN.DEF ), if nessessary. *) PROCEDURE Reverse; (* Switch to inverse text. *) PROCEDURE Normal; (* Switch back to normal text ( default ) *) PROCEDURE GetPosition ( VAR Row, Column : CARDINAL ); (* Returns current cursor position. *) END GSXCHAR.