h61438
s 00001/00000/00125
d D 1.23 83/03/29 17:47:01 mjb 23 22
c 
e
s 00001/00000/00124
d D 1.22 83/03/03 22:33:17 mjb 22 21
c 
e
s 00002/00002/00122
d D 1.21 83/03/03 18:46:52 mjb 21 20
c put in check for single graph recalls in multi graph mode
e
s 00000/00000/00124
d D 1.20 83/02/18 00:36:26 mjb 20 19
c fixed numerous bugs with insertion and pie data in general
e
s 00010/00002/00114
d D 1.19 83/02/17 16:00:28 mjb 19 18
c 
e
s 00005/00002/00111
d D 1.18 83/02/17 12:28:21 mjb 18 17
c fixed bug with savrst upon start up
e
s 00030/00025/00083
d D 1.17 83/02/15 12:32:32 mjb 17 16
c incorporated Fred and Kathy request for savrst to go to edit menu
e
s 00000/00000/00108
d D 1.16 83/02/14 22:58:06 mjb 16 15
c bug fixing
e
s 00003/00000/00105
d D 1.15 83/02/14 14:08:07 mjb 15 14
c added sflag to tell when absolutely necessary to save current graph
e
s 00000/00000/00105
d D 1.14 83/02/09 21:56:09 tes 14 13
c Added move legend menu handler
e
s 00006/00000/00099
d D 1.13 83/02/08 20:13:10 mjb 13 12
c restructured for overlaying menus
e
s 00005/00017/00094
d D 1.12 83/02/08 14:34:09 mjb 12 11
c added structure to allow even MORE overlaying
e
s 00005/00005/00106
d D 1.11 83/02/03 00:50:05 tes 11 10
c modified apdata interface to include last item to display
e
s 00003/00000/00108
d D 1.10 83/01/31 22:50:43 mjb 10 9
c put in error report for undefined chart
e
s 00004/00002/00104
d D 1.9 83/01/31 19:14:32 mjb 9 8
c made changes for checking of defined charts
e
s 00002/00002/00104
d D 1.8 83/01/29 16:37:26 mjb 8 7
c made changes for save restore of multi files and error reporting
e
s 00015/00010/00091
d D 1.7 83/01/28 23:28:51 tes 7 6
c modified apmenu interface to include a clear screen flag
e
s 00000/00000/00101
d D 1.6 83/01/27 13:50:31 mjb 6 5
c took care of interface changes
e
s 00001/00001/00100
d D 1.5 83/01/21 19:14:29 tes 5 4
c Removed references to ANNOTATEx0
e
s 00002/00000/00099
d D 1.4 83/01/21 16:55:31 tes 4 3
c Modified to interface to the annotation menu
e
s 00007/00001/00092
d D 1.3 83/01/20 21:28:18 mjb 3 2
c made changes to allow for correct output of multi charts
e
s 00003/00001/00090
d D 1.2 83/01/20 14:44:13 mjb 2 1
c modified for multiple graphs
e
s 00091/00000/00000
d D 1.1 83/01/20 11:12:54 tes 1 0
c date and time created 83/01/20 11:12:54 by tes
e
u
tes
mjb
U
t
T
I 1
subroutine mnuman (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: Main menu manager                                      #
#                                                                      #
#     Input Parameters:                                                #
#            item  - selected menu item                                #
#                                                                      #
#     Output Parameters:                                               #
#            None                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            None                                                      #
#                                                                      #
########################################################################
SHORTINT item

D 18
SHORTINT jump
E 18
I 18
SHORTINT jump, savtyp, savmlt
E 18
I 7
integer iclear
E 7

include(`gphcom')

I 7
data iclear /YES/

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

   DIG0 continue  # EXIT_GSS_GRAPH
I 9
      call chkdef                     # check for a defined file and save
E 9
      action = EXITxGSSxGRAPH
      go to OTHERxWISE

   DIG1 continue  # CREATExNEWxCHART
D 9
      # call chkdef        # check for a defined file and save  
E 9
I 9
      call chkdef                    # check for a defined file and save  
E 9
D 7
      call apmenu (CREATExNEWxCHART)
E 7
I 7
      call apmenu (CREATExNEWxCHART, iclear)
E 7
      go to OTHERxWISE

   DIG2 continue  # RECALLxSAVEDxCHART
D 9
      # call chkdef        # check for a defined file and save  
E 9
I 9
      call chkdef                    # check for a defined file and save  
I 18
      savtyp = bctype
      savmlt = multfg
I 19
      bctype = 0
      multfg = 1
I 22
      krmain = 1
E 22
E 19
E 18
E 9
D 8
      call savrst (BINARYxREAD, bgtitl, GPHCOMxSIZE)
E 8
I 8
D 21
      call savrst (BINARYxREAD)
E 21
I 21
      call savrst (BINARYxREAD, EITHER)
E 21
E 8
D 7
      call apmenu (MAINxMENU)
E 7
I 7
D 17
      call apmenu (MAINxMENU, iclear)
E 17
I 17
D 18
      call chktyp
E 18
I 18
D 19
      if (savtyp != bctype | savmlt != multfg)  call chktyp
      else call apmenu (MAINxMENU, iclear)
E 19
I 19
      if (bctype != 0 | multfg != 1) {
	 call chktyp
	 }
      else {
	 bctype = savtyp
	 multfg = savmlt
         call apmenu (MAINxMENU, iclear)
	 }
I 23
      crntid = 0                     # reset current id for annotation
E 23
E 19
E 18
E 17
E 7
      go to OTHERxWISE

   DIG3 continue  # DISPLAYxCURRENTxCHART
      mid = MAINxMENU
      action = SHOWxCHART
      device = CRT
      go to OTHERxWISE

   DIG4 continue  # EDIT_CHART
I 15
D 17

      bgsave = YES                   # Set save flag dirty

E 15
D 3
      if (bctype == PIE) {      # PIE
E 3
I 3
      if (multfg > 1) {              # A multiple chart graph
D 7
         call apmenu (MULTIPLExCHARTSxPERxPAGE)
E 7
I 7
D 12
         call apmenu (MULTIPLExCHARTSxPERxPAGE, iclear)
E 7
         call cgmult
D 11
         call apdata (1)
E 11
I 11
         call apdata (1, FOREVER)
E 12
I 12
         mid = MULTIPLExCHARTSxPERxPAGE
I 13
	 action = BREAKxOVERLAY
E 13
E 12
E 11
	 }
      else if (bctype == PIE) {      # PIE
E 3
D 7
         call apmenu (PIExEDIT)
E 7
I 7
D 12
         call apmenu (PIExEDIT, iclear)
E 7
         call cpeatt (krmain)
D 11
         call apdata (1)
E 11
I 11
         call apdata (1, FOREVER)
E 12
I 12
	 mid = PIExEDIT
I 13
	 action = BREAKxOVERLAY
E 13
E 12
E 11
         }
      else if (bctype == TEXT) {     # TEXT
I 4
D 12
	 call clrscr
         call chgmod (ENTERxGRAPHICSxMODE)
E 12
E 4
         lastid = mid
D 5
         call apmenu (ANNOTATEx0)
E 5
I 5
D 7
         call apmenu (ANNOTATE)
E 7
I 7
D 12
         call apmenu (ANNOTATE, iclear)
         call ctxatt
D 11
         call apdata (1)
E 11
I 11
         call apdata (1, FOREVER)
E 12
I 12
         mid = ANNOTATE
I 13
	 action = BREAKxOVERLAY
	 call clrscr
E 13
E 12
E 11
E 7
E 5
         }
D 7
      else {                    # GRAPH
         call apmenu (GRAPHxEDIT)
E 7
I 7
      else if (bctype != NUL ) {      # GRAPH
D 12
         call apmenu (GRAPHxEDIT, iclear)
E 7
         call cgeatt(krmain)
D 11
         call apdata (1)
E 11
I 11
         call apdata (1, FOREVER)
E 12
I 12
         mid = GRAPHxEDIT
I 13
	 action = BREAKxOVERLAY
E 13
E 12
E 11
         }
I 10
      else {
	 call apmesg (NOxCHARTxDEFINEDxERROR,ON)
	 }
E 17
I 17
      call chktyp
E 17
E 10
      go to OTHERxWISE

   DIG5 continue  # OUTPUTxCHARTxTOxPERIPHERAL
I 3
      lastid = MAINxMENU
E 3
D 2
      # call selfrm            # select output format  
E 2
D 7
      call apmenu (DEVICExSELECTION)
E 7
I 7
      call apmenu (DEVICExSELECTION, iclear)
E 7
      go to OTHERxWISE

   DIG6 continue  # SAVExCHART
D 8
      call savrst (BINARYxWRITE, bgtitl, GPHCOMxSIZE)
E 8
I 8
D 21
      call savrst (BINARYxWRITE)
E 21
I 21
      call savrst (BINARYxWRITE, EITHER)
E 21
E 8
D 7
      call apmenu (MAINxMENU)
E 7
I 7
      call apmenu (MAINxMENU, iclear)
E 7
      go to OTHERxWISE

   DIG7 continue  # MULTIPLExCHARTSxPERxPAGExMODE
I 9
      call chkdef                        # Check for a defined file and save
E 9
D 7
      call apmenu (MULTIPLExCHARTSxPERxPAGE)
E 7
I 7
D 12
      call apmenu (MULTIPLExCHARTSxPERxPAGE, iclear)
E 12
I 12
      mid = MULTIPLExCHARTSxPERxPAGE
E 12
E 7
I 2
      call inmmem
I 13
      action = BREAKxOVERLAY
E 13
D 12
      call cgmult
D 11
      call apdata (1)
E 11
I 11
      call apdata (1, FOREVER)
E 12
E 11
E 2
      go to OTHERxWISE

   DIG8 continue
   DIG9 continue
   OTHERxWISE continue

return
end
I 17
subroutine chktyp
include(`gphcom')
E 17

I 17
   bgsave = YES                   # Set save flag dirty

   if (multfg > 1) {              # A multiple chart graph
      mid = MULTIPLExCHARTSxPERxPAGE
      action = BREAKxOVERLAY
      }
   else if (bctype == PIE) {      # PIE
      mid = PIExEDIT
      action = BREAKxOVERLAY
      }
   else if (bctype == TEXT) {     # TEXT
      lastid = mid
      mid = ANNOTATE
      action = BREAKxOVERLAY
      call clrscr
      }
   else if (bctype != NUL ) {      # GRAPH
      mid = GRAPHxEDIT
      action = BREAKxOVERLAY
      }
   else {
      call apmesg (NOxCHARTxDEFINEDxERROR,ON)
      }

   return
end
E 17
E 1
