[613] | 1 | DDGF ;SFISC/MKO-FORM BUILDING TOOL ;08:38 AM 12 Aug 1994
|
---|
| 2 | ;;22.0;VA FileMan;;Mar 30, 1999
|
---|
| 3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
| 4 | ;
|
---|
| 5 | ;Program-wide variables
|
---|
| 6 | ; DDGFILE = File number^File name
|
---|
| 7 | ; DDGFFM = Form number^Form name
|
---|
| 8 | ; DDGFPG = Page number
|
---|
| 9 | ; DDGFWID = Window id for given page
|
---|
| 10 | ; DDGFWIDB = Window id for block displayer for a given page
|
---|
| 11 | ; DDGFREF = Global reference where data is stored
|
---|
| 12 | ; DDGFLIM = Boundaries within which cursor can be moved
|
---|
| 13 | ; $Y1^$X1^$Y2^$X2
|
---|
| 14 | ; DDGFBV = If defined, we're in the block view page
|
---|
| 15 | ; DDGFMSG = Indicates there's a message on the message line.
|
---|
| 16 | ;
|
---|
| 17 | N %,%W,%X,%Y,C,D,D0,DI,DIC,DIEQ,DIW,DIZ,DQ,I,X,Y,DIOVRD
|
---|
| 18 | I '$D(DIFM) N DIFM S DIFM=1 D INIZE^DIEFU
|
---|
| 19 | D ^DDGF0 G:$G(DIERR) END^DDGF0
|
---|
| 20 | D SEL^DDGFFM G:$D(DDGFFM)[0 END^DDGF0
|
---|
| 21 | D ALL^DDGFASUB,^DDGF1,END^DDGF0
|
---|
| 22 | Q
|
---|
| 23 | ;
|
---|
| 24 | REFRESH ;Repaint all windows, status line
|
---|
| 25 | D REPALL^DDGLIBW(),STATUS
|
---|
| 26 | Q
|
---|
| 27 | ;
|
---|
| 28 | STATUS ;Paint status line
|
---|
| 29 | N DX,DY,N,S
|
---|
| 30 | K DDGFMSG
|
---|
| 31 | S DY=IOSL-7,DX=0 X IOXY
|
---|
| 32 | W $P(DDGLCLR,DDGLDEL,3)_$TR($J("",IOM-1)," ","_")
|
---|
| 33 | ;
|
---|
| 34 | S DY=IOSL-6 X IOXY
|
---|
| 35 | W "File: "_$P(DDGFFILE,U,2)_" (#"_$P(DDGFFILE,U)_")"
|
---|
| 36 | I $D(DDGFBV)#2 S DX=46 X IOXY W "BLOCK VIEWER"
|
---|
| 37 | W !,"Form: "_$P(DDGFFM,U,2)
|
---|
| 38 | S N=$G(@DDGFREF@("F",+$G(DDGFPG)))
|
---|
| 39 | W !,"Page: "_$S(N]"":$P(N,U,6)_" ("_$P(N,U,5)_")",1:""),!!!
|
---|
| 40 | I $D(DDGFBV)#2 W $P(DDGLVID,DDGLDEL)_"<PF1>V=Main Screen <PF1>H=Help"_$P(DDGLVID,DDGLDEL,10)
|
---|
| 41 | E W $P(DDGLVID,DDGLDEL)_"<PF1>Q=Quit <PF1>E=Exit <PF1>S=Save <PF1>V=Block Viewer <PF1>H=Help"_$P(DDGLVID,DDGLDEL,10)
|
---|
| 42 | Q
|
---|
| 43 | ;
|
---|
| 44 | MSG(M) ;Print message
|
---|
| 45 | N DDGFDY,DDGFDX
|
---|
| 46 | S DDGFDY=DY,DDGFDX=DX S:$D(M)[0 M=""
|
---|
| 47 | S DY=IOSL-2,DX=0 X IOXY
|
---|
| 48 | ;
|
---|
| 49 | W $E(M,1,79)_$P(DDGLCLR,DDGLDEL)
|
---|
| 50 | S:M]"" DDGFMSG=1 K:M="" DDGFMSG
|
---|
| 51 | S DY=DDGFDY,DX=DDGFDX X IOXY
|
---|
| 52 | Q
|
---|
| 53 | ;
|
---|
| 54 | RESET ;Reset terminal and cleanup
|
---|
| 55 | S DDGFREF="^TMP(""DDGF"",$J)",DDGLREF="^TMP(""DDGL"",$J)"
|
---|
| 56 | K DDSFILE,DDSPAGE,DDSPARM,DR
|
---|
| 57 | G KILL^DDGF0
|
---|