Listing: 1 IMPLEMENTATION MODULE ScreenInput; 2 (* 3 * REPERTOIRE 4 * Release 1.6 5 * By Charles Bradford and Cole Brecheen 6 * (c) Copyright 1985-1992 PMI 7 * Green Bay, Wisconsin 8 * All rights reserved 9 * (414) 468-6040 10 * 11 * $Header: D:/logfiles/mods/screenin.mov 1.5 10 Mar 1991 15:31:54 coleb $ 12 * 13 *) 14 15 16 (* Provided only for compatibility with rel 1.4 code *) 17 18 IMPORT ControlUtils; 19 IMPORT DspFiles; 20 IMPORT ErrorManager; 21 IMPORT FramePainter; 22 IMPORT GenLists; 23 IMPORT InputManager; 24 IMPORT M2Strings; 25 IMPORT MsColors; 26 IMPORT PosUtils; 27 IMPORT ScrnTypes; 28 IMPORT ScrnUtl1; 29 IMPORT ScrnUtl2; 30 IMPORT SmartScreen; 31 IMPORT StrConv; 32 IMPORT StrEdit; 33 IMPORT VWindows; 34 IMPORT WindowPrims; 35 36 VAR 37 Initialized : BOOLEAN; 38 39 PROCEDURE Init(); 40 BEGIN 41 IF Initialized THEN 42 RETURN; 43 ELSE 44 Initialized := TRUE; 45 END; 46 ControlUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 47 DspFiles.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 48 ErrorManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 49 FramePainter.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 50 GenLists.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 51 InputManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 52 M2Strings.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 53 MsColors.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 54 PosUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 55 ScrnTypes.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 56 ScrnUtl1.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 57 ScrnUtl2.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 58 SmartScreen.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 59 StrConv.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 60 StrEdit.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 61 VWindows.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 62 WindowPrims.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 63 END Init; ***** ^ not supported yet 64 65 CONST 66 OldFunction = "Non-numeric frame name used with old function"; ***** ^ not supported yet 67 68 69 PROCEDURE WarnNotNumberedFrame( FrameName: ARRAY OF CHAR ); ***** ^ not supported yet 70 VAR 71 dumstr: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 72 BEGIN 73 M2Strings.Assign( FrameName, dumstr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 74 StrEdit.Append( dumstr, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 75 ' passed to routine that expects numbered frames' ); ***** ^ not supported yet 76 ErrorManager.WARN( dumstr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 77 END WarnNotNumberedFrame; ***** ^ not supported yet 78 79 80 PROCEDURE ReadNextInput(VAR TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 81 VAR thestr : ARRAY OF CHAR; VAR selected : BOOLEAN; ***** ^ not supported yet 82 skip : CARDINAL); 83 VAR 84 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 85 BEGIN 86 ControlUtils.ReadNextInput( TheFrame, thestr, skip ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 87 IF ScrnUtl1.FieldType( TheFrame, TheFrame^.CurrentField ) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 88 = ScrnTypes.GroupMember THEN ***** ^ not supported yet ***** ^ not supported yet 89 ScrnUtl1.GetFieldRec( TheFrame, TheFrame^.CurrentField, FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 90 selected := FieldRec.selected; ***** ^ not supported yet ***** ^ not supported yet 91 ELSE 92 selected := FALSE; 93 END; 94 END ReadNextInput; ***** ^ not supported yet 95 96 97 PROCEDURE ReadInput(VAR TheFrame : ScrnTypes.DisplayFrame; VAR ***** ^ not supported yet 98 thestr : ARRAY OF CHAR; VAR selected : BOOLEAN; ***** ^ not supported yet 99 FieldName : ARRAY OF CHAR); ***** ^ not supported yet 100 VAR 101 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 102 BEGIN 103 ControlUtils.ReadInput( TheFrame, thestr, FieldName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 104 IF ScrnUtl1.FieldType( TheFrame, TheFrame^.CurrentField ) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 105 = ScrnTypes.GroupMember THEN ***** ^ not supported yet ***** ^ not supported yet 106 ScrnUtl1.GetFieldRec( TheFrame, TheFrame^.CurrentField, FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 107 selected := FieldRec.selected; ***** ^ not supported yet ***** ^ not supported yet 108 ELSE 109 selected := FALSE; 110 END; 111 END ReadInput; ***** ^ not supported yet 112 113 114 PROCEDURE ChangeField(VAR TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 115 thestr : ARRAY OF CHAR; FieldName : ARRAY OF ***** ^ not supported yet 116 CHAR; PreserveLength: BOOLEAN); ***** ^ not supported yet 117 BEGIN 118 ControlUtils.ChangeField( TheFrame, thestr, FieldName, PreserveLength ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 119 END ChangeField; ***** ^ not supported yet 120 121 PROCEDURE ListToEdField( TheList: GenLists.GenList; TheFrame: ***** ^ not supported yet 122 ScrnTypes.DisplayFrame; TheField: CARDINAL ): BOOLEAN; ***** ^ not supported yet 123 BEGIN 124 RETURN ScrnUtl1.ListToEdField( TheList, TheFrame, TheField ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 125 END ListToEdField; ***** ^ not supported yet 126 127 PROCEDURE ListFromEdField( TheFrame: ScrnTypes.DisplayFrame; TheField: ***** ^ not supported yet 128 CARDINAL; VAR TheList: GenLists.GenList ): BOOLEAN; ***** ^ not supported yet 129 BEGIN 130 RETURN ScrnUtl1.ListFromEdField( TheFrame, TheField, TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 131 END ListFromEdField; ***** ^ not supported yet 132 133 134 PROCEDURE AddToMenu(VAR TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 135 ScrCol, ScrRow : CARDINAL; ScrText : ARRAY OF 136 CHAR; FieldType : CHAR; foreground, background: ***** ^ not supported yet 137 MsColors.AColor; MonoAttribute: MsColors.AMonoAttribute ); ***** ^ not supported yet ***** ^ not supported yet 138 VAR 139 FieldRec : ScrnTypes.InputFieldRecord; ***** ^ not supported yet 140 RecNum : CARDINAL; 141 BEGIN 142 VWindows.SetForeColor( DspFiles.MainFrame^.WindowHandle, foreground ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 143 VWindows.SetBackColor( DspFiles.MainFrame^.WindowHandle, background ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 144 VWindows.SetMonoAttr( DspFiles.MainFrame^.WindowHandle, MonoAttribute ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 145 ControlUtils.AddMenuItem( TheFrame, ScrCol, ScrRow, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 146 ScrText, M2Strings.Length(ScrText), 0, TheFrame^.normlnext ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 147 (* Following lines added 27 Dec 89 at suggestion of Douglas Wrege 148 to preserve compatibility with release 1.4. *) 149 RecNum := ScrnUtl1.FieldListTotal( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 150 ScrnUtl1.GetFieldRec( TheFrame, RecNum, FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 151 FieldRec.typ := FieldType; ***** ^ not supported yet ***** ^ not supported yet 152 ScrnUtl1.PutFieldRec( FieldRec, TheFrame, RecNum ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 153 END AddToMenu; ***** ^ not supported yet 154 155 156 PROCEDURE FrameSequence( StartFrame: ScrnTypes.FrameKey); ***** ^ not supported yet 157 VAR 158 screen : WindowPrims.ScreenType; ***** ^ not supported yet 159 FrameName : ScrnTypes.AFrameName; ***** ^ not supported yet 160 SavedHeight : CARDINAL; 161 BEGIN 162 StrConv.IntegerToStr( StartFrame, 0, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 163 WindowPrims.ScreenSave(screen, 1, 1, SmartScreen.MaxCol, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 164 SmartScreen.MaxRow); ***** ^ not supported yet ***** ^ not supported yet 165 ScrnUtl2.PushFrame( DspFiles.MainFrame); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 166 SavedHeight := VWindows.GetCursorHeight( ***** ^ not supported yet ***** ^ not supported yet 167 DspFiles.MainFrame^.WindowHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 168 VWindows.SetCursorHeight( DspFiles.MainFrame^.WindowHandle, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 169 REPEAT 170 DspFiles.ReadDisplayFrame( DspFiles.MainFrame^.FromFile, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 171 DspFiles.MainFrame, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 172 FramePainter.ShowDisplayFrame( DspFiles.MainFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 173 InputManager.ControlFrame( DspFiles.MainFrame, 1, '', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 174 FALSE, FrameName ); ***** ^ not supported yet 175 UNTIL PosUtils.Equal( FrameName, ScrnTypes.ProgramExit ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 176 ScrnUtl2.PopFrame( DspFiles.MainFrame); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 177 WindowPrims.ScreenRestore(screen, 1, 1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 178 VWindows.SetCursorHeight( DspFiles.MainFrame^.WindowHandle, SavedHeight ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 179 END FrameSequence; ***** ^ not supported yet 180 181 PROCEDURE Input( VAR FrameNum : ScrnTypes.FrameKey); ***** ^ not supported yet 182 VAR 183 FrameName : ScrnTypes.AFrameName; ***** ^ not supported yet 184 BEGIN 185 StrConv.IntegerToStr( FrameNum, 0, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 186 ControlUtils.Input( DspFiles.MainFrame, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 187 IF NOT StrConv.StrToInteger( FrameName, 0, FrameNum ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 188 WarnNotNumberedFrame( FrameName ); ***** ^ not supported yet ***** ^ not supported yet 189 END; 190 END Input; ***** ^ not supported yet 191 192 PROCEDURE Control(): ScrnTypes.FrameKey; ***** ^ not supported yet 193 VAR 194 FrameName: ScrnTypes.AFrameName; ***** ^ not supported yet 195 TmpInt: INTEGER; 196 BEGIN 197 InputManager.ControlFrame( DspFiles.MainFrame, 0, '', FALSE, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 198 IF NOT StrConv.StrToInteger( FrameName, 0, TmpInt ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 199 WarnNotNumberedFrame( FrameName ); ***** ^ not supported yet ***** ^ not supported yet 200 END; 201 RETURN TmpInt; ***** ^ bad RETURN 202 END Control; ***** ^ not supported yet 203 204 PROCEDURE ControlFrame(VAR FrameRec : ScrnTypes.DisplayFrame; ***** ^ not supported yet 205 LandingField : CARDINAL; message : ARRAY OF CHAR; ***** ^ not supported yet 206 showfields : BOOLEAN) : ScrnTypes.FrameKey; ***** ^ not supported yet 207 VAR 208 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 209 tmpint: INTEGER; 210 BEGIN 211 InputManager.ControlFrame( FrameRec, LandingField, message, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 212 showfields, NextFrame ); ***** ^ not supported yet 213 IF NOT StrConv.StrToInteger( NextFrame, 0, tmpint ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 214 ErrorManager.WARN( OldFunction ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 215 END; 216 RETURN tmpint; ***** ^ bad RETURN 217 END ControlFrame; ***** ^ not supported yet 218 219 220 BEGIN 221 Initialized := FALSE; 222 Init(); ***** ^ not supported yet ***** ^ not supported yet 223 END ScreenInput. ***** ^ not supported yet 310 errors