tldm-universe/Ardent/UV/APP.PROGS/HELP.PRINT.B

105 lines
2.6 KiB
Plaintext
Raw Normal View History

2024-09-09 21:51:08 +00:00
*******************************************************************************
*
* New System Admin - This routine allows the user to perform various
* manipulations to the help area at the bottom 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/20/96 18330 LDG Changed LEN() function to LENDP() for NLS DBCS.
* 05/13/91 8345 DTM changed print to tprints
* 03/12/91 7673 DTM Changed for consistency sake.
* 11/05/90 7393 DPB Routine first created and admin'd.
*******************************************************************************
SUBROUTINE HELP.PRINT.B(text, opt)
$INCLUDE UNIVERSE.INCLUDE MTF.INCL.H
top = 17
bottom = 21
start = 1
length = 77
IF help.init = 0 THEN
help.pos = top
help.lock = FALSE
help.init = TRUE
END
store = text
BEGIN CASE
CASE help.lock = 1
help.lock = 0
BEGIN CASE
CASE opt = 2
help.lock = 1
CASE opt = 3
GOSUB clear.area
CASE opt = 4
help.init = 5
GOSUB clear.area
CASE opt = 5
help.pos = bottom
END CASE
CASE help.lock = 0
GOSUB clear.area
BEGIN CASE
CASE opt = 2
help.lock = 1
CASE opt = 4
help.init = 5
CASE opt = 5
help.pos = bottom
END CASE
END CASE
loop1:
IF LENDP(text) > length THEN
temp = length
LOOP UNTIL text[temp,1] =' ' DO
temp -= 1
IF temp=0 THEN
GOTO loop2
END
REPEAT
loop2:
IF temp < 40 THEN temp = length
tstr = text[1,temp]
text = text[temp+1, LENDP(text)]
TPRINT @(start, help.pos):tstr:
help.pos += 1
IF help.pos > bottom THEN
help.pos=top
END
GOTO loop1
END
TPRINT @(start, help.pos):text:
help.init = help.pos - (top - 1)
help.pos += 1
IF help.pos > bottom THEN
help.pos=top
END
text = store
RETURN
clear.area:
FOR I = top TO (top - 1 + help.init)
TPRINT @(start,I):CL:
NEXT I
help.pos = top
RETURN
END