h21135
s 00028/00023/00050
d D 1.4 83/03/02 11:34:59 tes 4 3
c changed graphic cursor to an arrow to the left of the field
e
s 00033/00003/00040
d D 1.3 83/02/17 15:04:33 tes 3 2
c added graphic mode character cursor
e
s 00005/00002/00038
d D 1.2 83/01/22 19:11:31 tes 2 1
c Modified for annnotate interface
e
s 00040/00000/00000
d D 1.1 83/01/20 11:13:14 tes 1 0
c date and time created 83/01/20 11:13:14 by tes
e
u
tes
mjb
U
t
T
I 1
subroutine movcur (row, col)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: move alpha cursor to location row, col                 #
#                                                                      #
#     Input Parameters:                                                #
#            row - (integer) row to move cursor to                     #
#            col - (integer) column to move cursor to                  #
#                                                                      #
#     Output Parameters:                                               #
#            none                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            gzesc - d/i interface to device driver escape functions   #
#                                                                      #
########################################################################
integer row, col
 
I 2
D 4
SHORTINT string(2)
E 2
D 3
integer fnctid, ilen, iarray(2)
E 3
I 3
integer cursor(2), fnctid, ilen, iarray(2)
integer contrl(6), ptsin(6)
E 4
I 4
SHORTINT i, string(2), x, y
integer cursor(3), fnctid, ilen, iarray(2)
integer contrl(6), ptsin(10)
E 4
E 3

include(`mnucom')

I 2
data string /BLANK, NUL/, ilen /2/, fnctid /DIRECTxCURSORxADDRESS/
I 3
D 4
data cursor / eval(COLUMNxCELLxSIZE/2), eval(ROWxCELLxSIZE/4) /
data contrl / 6, 3, 0, 0, 0, 0 / 
E 4
I 4
data cursor / eval(COLUMNxCELLxSIZE/3), eval(ROWxCELLxSIZE/3), 
              eval(ROWxCELLxSIZE/6) /
data contrl / 6, 5, 0, 0, 0, 0 / 
E 4
E 3

I 3

E 3
E 2
   if (mnumod == EXITxGRAPHICSxMODE) {
D 2
      fnctid = DIRECTxCURSORxADDRESS
      ilen = 2
E 2
      iarray(1) = row
      iarray(2) = col
      call gzesc (fnctid, ilen, iarray)
      }
I 2
D 3
   else
      call qtext (row, col, string)
E 3
I 3
   else {

      # Remove the previous cursor then output the current cursor position.
      # This code provides a visual graphic cursor when the device is in
      # graphics mode.
D 4
      call erase 
      ptsin(1) = (xcursr - 1)*COLUMNxCELLxSIZE
      ptsin(2) = (24 - ycursr)*ROWxCELLxSIZE - 2*cursor(2)
      ptsin(3) = ptsin(1) + cursor(1)
      ptsin(4) = ptsin(2) + cursor(2)
      ptsin(5) = ptsin(3) + cursor(1)
      ptsin(6) = ptsin(4) - cursor(2)
E 4

D 4
      call gzddop (contrl, iarray, ptsin, iarray, iarray)

      call appear
      ptsin(1) = (col - 1)*COLUMNxCELLxSIZE
      ptsin(2) = (24 - row)*ROWxCELLxSIZE - 2*cursor(2)
      ptsin(3) = ptsin(1) + cursor(1)
      ptsin(4) = ptsin(2) + cursor(2)
      ptsin(5) = ptsin(3) + cursor(1)
      ptsin(6) = ptsin(4) - cursor(2)

      call gzddop (contrl, iarray, ptsin, iarray, iarray)
E 4
I 4
      if (ycursr == row) return
      x = xcursr
      y = ycursr
      call erase 
      do i=1, 2 {
	 if (y < 21) {
            ptsin(1) = (x - 2)*COLUMNxCELLxSIZE - cursor(1)
            ptsin(2) = (24 - y)*ROWxCELLxSIZE + cursor(2)
            ptsin(3) = ptsin(1) + 2*cursor(1)
            ptsin(4) = ptsin(2)
            ptsin(5) = ptsin(3) - cursor(1)/2
            ptsin(6) = ptsin(4) + cursor(3)
            ptsin(7) = ptsin(5)
            ptsin(8) = ptsin(2) - cursor(3)
            ptsin(9) = ptsin(3)
            ptsin(10) = ptsin(4)
            call gzddop (contrl, iarray, ptsin, iarray, iarray)
	    }
         call appear
         x = col
         y = row
	 }
E 4
      }

   xcursr = col
   ycursr = row
E 3
E 2

   return
end
E 1
