source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DDWC1.m@ 1714

Last change on this file since 1714 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.6 KB
RevLine 
[613]1DDWC1 ;SFISC/MKO-CHANGE ;09:20 AM 27 Aug 1994
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4SETUP ;Setup new scrolling region
5 N DDWI
6 F DDWI=$$MIN(DDWMR,DDWCNT-DDWA):-1:DDWMR-4 D
7 . S DDWSTB=DDWSTB+1,^TMP("DDW1",$J,DDWSTB)=DDWL(DDWI)
8 S IOBM=IOBM-5,DDWMR=DDWMR-5
9 W:$P(DDGLED,DDGLDEL,2)]"" @$P(DDGLED,DDGLDEL,2)
10 ;
11 ;Print dialog box
12 N DDWR0,DDWR1
13 S DDWR1=$P(DDGLVID,DDGLDEL,6),DDWR0=$P(DDGLVID,DDGLDEL,10)
14 ;
15 D CUP(DDWMR+1,1)
16 W $P(DDGLGRA,DDGLDEL)_$TR($J("",IOM)," ",$P(DDGLGRA,DDGLDEL,3))_$P(DDGLGRA,DDGLDEL,2),!
17 D CUP(DDWMR+2,1) W $P(DDGLCLR,DDGLDEL)_" Find What:"
18 D CUP(DDWMR+3,1) W $P(DDGLCLR,DDGLDEL)_"Replace With: "_$G(DDWCHG)
19 D CUP(DDWMR+4,1) W $P(DDGLCLR,DDGLDEL)_" Option:"_$P(DDGLCLR,DDGLDEL)_$J("",20)_DDWR1_"F"_DDWR0_"ind Next "_DDWR1_"R"_DDWR0_"eplace Replace "_DDWR1_"A"_DDWR0_"ll "_DDWR1_"Q"_DDWR0_"uit"
20 D CUP(DDWMR+5,1) W $P(DDGLCLR,DDGLDEL)
21 Q
22 ;
23RESTORE ;Restore original scrolling region
24 N DDWI
25 S IOBM=IOBM+5,DDWMR=DDWMR+5
26 W:$P(DDGLED,DDGLDEL,2)]"" @$P(DDGLED,DDGLDEL,2)
27 F DDWI=DDWMR-4:1:DDWMR D
28 . I DDWI+DDWA'>DDWCNT D
29 .. S DDWL(DDWI)=^TMP("DDW1",$J,DDWSTB),DDWSTB=DDWSTB-1
30 . E S DDWL(DDWI)=""
31 . D CUP(DDWI,1)
32 . W $P(DDGLCLR,DDGLDEL)_$E(DDWL(DDWI),1+DDWOFS,IOM+DDWOFS)
33 .
34 D POS(DDWRW,DDWC,"RN")
35 Q
36 ;
37MIN(X,Y) ;
38 Q $S(X<Y:X,1:Y)
39 ;
40CUP(Y,X) ;Pos cursor
41 S DY=IOTM+Y-2,DX=X-1 X IOXY
42 Q
43 ;
44POS(R,C,F) ;Pos cursor based on char pos C
45 N DDWX
46 S:$G(C)="E" C=$L($G(DDWL(R)))+1
47 S:$G(F)["N" DDWN=$G(DDWL(R))
48 S:$G(F)["R" DDWRW=R,DDWC=C
49 ;
50 S DDWX=C-DDWOFS
51 I DDWX>IOM!(DDWX<1) D SHIFT^DDW3(C,.DDWOFS)
52 S DY=IOTM+R-2,DX=C-DDWOFS-1 X IOXY
53 Q
Note: See TracBrowser for help on using the repository browser.