tldm-universe/Ardent/UV/APP.PROGS/DRAW.SCRN.B
2024-09-09 17:51:08 -04:00

102 lines
2.5 KiB
Plaintext
Executable File

*******************************************************************************
*
* New System Admin - This draws the GUI screen, and varying parts of the
* GUI screen.
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 05/15/96 18330 LDG Changed LEN() function to LENDP() for NLS DBCS.
* 05/13/91 8345 DTM changed print to tprint
* 03/13/91 7673 DTM Changed things for performance purposes
* 11/05/90 7393 DPB Routine first created and admin'd.
*******************************************************************************
SUBROUTINE DRAW.SCRN(title, option)
$INCLUDE UNIVERSE.INCLUDE MTF.INCL.H
x = STR(h.line,78)
BEGIN CASE
CASE option = 1
TPRINT @(-1):
GOSUB full.screen
CASE option = 2
GOSUB top.line
CASE option = 3
GOSUB open.help
CASE option = 4
GOSUB close.help
END CASE
RETURN
full.screen:
GOSUB top.line
FOR I = 1 to 21
TPRINT @(0,I):v.line:@(79,I):v.line:
NEXT I
TPRINT @(0,2):l.tee:x:r.tee:@(0,16):l.tee:x:r.tee:
TPRINT @(0,22):ll.corner:x:rl.corner:
;* added DTM
help.title="Help Region"
ht.len=LENDP(help.title)
TPRINT @((40 - (ht.len+4/2))+5+ht.len,16):
CALL *INVERSE.B(0)
TPRINT @((80 - (ht.len+4))/2, 16):
CALL *INVERSE.B(1)
TPRINT " ":help.title:" ":
CALL *INVERSE.B(0)
RETURN
top.line:
TPRINT @(0,0):lu.corner:x:ru.corner
IF title # "" THEN
t.len=LENDP(title)
TPRINT @((40 - (t.len+4/2))+5+t.len,0):
CALL *INVERSE.B(0)
TPRINT @((80 - (t.len+4))/2, 0):
CALL *INVERSE.B(1)
TPRINT " ":title:" ":
CALL *INVERSE.B(0)
END
RETURN
open.help:
TPRINT @(0,16):ll.corner:x:rl.corner:
blank=CL:" "
FOR I = 17 to 22
TPRINT @(0,I):blank:
NEXT I
RETURN
close.help:
TPRINT @(0,16):l.tee:x:r.tee:
blank=CL:" "
FOR I = 17 to 21
TPRINT @(0,I):v.line:blank:v.line:
NEXT I
TPRINT @(0,22):ll.corner:x:rl.corner:
RETURN
END