h52203
s 00024/00021/00168
d D 1.13 83/03/09 01:25:45 tes 13 12
c fixed text scaling problem when displaying selected attributes
e
s 00059/00020/00130
d D 1.12 83/03/02 18:23:14 tes 12 11
c modified to display a currently selected text string
e
s 00019/00010/00131
d D 1.11 83/02/15 17:24:02 mjb 11 10
c 
e
s 00021/00024/00120
d D 1.10 83/02/14 14:16:50 mjb 10 9
c added code to remember current locator position
e
s 00002/00000/00142
d D 1.9 83/02/08 20:11:40 mjb 9 8
c restructured for overlaying menus
e
s 00001/00006/00141
d D 1.8 83/02/08 14:34:33 mjb 8 7
c added structure to allow even MORE overlaying
e
s 00003/00003/00144
d D 1.7 83/02/03 00:47:36 tes 7 6
c modified apdata interface to include last item to display
e
s 00003/00003/00144
d D 1.6 83/02/02 19:43:31 tes 6 5
c added integer to byte packing and unpacking
e
s 00001/00001/00146
d D 1.5 83/01/29 14:30:40 mjb 5 4
c made changes to anocom, included in gphcom
e
s 00001/00001/00146
d D 1.4 83/01/28 23:27:39 tes 4 3
c modified apmenu interface to include a clear screen flag
e
s 00042/00013/00105
d D 1.3 83/01/24 18:04:15 tes 3 2
c Fixed hershy font bugs for positioning (move)
e
s 00075/00013/00043
d D 1.2 83/01/22 20:52:49 tes 2 1
c Added menu and data access capabilities
e
s 00056/00000/00000
d D 1.1 83/01/20 11:12:25 tes 1 0
c date and time created 83/01/20 11:12:25 by tes
e
u
tes
mjb
U
t
T
I 1
subroutine mnuano (item)
########################################################################
#                                                                      #
#          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: Annotation menu manager                                #
#                                                                      #
#     Input Parameters:                                                #
#            item  - selected menu item                                #
#                                                                      #
#     Output Parameters:                                               #
#            None                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            None                                                      #
#                                                                      #
########################################################################
SHORTINT item

D 2
SHORTINT jump
E 2
I 2
D 11
SHORTINT jump, string(41)
E 11
I 11
SHORTINT jump, string(41), itemp
E 11
D 3
integer id, nkey, xtext, ytext, xin, xout, yin, yout
E 3
I 3
D 10
integer id, nkey, xin, xout, yin, yout
E 10
I 10
integer id, nkey, xout, yout
E 10
integer xtemp, ytemp
E 3
E 2

