1 | DDBRS ;SFISC/DCL-SET UP SPLIT SCREEN ;NOV 04, 1996@13:55
|
---|
2 | ;;22.0;VA FileMan;;Mar 30, 1999
|
---|
3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
4 | TB(IOTM,IOBM,TA) ;Set Top and Bottom Margins in Target Array
|
---|
5 | ;pass IOTM, IOBM and TA all by reference **
|
---|
6 | N I,X
|
---|
7 | I (((IOBM-IOTM)+1)#2) S IOBM=IOBM-1
|
---|
8 | S TA(0,"IOTM")=IOTM
|
---|
9 | S TA(0,"IOBM")=IOBM
|
---|
10 | ETA S X=((IOBM+1)-(IOTM-1)\2)-2
|
---|
11 | S TA(1,"IOTM")=IOTM
|
---|
12 | S TA(1,"IOBM")=IOTM+X
|
---|
13 | S TA(2,"IOBM")=IOBM
|
---|
14 | S TA(2,"IOTM")=IOBM-X
|
---|
15 | ETB D
|
---|
16 | .N IOTM,IOBM
|
---|
17 | .F I=+$G(I):1:2 S IOTM=TA(I,"IOTM"),IOBM=TA(I,"IOBM") D
|
---|
18 | ..S TA(I,"DDBSY")=(IOTM-2)_";"_(IOTM-1)_";"_(IOBM-1)_";"_(IOBM)
|
---|
19 | ..S TA(I,"DDBSRL")=(IOBM-IOTM)+1
|
---|
20 | ..Q
|
---|
21 | .Q
|
---|
22 | Q
|
---|
23 | ;
|
---|
24 | ENTB(TA,DDBLD) ;called to reset DDBSY and DDBSRL for resizing split screen
|
---|
25 | ;TA PASSED BY REFERENCE
|
---|
26 | N I
|
---|
27 | S I=1
|
---|
28 | D ETB
|
---|
29 | F I=1,2 S TA(I,"DDBTPG")=TA(I,"DDBTL")\TA(I,"DDBSRL")+(TA(I,"DDBTL")#TA(I,"DDBSRL")'<1)
|
---|
30 | F I="DDBTPG","DDBSY","DDBSRL" S @I=TA(TA,I)
|
---|
31 | I DDBLD<0 S TA(1,"DDBL")=TA(1,"DDBL")-$S(TA(1,"DDBL")>0:1,1:0) Q
|
---|
32 | S TA(1,"DDBL")=TA(1,"DDBL")+$S(TA(1,"DDBL")<TA(1,"DDBTL"):1,1:0) Q
|
---|
33 | Q
|
---|
34 | ;
|
---|
35 | INIT(SUB,TA) ;Finish saving variables for TA pass TA by reference **
|
---|
36 | N I G:$G(SUB)]"" SUB
|
---|
37 | F SUB=1,2 D SUB
|
---|
38 | Q
|
---|
39 | SUB F I="DDBSRL","DDBHDR","DDBHDRC","DDBTL","DDBSA","DDBSF","DDBST","DDBZN","DDBDM","DDBC","DDBPSA","DDBRPE","DDBPMSG","DDBTPG" S TA(SUB,I)=@I
|
---|
40 | S TA(SUB,"DDBL")=+$G(DDBL)
|
---|
41 | Q
|
---|
42 | ;
|
---|
43 | SR(X,Y,ARRAY) ;Save, Restore, Array - Pass Array by reference **
|
---|
44 | D INIT(X,.ARRAY)
|
---|
45 | S X=""
|
---|
46 | F S X=$O(ARRAY(Y,X)) Q:X="" S @X=ARRAY(Y,X)
|
---|
47 | S ARRAY=Y ;* * active array * *
|
---|
48 | Q
|
---|
49 | ;
|
---|
50 | FULL(TA) ;Full Screen
|
---|
51 | ;TA passed by reference
|
---|
52 | I TA=1 S DDBL=DDBL+(DDBSRL+2)
|
---|
53 | N I,X
|
---|
54 | F I="IOBM","IOTM","DDBSY","DDBSRL" S @I=TA(0,I)
|
---|
55 | S DDBTPG=DDBTL\DDBSRL+(DDBTL#DDBSRL'<1)
|
---|
56 | S I=1 D ETA
|
---|
57 | W @IOSTBM
|
---|
58 | S TA=0 ;* * active array * *
|
---|
59 | S DDBL=$G(DDBL,0) S:DDBL<0 DDBL=0 S:DDBL>DDBTL DDBL=DDBTL
|
---|
60 | D PSR^DDBR0(1)
|
---|
61 | Q
|
---|
62 | ;
|
---|
63 | SPLIT ;Split Screen
|
---|
64 | N I
|
---|
65 | F I="IOBM","IOTM","DDBSY","DDBSRL" S @I=DDBRSA(2,I)
|
---|
66 | S DDBTPG=DDBTL\DDBSRL+(DDBTL#DDBSRL'<1)
|
---|
67 | S I=1
|
---|
68 | D INIT("",.DDBRSA)
|
---|
69 | W @IOSTBM
|
---|
70 | S DDBL=$G(DDBL,0) S:DDBL<0 DDBL=0 S:DDBL>DDBTL DDBL=DDBTL
|
---|
71 | D PSR^DDBR0(1)
|
---|
72 | D SR(2,1,.DDBRSA)
|
---|
73 | W @IOSTBM
|
---|
74 | S DDBL=DDBL-(DDBSRL+2),DDBRSA(1,"DDBL")=DDBL
|
---|
75 | S DDBL=$G(DDBL,0) S:DDBL<0 DDBL=0 S:DDBL>DDBTL DDBL=DDBTL
|
---|
76 | D PSR^DDBR0(1)
|
---|
77 | Q
|
---|
78 | ;
|
---|
79 | ;;NOTE: DDBRSA=0 - full screen
|
---|
80 | ;; DDBRSA=1 - top of split screen
|
---|
81 | ;; DDBRSA=2 - bottom of split screen
|
---|