source: WorldVistAEHR/trunk/r/LIST_MANAGER-VALM/VALM00.m@ 1579

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

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1VALM00 ;MJK/ALB - List Manager (cont.);10:04 AM 7 Dec 1992
2 ;;1;List Manager;;Aug 13, 1993
3 ;
4KEYS(PRTCL,KILL) ; -- set up default objects
5 N X,I,Y,NUM,CNT
6 K:$G(KILL) VALMKEY
7 I VALM("DEFS") D
8 .S VALMKEY(10001)=+$O(^ORD(101,"B","VALM NEXT SCREEN",0))_"^NEXT^10001"
9 .S VALMKEY(10002)=+$O(^ORD(101,"B","VALM PREVIOUS SCREEN",0))_"^PREV^10002"
10 .S VALMKEY(10003)=+$O(^ORD(101,"B","VALM QUIT",0))_"^QUIT^10003"
11 S VALMKEY=$G(VALMKEY)+0
12 G:PRTCL="" KEYSQ
13 S X=+$O(^ORD(101,"B",PRTCL,0)),(VALMKEY,I)=0,NUM=9999
14 F S I=$O(^ORD(101,X,10,I)) Q:'I S Y=$G(^(I,0)) I $P(Y,U,2)]"" D
15 .S:'$P(Y,U,3) $P(Y,U,3)=NUM,NUM=NUM-1
16 .S VALMKEY(+$P(Y,U,3))=$P(Y,U,1,3),VALMKEY=VALMKEY+1
17 S VALMKEY=VALMKEY_U_PRTCL
18KEYSQ Q
19 ;
20ATR ; -- set default video ctrls
21 N FLD,COL,WIDTH,ON,OFF
22 S FLD=""
23 F S FLD=$O(VALMDDF(FLD)) Q:FLD="" D
24 .S (ON,OFF)="",X=VALMDDF(FLD),COL=+$P(X,U,2),WIDTH=+$P(X,U,3)
25 .D ATRFLD(.FLD,.ON,.OFF)
26 .D:ON]"" CNTRL^VALM10(0,.COL,.WIDTH,.ON,.OFF,1)
27 Q
28 ;
29ATRFLD(FLD,ON,OFF) ; -- get field video ctrls ; ON/OFF by reference only
30 N CTRL,M
31 S CTRL=$P(VALMDDF(FLD),U,5)
32 F M=1:1:$L(CTRL) D ONOFF($E(CTRL,M),.ON,.OFF)
33ATRFLDQ Q
34 ;
35ONOFF(CTRL,ON,OFF) ; -- get video ctrls ; ON/OFF by reference only
36 N I
37 S I=$F("HRUB",CTRL) S:I I=I-1
38 S ON=ON_@($P("IOINHI^IORVON^IOUON^IOBON","^",I))
39 S OFF=OFF_@($P("IOINORM^IORVOFF^IOUOFF^IOBOFF","^",I))
40 Q
41 ;
42SETUP(NAME) ; -- on-the-fly list
43 D @NAME
44 S Y=1 F X="ARRAY" I '$D(VALM(X)) S Y=0 G SETUPQ
45 I $E(VALM("ARRAY"))'="" S VALM("ARRAY")=" "_VALM("ARRAY")
46 S VALM("IFN")=0
47 S:'$D(VALM("TM")) VALM("TM")=$S('$D(VALM("HDR")):2,1:5)
48 S:'$D(VALM("BM")) VALM("BM")=$S('$D(VALM("HDR")):16,1:14)
49 S:'$D(VALM("TYPE")) VALM("TYPE")=2 ; def to display
50 S:'$D(VALM("TITLE")) VALM("TITLE")="Standard List Display"
51 I '$G(VALM("MAX")) S VALM("MAX")=1
52 S:'$D(VALM("FIXED")) VALM("FIXED")=0
53 S:'$D(VALM("RM")) VALM("RM")=240
54 S:'$D(VALM("DEFS")) VALM("DEFS")=1
55 S:'$D(VALMCC) VALMCC=1
56 S:'$D(VALM("HIDDEN")) VALM("HIDDEN")="VALM HIDDEN ACTIONS"
57SETUPQ Q Y
58 ;
Note: See TracBrowser for help on using the repository browser.