D 3
include(`gphcom')
E 3
I 3
D 5
include(`anocom')
E 5
I 5
include(`gphcom')
E 5
E 3

I 2
D 12
call dlmesg (TOGGLExTOxDATA)
E 12

D 10
xin = 16384
yin = 16384

E 10
E 2
jump = item + 1
go to (DIG0,DIG1,DIG2,DIG3,DIG4,DIG5,DIG6,DIG7,DIG8,DIG9), jump

D 2
   DIG0 continue  # EXIT to Main Menu
      call apmenu (MAINxMENU)
E 2
I 2
D 12
   DIG0 continue  # EXIT to Last Menu
I 9
      call clrscr
E 9
D 8
      call clrscr
      call chgmod (EXITxGRAPHICSxMODE)
D 4
      call apmenu (lastid)
E 4
I 4
      call apmenu (lastid, YES)
E 4
      if      (lastid == ADVANCEDxPIExEDIT) call cpaatt
      else if (lastid == ADVANCEDxGRAPHxEDIT) call cgaatt
D 7
      call apdata (1)
E 7
I 7
      call apdata (1, FOREVER)
E 8
I 8
      mid = lastid
I 9
      action = BREAKxOVERLAY
E 12
I 12
   DIG0 continue
E 12
E 9
E 8
E 7
E 2
      go to OTHERxWISE

   DIG1 continue  # Add Text
I 2
D 3
      xtext = 16360       # input text location
      ytext = 4096
E 3
I 3

I 12
      call dlmesg (TOGGLExTOxDATA)

E 12
      # get the current default attributes
D 11
      call qgeti (1, tfont)
      call qgeti (2, tcolor)
      call qgeti (3, tsize)
E 11
I 11
      call qgeti (1, itemp)
      tfont = itemp
      call qgeti (2, itemp)
      tcolor = itemp
      call qgeti (3, itemp)
      tsize = itemp
E 11

E 3
      call apmesg (ASKxFORxTEXT, 0)
      string(1) = NUL
      call gettxt (20, 38, 40, string)
      call dlmesg (ASKxFORxTEXT)
      if (string(1) != NUL) {
         call apmesg (POSITIONxCURSORxFORxTEXT, 0)
D 10
         call locate (xin, yin, xout, yout, nkey)
E 10
I 10
         call locate (ginx, giny, xout, yout, nkey)
E 10
	 call dlmesg (POSITIONxCURSORxFORxTEXT)
D 10
         xin = xout
         yin = yout
D 3
	 #call deftxt (xin, yin, string)
E 3
I 3
	 call deftxt (xin, yin, string)
E 10
I 10
         ginx = xout
         giny = yout
	 call deftxt (ginx, giny, string)
E 10
	 call qsthsz (2, xtemp, ytemp)
E 3
	 call rmvtxt (20, 38, string)
	 } 
      go to OTHERxWISE
      
E 2
   DIG2 continue  # Delete Text
I 12

      call dlmesg (TOGGLExTOxDATA)

E 12
D 2
   DIG3 continue
   DIG4 continue
   DIG5 continue
   DIG6 continue
   DIG7 continue
E 2
I 2
      call apmesg (POSITIONxCURSORxONxTEXT, 0)
D 10
      call locate (xin, yin, xout, yout, nkey)
E 10
I 10
      call locate (ginx, giny, xout, yout, nkey)
E 10
      call dlmesg (POSITIONxCURSORxONxTEXT)
D 10
      xin = xout
      yin = yout
D 3
      #call fndtxt (xin, yin, id)
      #if (id > 0) call deltxt (id)
E 3
I 3
      call fndtxt (xin, yin, id)
E 10
I 10
      ginx = xout
      giny = yout
      call fndtxt (ginx, giny, id)
E 10
      if (id > 0) {
	 call deltxt (id)
D 12
	 if (id == crntid) crntid = 0
E 12
I 12
	 if (id == crntid) {
	    crntid = 0
	    call anstat (0)
	    }
E 12
	 }
      call qsthsz (2, xtemp, ytemp)
E 3
E 2
      go to OTHERxWISE
I 2
      
   DIG3 continue   # move text
I 12

      call dlmesg (TOGGLExTOxDATA)

E 12
      call apmesg (POSITIONxCURSORxONxTEXT, 0)
D 10
      call locate (xin, yin, xout, yout, nkey)
E 10
I 10
      call locate (ginx, giny, xout, yout, nkey)
E 10
      call dlmesg (POSITIONxCURSORxONxTEXT)
D 10
      xin = xout
      yin = yout
E 10
I 10
      ginx = xout
      giny = yout
E 10
      id = 1
D 3
      #call fndtxt (xin, yin, id)
E 3
I 3
D 10
      call fndtxt (xin, yin, id)
E 10
I 10
      call fndtxt (ginx, giny, id)
E 10
      call qsthsz (2, xtemp, ytemp)
E 3
      if (id > 0) {
I 12
	 call anstat (id)
E 12
         call apmesg (POSITIONxCURSORxATxNEWxPOSITION, 0)
D 10
         call locate (xin, yin, xout, yout, nkey)
E 10
I 10
         call locate (ginx, giny, xout, yout, nkey)
E 10
	 call dlmesg (POSITIONxCURSORxATxNEWxPOSITION)
D 3
         #call movtxt (id, xout, yout, xin, yin)
E 3
I 3
D 10
         call movtxt (id, xout, yout, xin, yin)
E 3
	 xin = xout
	 yin = yout
E 10
I 10
         call movtxt (id, xout, yout, ginx, giny)
	 ginx = xout
	 giny = yout
E 10
I 3
         call qsthsz (2, xtemp, ytemp)
E 3
	 }
      go to OTHERxWISE 
E 2

I 2
   DIG4 continue   # Select text 
I 12

      call dlmesg (TOGGLExTOxDATA)

E 12
      call apmesg (POSITIONxCURSORxONxTEXT, 0)
D 10
      call locate (xin, yin, xout, yout, nkey)
E 10
I 10
      call locate (ginx, giny, xout, yout, nkey)
E 10
      call dlmesg (POSITIONxCURSORxONxTEXT)
D 10
      xin = xout
      yin = yout
D 3
      #call fndtxt (xin, yin, id)
      id = 1
E 3
I 3
      call fndtxt (xin, yin, id)
E 10
I 10
      ginx = xout
      giny = yout
      call fndtxt (ginx, giny, id)
E 10
      call qsthsz (2, xtemp, ytemp)
E 3
      if (id > 0) {
D 3
	 #call sttatt (id)
E 3
I 3
D 12
	 crntid = id
	 call erase
D 7
	 call apdata (4)
E 7
I 7
	 call apdata (4, FOREVER)
E 7
	 call appear
D 6
	 tfont = anobuf(id+3)
	 tcolor = anobuf(id+4)
	 tsize = anobuf(id+5)
E 6
I 6
	 tfont = anobuf(id+TEXTxITEMxFONT)
	 tcolor = anobuf(id+TEXTxITEMxCOLOR)
	 tsize = anobuf(id+TEXTxITEMxSIZE)
E 6
D 11
	 call qputi (4, tfont)
	 call qputi (5, tcolor)
	 call qputi (6, tsize)
E 11
I 11
	 itemp = tfont
	 call qputi (4, itemp)
	 itemp = tcolor
	 call qputi (5, itemp)
	 itemp = tsize
	 call qputi (6, itemp)
E 11
D 7
	 call apdata (4)
E 7
I 7
	 call apdata (4, FOREVER)
E 12
I 12
	 call anstat (id)
E 12
E 7
E 3
	 }
      go to OTHERxWISE
      
   DIG5 continue   # Change Selected text
D 3
      # change data
E 3
I 3
      if (crntid > 0) {
         # get the current selected attributes
D 11
         call qgeti (4, tfont)
         call qgeti (5, tcolor)
         call qgeti (6, tsize)
E 11
I 11
	 call qgeti (4, itemp)
	 tfont = itemp
         call qgeti (5, itemp)
	 tcolor = itemp
         call qgeti (6, itemp)
	 tsize = itemp
E 11
         call chgtxt (crntid)
         call qsthsz (2, xtemp, ytemp)
	 }
E 3
      go to OTHERxWISE
      
   DIG6 continue
   DIG7 continue
I 12
	go to OTHERxWISE

E 12
E 2
   DIG8 continue  # Return to last menu
I 12
      call clrscr
      mid = lastid
      action = BREAKxOVERLAY
      go to OTHERxWISE

E 12
D 2
      call apmenu (lastid)
      if (lastid == ADVANCEDxPIExEDIT) call cpaatt
      else if (lastid == ADVANCEDxGRAPHxEDIT) call cgaatt
      call apdata (1)

E 2
   DIG9 continue
   OTHERxWISE continue

   return
I 12
end
subroutine anstat (id)
integer id

SHORTINT clear(3)
D 13
integer itemp
E 13
I 13
integer itemp, itemp2
E 13

include(`gphcom')

data clear/UNDERLINE,UNDERLINE,NUL/

D 13
   crntid = id
   call erase
   call apdata (4, FOREVER)
   call appear
   if (id > 0) {
      tfont = anobuf(id+TEXTxITEMxFONT)
      tcolor = anobuf(id+TEXTxITEMxCOLOR)
      tsize = anobuf(id+TEXTxITEMxSIZE)
      itemp = tfont
      call qputi (4, itemp)
      itemp = tcolor
      call qputi (5, itemp)
      itemp = tsize
      call qputi (6, itemp)
E 13
I 13
   call qsthsz (2, itemp, itemp2)
   if (crntid != id) {
      crntid = id
      call erase
      call apdata (4, FOREVER)
      call appear
      if (id > 0) {
         tfont = anobuf(id+TEXTxITEMxFONT)
         tcolor = anobuf(id+TEXTxITEMxCOLOR)
         tsize = anobuf(id+TEXTxITEMxSIZE)
         itemp = tfont
         call qputi (4, itemp)
         itemp = tcolor
         call qputi (5, itemp)
         itemp = tsize
         call qputi (6, itemp)
         }
      else {
         call qputa (4, clear)
         call qputa (5, clear)
         call qputa (6, clear)
         }
      call apdata (4, FOREVER)
E 13
      }
D 13
   else {
      call qputa (4, clear)
      call qputa (5, clear)
      call qputa (6, clear)
      }
   call apdata (4, FOREVER)
E 13

return
E 12
end
E 1
