source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWCH.m@ 1608

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

initial load of WorldVistAEHR

File size: 3.6 KB
Line 
1ORWCH ; SLC/KCM/SCM - GUI calls specific to CPRS Chart;01:34 PM 15 Dec 1997 [10:52 AM 13 JUN 2002]
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**10,109,149**;Dec 17, 1997
3SAVESIZ(ORERR,NAM,VAL) ; save the bounds for a particular control
4 ; NAM=frmName or frmName.ctrlName VAL=left,top,width,height
5 D EN^XPAR(DUZ_";VA(200,","ORWCH BOUNDS",NAM,VAL,.ORERR)
6 Q
7LOADSIZ(VAL,NAM) ; return the bounds for a particular control
8 I NAM="" S VAL="" Q
9 S VAL=$$GET^XPAR(DUZ_";VA(200,","ORWCH BOUNDS",NAM,"I")
10 Q
11 ;
12LDFONT(VAL,NAM) ; load the user's preferred font size
13 S VAL=$$GET^XPAR(DUZ_";VA(200,","ORWCH FONT SIZE",1,"I")
14 Q
15SAVEALL(OK,LST) ; save the list of sizing information
16 N I,TYP,NAM,VAL,PAR,ORERR
17 S (I,OK)="" F S I=$O(LST(I)) Q:'I D
18 . S TYP=$P(LST(I),U),NAM=$P(LST(I),U,2),VAL=$P(LST(I),U,3)
19 . S PAR="ORWCH "_$S(TYP="B":"BOUNDS",TYP="W":"WIDTH",TYP="C":"COLUMNS")
20 . D EN^XPAR(DUZ_";VA(200,",PAR,NAM,VAL,.ORERR)
21 . I ORERR S OK=OK_LST(I)_":"_ORERR_U
22 ; Other clean up: kill off global for sharing DFN
23 K ^TMP("ORWCHART",$J),^TMP("ORECALL",$J),^TMP("ORWORD",$J)
24 K ^TMP("ORWDXMQ",$J)
25 Q
26SAVECOL(OK,COL) ;save report column sizing information
27 N NAM,VAL,ORERR
28 S OK="",NAM=$P(COL,"^"),VAL=$P(COL,"^",2)
29 D EN^XPAR(DUZ_";VA(200,","ORWCH COLUMNS REPORTS",NAM,VAL,.ORERR)
30 I ORERR S OK=COL_":"_ORERR
31 Q
32LOADALL(LST) ; load all the sizing related paramters
33 N ORBOUNDS,ORWIDTHS,ORCOLMNS,ILST S ILST=0
34 D GETLST^XPAR(.ORBOUNDS,DUZ_";VA(200,","ORWCH BOUNDS")
35 D GETLST^XPAR(.ORWIDTHS,DUZ_";VA(200,","ORWCH WIDTH")
36 D GETLST^XPAR(.ORCOLMNS,DUZ_";VA(200,","ORWCH COLUMNS")
37 S ILST=ILST+1,LST(ILST)="~Bounds"
38 S I="" F S I=$O(ORBOUNDS(I)) Q:'I S ILST=ILST+1,LST(ILST)="i"_ORBOUNDS(I)
39 S ILST=ILST+1,LST(ILST)="~Widths"
40 S I="" F S I=$O(ORWIDTHS(I)) Q:'I S ILST=ILST+1,LST(ILST)="i"_ORWIDTHS(I)
41 S ILST=ILST+1,LST(ILST)="~Columns"
42 S I="" F S I=$O(ORCOLMNS(I)) Q:'I S ILST=ILST+1,LST(ILST)="i"_ORCOLMNS(I)
43 Q
44SAVFONT(ORERR,VAL) ; save the user's preferred font size
45 D EN^XPAR(DUZ_";VA(200,","ORWCH FONT SIZE",1,VAL,.ORERR)
46 Q
47 ;
48CLRUSR ; clear size & position settings for user
49 ; called from ORW CLEAR SIZES USER
50 N DIC,DIR,DIK,ORERR,ENT,Y
51 W !,"Clear GUI size & position settings for selected user -"
52 S DIC=200,DIC(0)="AEMQ" D ^DIC Q:Y<1
53 S ENT=+Y_";VA(200,"
54 S DIR(0)="Y",DIR("A")="Clear sizes for "_$P(Y,U,2),DIR("B")="YES"
55 D ^DIR Q:Y'=1
56 D NDEL^XPAR(ENT,"ORWCH BOUNDS",.ORERR) I ORERR W !,ORERR
57 D NDEL^XPAR(ENT,"ORWCH WIDTH",.ORERR) I ORERR W !,ORERR
58 D NDEL^XPAR(ENT,"ORWCH COLUMNS",.ORERR) I ORERR W !,ORERR
59 D DEL^XPAR(ENT,"ORWCH FONT SIZE",1,.ORERR) I ORERR W !,ORERR
60 W !,"Settings cleared."
61 Q ;
62 ; -- are the following calls still used?
63 ;
64GETPOS(VAL) ; returns the position and size information for CPRSChart
65 ; VAL=WindowState^Size^Position^PageSplit,PageSplit...
66 N I,ORX
67 S VAL=$$GET^XPAR(DUZ_";VA(200,","ORWCH MAINFORM STATE",1,"I")_U
68 S VAL=VAL_$$GET^XPAR(DUZ_";VA(200,","ORWCH MAINFORM SIZE",1,"I")_U
69 S VAL=VAL_$$GET^XPAR(DUZ_";VA(200,","ORWCH MAINFORM POSITION",1,"I")_U
70 D GETLST^XPAR(.ORX,DUZ_";VA(200,","ORWCH PAGE SPLIT","Q")
71 S ORX="",I=0 F S I=$O(ORX(I)) Q:'I S $P(ORX,",",+ORX(I))=$P(ORX(I),U,2)
72 S VAL=VAL_ORX
73 Q
74SETPOS(OK,X) ; records window size and position info for the current user
75 ; X=WindowState^Size^Position^PageSplit,PageSplit...
76 N I,X4,ORERR S OK=1
77 D EN^XPAR(DUZ_";VA(200,","ORWCH MAINFORM STATE",1,$P(X,U),.ORERR)
78 D EN^XPAR(DUZ_";VA(200,","ORWCH MAINFORM SIZE",1,$P(X,U,2),.ORERR)
79 D EN^XPAR(DUZ_";VA(200,","ORWCH MAINFORM POSITION",1,$P(X,U,3),.ORERR)
80 S X4=$P(X,U,4)
81 F I=1:1:$L(X4,",") I +$P(X4,",",I) D
82 . D EN^XPAR(DUZ_";VA(200,","ORWCH PAGE SPLIT",I,$P(X4,",",I),.ORERR)
83 Q
Note: See TracBrowser for help on using the repository browser.