next up previous contents index
Next: SUBROUTINE CURBAND Up: Cursor Routines Previous: SUBROUTINE CURLOCATE

SUBROUTINE CURMOTION

 CURMOTION produces a graphics  cursor on the  Ramtek or  terminal\ When no screen devices are initialized a call to CURMOTION is a dummy call. Terminal is used in preference to Ramtek. This routine is supported only on terminals which can emulate the VT100 numeric keypad. The terminal text cursor and VT100 numeric keypad keys are used to move the graphics cursor to a desired location and a return function key is pressed to select the cursor location. Only <space>, <return>, PF keys and the numeric key pad keys will be recognized as return command keys. PF1 changes the cursor step movement size in three sizes. As this happens the cursor changes sizes on the screen. The cursor position is typed to the terminal when the Ramtek is used. The cursor is moved in multiples of the pixel resolution. The formula below shows the conversion. All other PF keys and the numeric key pad keys will return the arguments shown below. Other keys are not recognized. NOTE: The input buffer is 128 characters. If you exceed this buffer the program may bomb. Each cursor key input uses 3 characters.

     pixel number = (scalefactor * x + origin)/pixelresolution
CALL CURMOTION (x,y,is,rx,ry)

x,y (R): (returned) selected cursor position
is  (I): (returned) status flag
         < 0  error
         = 0  return key pressed
         = 1  space key pressed
         = 2,3,4 PF2,PF3,PF4 keys on VT100 pressed
         = 10...19 VT100 numeric key pad keys 0...9 pressed
         = 20 numeric key pad period key pressed
         = 21 numeric key pad enter key pressed
         = 22 numeric key pad comma key pressed
         = 23 numeric key pad dash key pressed
rx  (R): resolution of screen in x direction (returned)
ry  (R): resolution of screen in y direction (returned)



David Long
Wed Jun 12 10:34:11 MDT 1996