Listing: 1 IMPLEMENTATION MODULE Prompts; 2 (* 3 * ModBase 4 * Release 3.0 5 * (c) Copyright 1986 - 1991 PMI 6 * P.O. Box 8402 7 * Green Bay Wi 53308 8 * All Rights Reserved 9 * by Ed Ross 10 *) 11 12 FROM BigSets IMPORT AppendSet, InitSet; 13 FROM KbdInput IMPORT AnyKeyNum, KeyHit, KeyNumSet, YorN; 14 FROM M2Strings IMPORT Length; 15 FROM MsgBox2 IMPORT MsgOkay, StrMsgBox; 16 FROM ScrnTypes IMPORT DisplayFrame, InitDisplayFrame; 17 FROM ScrnUtl2 IMPORT CloseDisplayFrame; 18 FROM SmartScreen IMPORT ClearPart, SetCursorHeight, WriteAt; 19 FROM StrConv IMPORT StrToCardinal,ReturnedCard,CardinalToStr; 20 FROM StrEdit IMPORT AssignStr,CrunchBlanks; 21 FROM StrInput IMPORT ReadWithEdits; 22 FROM VWindows IMPORT Compass, CurrentWindow; 23 FROM WindowPrims IMPORT DrawBox, GetCursorCoords, PopColors, 24 PopCursorCoords, PopCursorHeight, PushColors, PushCursorCoords, 25 PushCursorHeight, ScreenRestore, ScreenSave; 26 IMPORT SYSTEM; 27 28 VAR 29 CH : CHAR; 30 B : BOOLEAN; 31 x2 : CARDINAL; 32 33 PROCEDURE SetUp; 34 BEGIN 35 PushCursorHeight; ***** ^ not supported yet 36 PushCursorCoords; ***** ^ not supported yet 37 PushColors; ***** ^ not supported yet 38 ScreenSave(StatusScr,5,10,x2,15); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 39 ClearPart(5,10,x2,15); ***** ^ not supported yet ***** ^ not supported yet 40 DrawBox(5,10,x2,15); ***** ^ not supported yet ***** ^ not supported yet 41 END SetUp; ***** ^ not supported yet 42 43 PROCEDURE TakeDown; 44 BEGIN 45 PopCursorHeight; ***** ^ not supported yet 46 PopColors; ***** ^ not supported yet 47 ScreenRestore(StatusScr,5,10); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 48 PopCursorCoords; ***** ^ not supported yet 49 END TakeDown; ***** ^ not supported yet 50 51 52 53 PROCEDURE Prompt(S1: ARRAY OF CHAR); ***** ^ not supported yet 54 VAR Key : CARDINAL; 55 DF : DisplayFrame; 56 BEGIN 57 InitDisplayFrame(DF,CurrentWindow); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 58 DF^.ClearAfter := TRUE; ***** ^ not supported yet ***** ^ not supported yet 59 StrMsgBox(DF,NE,S1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 60 CloseDisplayFrame(DF); ***** ^ not supported yet ***** ^ not supported yet 61 END Prompt; ***** ^ not supported yet 62 63 PROCEDURE PromptStr(S1 : ARRAY OF CHAR; VAR S2 : ARRAY OF CHAR); ***** ^ not supported yet ***** ^ not supported yet 64 VAR 65 Insert : BOOLEAN; 66 CurPos : CARDINAL; 67 LastKey : CARDINAL; 68 LegalKeys, 69 ExitKeys : KeyNumSet; 70 BEGIN 71 x2 := HIGH(S1) + HIGH(S2)+12; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 72 SetUp; ***** ^ not supported yet 73 WriteAt(12,12,S1); ***** ^ not supported yet ***** ^ not supported yet 74 CurPos := 0; 75 Insert := TRUE; 76 LegalKeys := AnyKeyNum; ***** ^ not supported yet ***** ^ not supported yet 77 InitSet(LegalKeys); ***** ^ not supported yet ***** ^ not supported yet 78 InitSet(ExitKeys); ***** ^ not supported yet ***** ^ not supported yet 79 AppendSet(ExitKeys,"{8,9,271,13,27,328,336,329,337}"); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 80 81 (* Means BackSpace, TAB, BackTab, CR, ESC, and the arrow 82 keys let you out of a field. *) 83 ReadWithEdits(CurrentWindow,S2,13+Length(S1),12,HIGH(S2),CurPos, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 84 Insert,FALSE,LastKey, 85 AnyKeyNum,ExitKeys); ***** ^ not supported yet ***** ^ not supported yet 86 TakeDown; ***** ^ not supported yet 87 END PromptStr; ***** ^ not supported yet 88 89 PROCEDURE PromptNum(S1 : ARRAY OF CHAR;DefaultNbr : CARDINAL): CARDINAL; ***** ^ not supported yet 90 VAR 91 ExitKeys, NumKeys : KeyNumSet; 92 TmpStr : ARRAY[1..5] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 93 R,C : CARDINAL; 94 Len : CARDINAL; 95 Num : CARDINAL; 96 Pos : CARDINAL; 97 InsertMode : BOOLEAN; 98 LastKey : CARDINAL; 99 100 BEGIN 101 x2 := HIGH(S1) + 5 + 12; (* 5 is for the digits *) ***** ^ undeclared identifier ***** ^ not supported yet 102 SetUp; ***** ^ not supported yet 103 GetCursorCoords(C,R); ***** ^ not supported yet ***** ^ not supported yet 104 InitSet(ExitKeys); ***** ^ not supported yet ***** ^ not supported yet 105 AppendSet(ExitKeys,"{8,9,271,13,27,328,336,329,337}"); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 106 107 (* Means BackSpace, TAB, BackTab, CR, ESC, and the arrow 108 keys let you out of a field. *) 109 WriteAt(12,12,S1); ***** ^ not supported yet ***** ^ not supported yet 110 InitSet(NumKeys); ***** ^ not supported yet ***** ^ not supported yet 111 AppendSet(NumKeys,'{"0".."9",8,9,271,13,27,328,336,329,337,331,333,339}'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 112 113 Len := 5; 114 Pos := 0; 115 CardinalToStr(DefaultNbr,5,TmpStr); ***** ^ not supported yet ***** ^ not supported yet 116 CrunchBlanks(TmpStr); ***** ^ not supported yet ***** ^ not supported yet 117 ReadWithEdits( CurrentWindow,TmpStr,13+Length(S1),12,Len,Pos,InsertMode,FALSE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 118 LastKey, NumKeys, ExitKeys ); ***** ^ not supported yet ***** ^ not supported yet 119 TakeDown; ***** ^ not supported yet 120 RETURN ReturnedCard(TmpStr) ***** ^ not supported yet ***** ^ not supported yet 121 END PromptNum; ***** ^ not supported yet 122 123 PROCEDURE PromptYN(S1 : ARRAY OF CHAR; DFrame : DisplayFrame) : BOOLEAN; ***** ^ not supported yet 124 (* Return true for yes ; false for no *) 125 VAR 126 DF : DisplayFrame; 127 Key : CARDINAL; 128 B : BOOLEAN; 129 BEGIN 130 InitDisplayFrame(DF,CurrentWindow); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 131 B := MsgOkay(DF,NW,S1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 132 CloseDisplayFrame(DF); ***** ^ not supported yet ***** ^ not supported yet 133 RETURN B; 134 END PromptYN; ***** ^ not supported yet 135 136 PROCEDURE DisplayStatus(S1 : ARRAY OF CHAR); ***** ^ not supported yet 137 BEGIN 138 END DisplayStatus; ***** ^ not supported yet 139 140 PROCEDURE RemoveDisplay(); 141 BEGIN 142 END RemoveDisplay; ***** ^ not supported yet 143 144 BEGIN 145 END Prompts. ***** ^ not supported yet 146 110 errors