Listing: 1 IMPLEMENTATION MODULE ControlUtils; 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/controlu.mov 1.5 10 Mar 1991 15:25:34 coleb $ 12 * 13 *) 14 15 16 IMPORT DspFiles; 17 IMPORT ErrorManager; 18 IMPORT ErrorNames; 19 IMPORT FrameManager; 20 IMPORT FramePainter; 21 IMPORT GenLists; 22 IMPORT InputManager; 23 IMPORT LowLevel; 24 IMPORT M2Strings; 25 IMPORT MsColors; 26 IMPORT NdxBones; 27 IMPORT Numbers; 28 IMPORT PosUtils; 29 IMPORT Rectangles; 30 IMPORT ScrnTypes; 31 IMPORT ScrnUtl1; 32 IMPORT ScrnUtl2; 33 IMPORT StrConv; 34 IMPORT StrEdit; 35 IMPORT SYSTEM; 36 IMPORT VEditor; 37 IMPORT VWindows; 38 39 40 VAR 41 Initialized : BOOLEAN; 42 43 PROCEDURE Init(); 44 BEGIN 45 IF Initialized THEN 46 RETURN; 47 ELSE 48 Initialized := TRUE; 49 END; 50 DspFiles.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 51 ErrorManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 52 ErrorNames.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 53 FrameManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 54 FramePainter.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 55 GenLists.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 56 InputManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 57 LowLevel.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 58 M2Strings.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 59 MsColors.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 60 NdxBones.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 61 Numbers.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 62 PosUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 63 Rectangles.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 64 ScrnTypes.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 65 ScrnUtl1.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 66 ScrnUtl2.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 67 StrConv.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 68 StrEdit.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 69 VEditor.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 70 VWindows.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 71 END Init; ***** ^ not supported yet 72 73 74 CONST 75 AfterLastElmt = 65535; 76 77 PROCEDURE NotFieldWarning( FieldName, FrameName: ARRAY OF CHAR ); ***** ^ not supported yet 78 VAR 79 dumstr1: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 80 BEGIN 81 StrEdit.AssignStr( ' is not a field in frame ', dumstr1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 82 M2Strings.Insert( FieldName, dumstr1, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 83 StrEdit.Append( dumstr1, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 84 ErrorManager.WARN( dumstr1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 85 END NotFieldWarning; ***** ^ not supported yet 86 87 88 89 PROCEDURE AddEditorField(VAR TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 90 VAR TheList: GenLists.GenList; VAR ControlRec: ***** ^ not supported yet 91 VEditor.AnEdControlRec ); ***** ^ not supported yet 92 VAR 93 ImageNum: CARDINAL; 94 TmpRec: ScrnTypes.ImageElement; ***** ^ not supported yet 95 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 96 dumstr : ARRAY [0..1] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 97 AreaInBox : Rectangles.ARectangle; ***** ^ not supported yet 98 BEGIN 99 ControlRec.FrameRec := TheFrame; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 100 IF NOT GenLists.Initialized( TheFrame^.FieldList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 101 GenLists.NewList( TheFrame^.FieldList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 102 ScrnUtl1.PutFrameLists( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 103 (*Make sure the new FieldList gets inserted into 104 TheFrame's .self list. *) 105 END; 106 IF NOT GenLists.Initialized( TheFrame^.EdFieldList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 107 GenLists.NewList( TheFrame^.EdFieldList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 108 ScrnUtl1.PutFrameLists( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 109 (*Make sure the new EdFieldList gets inserted into 110 TheFrame's .self list. *) 111 END; 112 dumstr[0] := 0C; ***** ^ not supported yet ***** ^ not supported yet 113 dumstr[1] := 0C; ***** ^ not supported yet ***** ^ not supported yet 114 Rectangles.DefineRectangle( AreaInBox, ControlRec.Col1, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 115 ControlRec.Row1, ControlRec.Col2, ControlRec.Row2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 116 IF ControlRec.EntryBox > 0 THEN ***** ^ not supported yet ***** ^ not supported yet 117 Rectangles.ShrinkRect( AreaInBox ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 118 END; 119 ScrnUtl2.CreateImageElement( TmpRec, AreaInBox.col1, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 120 AreaInBox.row1, TheFrame^.normfor, TheFrame^.normbak, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 121 TheFrame^.normatrb, GenLists.ListLength( ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 122 TheFrame^.FieldList ) + 1, dumstr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 123 ScrnUtl2.AddImageElement( TheFrame, TmpRec, ImageNum ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 124 ScrnTypes.InitField( FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 125 FieldRec.ImageNum := ImageNum; ***** ^ not supported yet ***** ^ not supported yet 126 FieldRec.typ := ScrnTypes.EditorCode; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 127 FieldRec.req := FALSE; ***** ^ not supported yet ***** ^ not supported yet 128 FieldRec.EdFieldNum := GenLists.ListLength( TheFrame^.EdFieldList ) + 1; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 129 GenLists.ListInsert( TheList, GenLists.ListCode, TheFrame^.EdFieldList, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 130 FieldRec.EdFieldNum ); ***** ^ not supported yet ***** ^ not supported yet 131 FieldRec.Col2 := AreaInBox.col2; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 132 FieldRec.Row2 := AreaInBox.row2; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 133 FieldRec.TextRow1 := ControlRec.TextRow1; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 134 FieldRec.CursorCol := ControlRec.CursorCol; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 135 FieldRec.CursorRow := ControlRec.CursorRow; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 136 FieldRec.MaxLines := ControlRec.MaxLines; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 137 FieldRec.ReadOnly := ControlRec.ReadOnly; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 138 ScrnUtl1.PutFieldRec( FieldRec, TheFrame, AfterLastElmt ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 139 IF TheFrame^.action = 'W' THEN ***** ^ not supported yet ***** ^ not supported yet 140 TheFrame^.action := 'I'; ***** ^ not supported yet ***** ^ not supported yet 141 END; 142 (* The action char is lower case while the frame is 143 active. *) 144 IF TheFrame^.action = 'w' THEN ***** ^ not supported yet ***** ^ not supported yet 145 TheFrame^.action := 'i'; ***** ^ not supported yet ***** ^ not supported yet 146 END; 147 END AddEditorField; ***** ^ not supported yet 148 149 150 PROCEDURE AddStrField(VAR TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 151 Col, Row : CARDINAL; text : ARRAY OF CHAR; width: CARDINAL ); ***** ^ not supported yet 152 VAR 153 ImageNum: CARDINAL; 154 TmpRec: ScrnTypes.ImageElement; ***** ^ not supported yet 155 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 156 BEGIN 157 IF M2Strings.Length(text) # width THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 158 StrEdit.LeftJustify( text, width ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 159 END; 160 IF NOT GenLists.Initialized( TheFrame^.FieldList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 161 GenLists.NewList( TheFrame^.FieldList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 162 ScrnUtl1.PutFrameLists( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 163 (*Make sure the new FieldList gets inserted into 164 TheFrame's .self list. *) 165 END; 166 ScrnUtl2.CreateImageElement( TmpRec, Col, Row, TheFrame^.normfor, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 167 TheFrame^.normbak, TheFrame^.normatrb, GenLists.ListLength( ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 168 TheFrame^.FieldList ) + 1, text ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 169 ScrnUtl2.AddImageElement( TheFrame, TmpRec, ImageNum ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 170 ScrnTypes.InitField( FieldRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 171 FieldRec.ImageNum := ImageNum; ***** ^ not supported yet ***** ^ not supported yet 172 FieldRec.typ := ScrnTypes.StringCode; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 173 FieldRec.req := FALSE; ***** ^ not supported yet ***** ^ not supported yet 174 ScrnUtl1.PutFieldRec( FieldRec, TheFrame, AfterLastElmt ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 175 IF TheFrame^.action = 'W' THEN ***** ^ not supported yet ***** ^ not supported yet 176 TheFrame^.action := 'I'; ***** ^ not supported yet ***** ^ not supported yet 177 END; 178 (* The action char is lower case while the frame is 179 active. *) 180 IF TheFrame^.action = 'w' THEN ***** ^ not supported yet ***** ^ not supported yet 181 TheFrame^.action := 'i'; ***** ^ not supported yet ***** ^ not supported yet 182 END; 183 END AddStrField; ***** ^ not supported yet 184 185 186 PROCEDURE AddMenuItem( VAR TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 187 Col, Row : CARDINAL; text : ARRAY OF CHAR; width, MenuKey: CARDINAL; ***** ^ not supported yet 188 ReturnVal : ARRAY OF CHAR ); ***** ^ not supported yet 189 VAR 190 FieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 191 BEGIN 192 AddStrField( TheFrame, Col, Row, text, width ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 193 ScrnUtl1.GetFieldRec( TheFrame, ScrnUtl1.FieldListTotal(TheFrame), ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 194 FieldRec ); ***** ^ not supported yet 195 FieldRec.typ := ScrnTypes.GotoCode; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 196 FieldRec.MenuKey := MenuKey; ***** ^ not supported yet ***** ^ not supported yet 197 M2Strings.Assign( ReturnVal, FieldRec.ReturnVal ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 198 ScrnUtl1.PutFieldRec( FieldRec, TheFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 199 ScrnUtl1.FieldListTotal(TheFrame) ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 200 IF TheFrame^.action = 'W' THEN ***** ^ not supported yet ***** ^ not supported yet 201 TheFrame^.action := 'I'; ***** ^ not supported yet ***** ^ not supported yet 202 END; 203 (* The action char is lower case while the frame is 204 active. *) 205 IF TheFrame^.action = 'w' THEN ***** ^ not supported yet ***** ^ not supported yet 206 TheFrame^.action := 'i'; ***** ^ not supported yet ***** ^ not supported yet 207 END; 208 END AddMenuItem; ***** ^ not supported yet 209 210 211 PROCEDURE ListBox( TheDspFile: ScrnTypes.DisplayFile; ***** ^ not supported yet 212 FormFrameName: ARRAY OF CHAR; TheList: GenLists.GenList; ***** ^ not supported yet ***** ^ not supported yet 213 VAR ItemChosen: ARRAY OF CHAR; VAR NextFrame: ***** ^ not supported yet 214 ScrnTypes.AFrameName ): BOOLEAN; ***** ^ not supported yet 215 VAR 216 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 217 AnItemWasChosen: BOOLEAN; 218 BEGIN 219 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 220 DspFiles.ReadFrame( TheDspFile, TmpFrame, FormFrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 221 ScrnUtl2.ChoiceListToFrame( TheList, TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 222 FramePainter.ShowDisplayFrame( TmpFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 223 InputManager.ControlFrame( TmpFrame, 0, '', FALSE, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 224 AnItemWasChosen := (NextFrame[0] = 0C); ***** ^ not supported yet ***** ^ not supported yet 225 (* Dangerous. We are relying here on knowlegde that 226 ChoiceListToFrame makes '' the return value for each 227 choice. *) 228 ScrnUtl1.GetFieldText( TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 229 TmpFrame^.CurrentField, ItemChosen ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 230 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 231 RETURN AnItemWasChosen; 232 END ListBox; ***** ^ not supported yet 233 234 235 PROCEDURE ChangeField(VAR TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 236 TheStr : ARRAY OF CHAR; FieldName : ARRAY OF ***** ^ not supported yet 237 CHAR; PreserveLength: BOOLEAN); ***** ^ not supported yet 238 VAR 239 padding: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 240 OldLngth, NewLngth: CARDINAL; 241 FieldPtr : ScrnTypes.InputFieldPtr; ***** ^ not supported yet 242 ImageRec: ScrnTypes.ImageElement; ***** ^ not supported yet 243 BEGIN 244 IF NOT ScrnUtl1.FindField( TheFrame, FieldName, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 245 FieldPtr, ImageRec ) THEN ***** ^ not supported yet ***** ^ not supported yet 246 NotFieldWarning( FieldName, TheFrame^.ThisFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 247 END; 248 FieldPtr^.ChangeMade := TRUE; ***** ^ not supported yet ***** ^ not supported yet 249 IF PreserveLength THEN 250 LowLevel.Fill( SYSTEM.ADR(padding), HIGH(padding) + 1, ' ' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 251 OldLngth := M2Strings.Length( ImageRec.text ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 252 NewLngth := M2Strings.Length( TheStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 253 M2Strings.Assign(TheStr, ImageRec.text ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 254 IF OldLngth > NewLngth THEN 255 StrEdit.SetLength( padding, OldLngth - NewLngth ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 256 StrEdit.Append( ImageRec.text, padding ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 257 ELSE 258 StrEdit.SetLength( ImageRec.text, OldLngth ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 259 END; 260 ELSE 261 M2Strings.Assign(TheStr, ImageRec.text); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 262 END; 263 ScrnUtl1.PutFieldImageRec( ImageRec, TheFrame, ImageRec.field ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 264 END ChangeField; ***** ^ not supported yet 265 266 267 PROCEDURE CheckFieldName( TheFrame: ScrnTypes.DisplayFrame; FieldName: ***** ^ not supported yet 268 ARRAY OF CHAR ); ***** ^ not supported yet 269 (*Displays a warning message if it can't find FieldName in TheFrame.*) 270 VAR 271 FieldPtr: ScrnTypes.InputFieldPtr; ***** ^ not supported yet 272 ImageRec: ScrnTypes.ImageElement; ***** ^ not supported yet 273 BEGIN 274 IF NOT ScrnUtl1.FindField( TheFrame, FieldName, FieldPtr, ImageRec ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 275 NotFieldWarning( FieldName, TheFrame^.ThisFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 276 END; 277 END CheckFieldName; ***** ^ not supported yet 278 279 280 PROCEDURE Control( TheFrame: ScrnTypes.DisplayFrame ); ***** ^ not supported yet 281 VAR 282 FrameName : ScrnTypes.AFrameName; ***** ^ not supported yet 283 (*This gets thrown away.*) 284 BEGIN 285 InputManager.ControlFrame( TheFrame, 0, '', FALSE, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 286 END Control; ***** ^ not supported yet 287 288 289 PROCEDURE FrameListSpot( FrameName: ARRAY OF CHAR; ***** ^ not supported yet 290 FrameList: GenLists.GenList ): CARDINAL; ***** ^ not supported yet 291 VAR 292 TypeCode, cnt, ListEnd: CARDINAL; 293 TmpFrame: ScrnTypes.DisplayFrameRec; ***** ^ not supported yet 294 BEGIN 295 cnt := 1; 296 ListEnd := GenLists.ListLength( FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 297 WHILE cnt < ListEnd DO 298 GenLists.GetElmt( FrameList, cnt, TmpFrame, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 299 IF PosUtils.Equal( TmpFrame.ThisFrame, FrameName ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 300 RETURN cnt; 301 END; 302 cnt := cnt + 2; 303 END; 304 RETURN 0; 305 END FrameListSpot; ***** ^ not supported yet 306 307 308 PROCEDURE AddToFrameList( TheFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 309 VAR FrameList: GenLists.GenList ); ***** ^ not supported yet 310 VAR 311 TmpList: GenLists.GenList; ***** ^ not supported yet 312 spot: CARDINAL; 313 SavedFlag : BOOLEAN; 314 BEGIN 315 spot := FrameListSpot( TheFrame^.ThisFrame, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 316 IF spot > 0 THEN 317 (*A frame of this name is already in the FrameList. We can't just 318 delete it and add the new copy because they probably share lists; 319 look at how GetFrameFromList gives the gotten frame pointers 320 directly into its own sublists.*) 321 RETURN; 322 END; 323 TheFrame^.CurrentField := 1; ***** ^ not supported yet ***** ^ not supported yet 324 SavedFlag := TheFrame^.SelfSharedWithFile; ***** ^ not supported yet ***** ^ not supported yet 325 (* Added this SavedFlag thing on 2 Nov 88 at suggestion 326 of John McMonagle to prevent memory loss problems. *) 327 TheFrame^.SelfSharedWithFile := TRUE; ***** ^ not supported yet ***** ^ not supported yet 328 (* We're using this to prevent ReadFrame from 329 disposing of the .self list next time. *) 330 GenLists.ListInsert( TheFrame^, 0, FrameList, AfterLastElmt ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 331 TheFrame^.SelfSharedWithFile := SavedFlag; ***** ^ not supported yet ***** ^ not supported yet 332 GenLists.CopyList( TheFrame^.self, TmpList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 333 (*We copy the self list so it won't go away when the 334 ListBuf changes.*) 335 GenLists.ListInsert( TmpList, GenLists.ListCode, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 336 FrameList, AfterLastElmt ); ***** ^ not supported yet ***** ^ not supported yet 337 END AddToFrameList; ***** ^ not supported yet 338 339 340 PROCEDURE DisposeFrameList( VAR FrameList: GenLists.GenList ); ***** ^ not supported yet 341 VAR 342 ListEnd, cnt, dumc, TypeCode: CARDINAL; 343 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 344 BEGIN 345 ListEnd := GenLists.ListLength( FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 346 cnt := 1; 347 WHILE cnt < ListEnd DO 348 GenLists.GetElmtAdr( FrameList, cnt, TmpFrame, dumc, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 349 FrameManager.FrameDeactivated( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 350 cnt := cnt + 2; 351 END; 352 GenLists.DisposeList( FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 353 END DisposeFrameList; ***** ^ not supported yet 354 355 356 PROCEDURE DeleteFrom( VAR TheFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 357 VAR FrameList: GenLists.GenList ); ***** ^ not supported yet 358 VAR 359 TmpList: GenLists.GenList; ***** ^ not supported yet 360 spot: CARDINAL; 361 BEGIN 362 spot := FrameListSpot( TheFrame^.ThisFrame, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 363 IF spot > 0 THEN 364 GenLists.GetChildList( FrameList, spot + 1, TmpList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 365 IF GenLists.SameList( TmpList, TheFrame^.self ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 366 (*We're going to confuse the hell out of the programmer 367 who deletes a frame from a FrameList after retrieving it 368 but before using it. We leave some tracks to make it 369 easier to find the problem.*) 370 StrEdit.AssignStr( 'DeleteFrom', TheFrame^.ThisFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 371 GenLists.NilList( TheFrame^.self ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 372 GenLists.NilList( TheFrame^.ImageList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 373 GenLists.NilList( TheFrame^.FieldList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 374 END; 375 GenLists.ListDelete( FrameList, spot, 2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 376 END; 377 END DeleteFrom; ***** ^ not supported yet 378 379 380 PROCEDURE PointFrameAtList( FrameList: GenLists.GenList; ***** ^ not supported yet 381 FrameName: ARRAY OF CHAR; VAR TheFrame: ***** ^ not supported yet 382 ScrnTypes.DisplayFrame ): BOOLEAN; ***** ^ not supported yet 383 (* The difference between this and GetFrameFromList is that 384 PointFrameAtList forces TheFrame to point at the DisplayFrameRec 385 which is stored in the list; GetFrameFromList copies the 386 DisplayFrameRec out into whatever TheFrame happens to be 387 pointing at. *) 388 VAR 389 dumc, spot, TypeCode: CARDINAL; 390 BEGIN 391 spot := FrameListSpot( FrameName, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 392 IF spot = 0 THEN 393 RETURN FALSE; 394 END; 395 GenLists.GetElmtAdr( FrameList, spot, TheFrame, dumc, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 396 GenLists.GetChildList( FrameList, spot + 1, TheFrame^.self ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 397 ScrnUtl1.GetFrameLists( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 398 TheFrame^.CurrentField := GenLists.ElmtNow(TheFrame^.FieldList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 399 (*ElmtNow returns 0 if the list is NIL.*) 400 RETURN TRUE; 401 END PointFrameAtList; ***** ^ not supported yet 402 403 404 PROCEDURE GetFrameFromList( FrameList: GenLists.GenList; ***** ^ not supported yet 405 FrameName: ARRAY OF CHAR; VAR TheFrame: ***** ^ not supported yet 406 ScrnTypes.DisplayFrame ): BOOLEAN; ***** ^ not supported yet 407 VAR 408 spot, TypeCode: CARDINAL; 409 BEGIN 410 spot := FrameListSpot( FrameName, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 411 IF spot = 0 THEN 412 RETURN FALSE; 413 END; 414 IF GenLists.SameList( TheFrame^.self, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 415 TheFrame^.FromFile^.ListBuf ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 416 (*Make sure the NdxFile system doesn't think it is still 417 managing this frame.*) 418 GenLists.DisposeList( TheFrame^.FromFile^.ListBuf ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 419 TheFrame^.FromFile^.BufRecName[0] := 0C; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 420 END; 421 (*Note that we don't dispose of TheFrame's self list if 422 it's not part of the list buffer because it may be part 423 of the FrameList. Means someone else has to be in charge 424 of disposing of the self list if it was created by CopyList.*) 425 GenLists.GetElmt( FrameList, spot, TheFrame^, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 426 GenLists.GetChildList( FrameList, spot + 1, TheFrame^.self ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 427 ScrnUtl1.GetFrameLists( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 428 TheFrame^.CurrentField := GenLists.ElmtNow(TheFrame^.FieldList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 429 (*ElmtNow returns 0 if the list is NIL.*) 430 RETURN TRUE; 431 END GetFrameFromList; ***** ^ not supported yet 432 433 434 PROCEDURE LoadFrameList( dfile: ScrnTypes.DisplayFile; ***** ^ not supported yet 435 StartFrame: ARRAY OF CHAR; VAR FrameList: GenLists.GenList ); ***** ^ not supported yet ***** ^ not supported yet 436 VAR 437 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 438 FrameAbove, FrameBelow, FrameRight, FrameLeft: ScrnTypes.AFrameName; ***** ^ not supported yet 439 BEGIN 440 IF NOT FrameExists( dfile, StartFrame ) THEN ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 441 RETURN; 442 END; 443 IF FrameListSpot( StartFrame, FrameList ) > 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 444 (*StartFrame is already in FrameList *) 445 RETURN; 446 END; 447 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 448 DspFiles.ReadFrameFast( dfile, TmpFrame, StartFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 449 (* It's okay here to use ReadFrameFast, which does not 450 copy the file's listbuf, because AddToFrameList is 451 about to make a copy anyway. *) 452 AddToFrameList( TmpFrame, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 453 ScrnUtl1.GetFrameLinks( TmpFrame, FrameAbove, FrameBelow, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 454 FrameLeft, FrameRight ); ***** ^ not supported yet ***** ^ not supported yet 455 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 456 IF FrameAbove[0] # 0C THEN ***** ^ not supported yet ***** ^ not supported yet 457 LoadFrameList( dfile, FrameAbove, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 458 END; 459 IF FrameBelow[0] # 0C THEN ***** ^ not supported yet ***** ^ not supported yet 460 LoadFrameList( dfile, FrameBelow, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 461 END; 462 IF FrameLeft[0] # 0C THEN ***** ^ not supported yet ***** ^ not supported yet 463 LoadFrameList( dfile, FrameLeft, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 464 END; 465 IF FrameRight[0] # 0C THEN ***** ^ not supported yet ***** ^ not supported yet 466 LoadFrameList( dfile, FrameRight, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 467 END; 468 END LoadFrameList; ***** ^ not supported yet 469 470 471 PROCEDURE ControlSeparately( FrameList: GenLists.GenList; ***** ^ not supported yet 472 VAR NextFrame: ScrnTypes.AFrameName; VAR SelectedChar: ***** ^ not supported yet 473 CHAR; VAR EndingFrame: ScrnTypes.AFrameName ); ***** ^ not supported yet 474 VAR 475 FrameAbove, FrameBelow, FrameRight, FrameLeft: ScrnTypes.AFrameName; ***** ^ not supported yet 476 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 477 BEGIN 478 (* Notice that we don't initialize TmpFrame because we are 479 forcing it to point into the FrameList. *) 480 LOOP 481 IF NOT PointFrameAtList( FrameList, NextFrame, TmpFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 482 EXIT; 483 END; 484 M2Strings.Assign( NextFrame, EndingFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 485 ScrnUtl1.GetFrameLinks( TmpFrame, FrameAbove, FrameBelow, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 486 FrameLeft, FrameRight ); ***** ^ not supported yet ***** ^ not supported yet 487 FramePainter.ShowDisplayFrame( TmpFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 488 InputManager.ControlFrame( TmpFrame, TmpFrame^.CurrentField, '', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 489 FALSE, NextFrame ); ***** ^ not supported yet 490 SelectedChar := ScrnUtl1.SelectedChar( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 491 END; 492 END ControlSeparately; ***** ^ not supported yet 493 494 495 PROCEDURE ControlFrameList( FrameList: GenLists.GenList; ***** ^ not supported yet 496 TheFrame: ScrnTypes.DisplayFrame; VAR NextFrame: ***** ^ not supported yet 497 ScrnTypes.AFrameName; VAR SelectedChar: CHAR; VAR ***** ^ not supported yet 498 EndingFrame: ScrnTypes.AFrameName ); ***** ^ not supported yet 499 VAR 500 FrameAbove, FrameBelow, FrameRight, FrameLeft: ScrnTypes.AFrameName; ***** ^ not supported yet 501 BEGIN 502 LOOP 503 IF NOT GetFrameFromList( FrameList, NextFrame, TheFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 504 EXIT; 505 END; 506 M2Strings.Assign( NextFrame, EndingFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 507 ScrnUtl1.GetFrameLinks( TheFrame, FrameAbove, FrameBelow, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 508 FrameLeft, FrameRight ); ***** ^ not supported yet ***** ^ not supported yet 509 FramePainter.ShowDisplayFrame( TheFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 510 InputManager.ControlFrame( TheFrame, TheFrame^.CurrentField, '', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 511 FALSE, NextFrame ); ***** ^ not supported yet 512 SelectedChar := ScrnUtl1.SelectedChar( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 513 END; 514 END ControlFrameList; ***** ^ not supported yet 515 516 517 PROCEDURE ControlFrameGroup( TheFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 518 VAR NextFrame: ScrnTypes.AFrameName; VAR SelectedChar: CHAR; ***** ^ not supported yet 519 VAR EndingFrame: ScrnTypes.AFrameName ); ***** ^ not supported yet 520 521 VAR 522 FrameList : GenLists.GenList; ***** ^ not supported yet 523 524 BEGIN 525 GenLists.NewList( FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 526 LoadFrameList( TheFrame^.FromFile, NextFrame, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 527 ControlFrameList( FrameList, TheFrame, NextFrame, SelectedChar, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 528 EndingFrame ); ***** ^ not supported yet 529 DisposeFrameList( FrameList ); ***** ^ not supported yet ***** ^ not supported yet 530 END ControlFrameGroup; ***** ^ not supported yet 531 532 533 PROCEDURE FrameExists( TheScreenFile: ScrnTypes.DisplayFile; ***** ^ not supported yet 534 FrameName: ARRAY OF CHAR ): BOOLEAN; ***** ^ not supported yet 535 VAR 536 duml: LONGINT; 537 dumc: CARDINAL; 538 BEGIN 539 StrEdit.CrunchBlanks( FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 540 RETURN NdxBones.FindRecord( TheScreenFile, FrameName, duml, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 541 dumc, dumc ); ***** ^ not supported yet 542 END FrameExists; ***** ^ not supported yet 543 544 545 PROCEDURE FrameSequence( TheFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 546 VAR StartFrame: ScrnTypes.AFrameName ); ***** ^ not supported yet 547 BEGIN 548 ScrnUtl2.PushFrame( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 549 FrameSeqReturn( TheFrame, StartFrame); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 550 ScrnUtl2.PopFrame( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 551 InputManager.ReconstructFrame( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 552 END FrameSequence; ***** ^ not supported yet 553 554 555 PROCEDURE FrameSeqReturn( TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 556 VAR StartFrame : ScrnTypes.AFrameName ); ***** ^ not supported yet 557 VAR 558 CheckFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 559 SavedHeight: CARDINAL; 560 BEGIN 561 IF NOT FrameExists( TheFrame^.FromFile, StartFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 562 RETURN; 563 END; 564 SavedHeight := VWindows.GetCursorHeight( TheFrame^.WindowHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 565 VWindows.SetCursorHeight( TheFrame^.WindowHandle, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 566 CheckFrame := TheFrame^.ThisFrame; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 567 LOOP 568 DspFiles.ReadFrame( TheFrame^.FromFile, TheFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 569 StartFrame ); ***** ^ not supported yet 570 FramePainter.ShowDisplayFrame( TheFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 571 InputManager.ControlFrame( TheFrame, 0, '', FALSE, StartFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 572 IF PosUtils.Equal( StartFrame, ScrnTypes.ProgramExit ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 573 EXIT; 574 END; 575 IF PosUtils.Equal( StartFrame, CheckFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 576 ErrorNames.WarningName('CircSeq'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 577 EXIT; 578 END; 579 IF NOT FrameExists( TheFrame^.FromFile, StartFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 580 EXIT; 581 END; 582 END; 583 VWindows.SetCursorHeight( TheFrame^.WindowHandle, SavedHeight ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 584 END FrameSeqReturn; ***** ^ not supported yet 585 586 587 PROCEDURE FrameSeq2( TheFile : ScrnTypes.DisplayFile; ***** ^ not supported yet 588 CheckFrame: ARRAY OF CHAR; VAR StartFrame : ARRAY OF CHAR ); ***** ^ not supported yet ***** ^ not supported yet 589 VAR 590 NextFrame, DummyName: ScrnTypes.AFrameName; ***** ^ not supported yet 591 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 592 FrameAbove, FrameBelow, FrameRight, FrameLeft: ScrnTypes.AFrameName; ***** ^ not supported yet 593 FrameList : GenLists.GenList; ***** ^ not supported yet 594 dumc: CHAR; 595 BEGIN 596 IF NOT FrameExists( TheFile, StartFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 597 RETURN; 598 END; 599 M2Strings.Assign( StartFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 600 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 601 LOOP 602 DspFiles.ReadFrame( TheFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 603 ScrnUtl1.GetFrameLinks( TmpFrame, FrameAbove, FrameBelow, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 604 FrameLeft, FrameRight ); ***** ^ not supported yet ***** ^ not supported yet 605 IF (FrameAbove[0] # 0C) OR (FrameBelow[0] # 0C) OR ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 606 (FrameLeft[0] # 0C) OR (FrameRight[0] # 0C) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 607 GenLists.NewList( FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 608 LoadFrameList( TheFile, NextFrame, FrameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 609 ControlSeparately( FrameList, NextFrame, dumc, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 610 DummyName ); ***** ^ not supported yet 611 DisposeFrameList( FrameList ); ***** ^ not supported yet ***** ^ not supported yet 612 ELSE 613 FramePainter.ShowDisplayFrame( TmpFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 614 InputManager.ControlFrame( TmpFrame, 0, '', FALSE, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 615 END; 616 IF PosUtils.Equal( NextFrame, ScrnTypes.ProgramExit ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 617 EXIT; 618 END; 619 IF PosUtils.Equal( NextFrame, CheckFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 620 ErrorNames.WarningName('CircSeq'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 621 EXIT; 622 END; 623 IF NOT FrameExists( TheFile, NextFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 624 EXIT; 625 END; 626 END; 627 M2Strings.Assign( NextFrame, StartFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 628 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 629 END FrameSeq2; ***** ^ not supported yet 630 631 632 PROCEDURE FindNextField( TheFrame: ScrnTypes.DisplayFrame; typ: ***** ^ not supported yet 633 CHAR; VAR spot: CARDINAL; VAR FieldPtr: 634 ScrnTypes.InputFieldPtr ): BOOLEAN; ***** ^ not supported yet 635 VAR 636 found: BOOLEAN; 637 ListEnd: CARDINAL; 638 BEGIN 639 ListEnd := ScrnUtl1.FieldListTotal( TheFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 640 FieldPtr := NIL; ***** ^ not supported yet 641 found := FALSE; 642 WHILE (spot <= ListEnd) AND (NOT found) DO 643 ScrnUtl1.GetFieldPtr( TheFrame, spot, FieldPtr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 644 IF (typ = 0C) OR (FieldPtr^.typ = typ) THEN ***** ^ not supported yet ***** ^ not supported yet 645 found := TRUE; 646 ELSE 647 INC( spot ); ***** ^ undeclared identifier ***** ^ not supported yet 648 END; 649 END; 650 RETURN found; 651 END FindNextField; ***** ^ not supported yet 652 653 654 PROCEDURE GetStrResponse( TheFile: 655 ScrnTypes.DisplayFile; FrameName, Default: ARRAY ***** ^ not supported yet 656 OF CHAR; VAR TheStr: ARRAY OF CHAR ): BOOLEAN; ***** ^ not supported yet ***** ^ not supported yet 657 VAR 658 MsgFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 659 fnum : CARDINAL; 660 FieldPtr: ScrnTypes.InputFieldPtr; ***** ^ not supported yet 661 result: BOOLEAN; 662 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 663 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 664 BEGIN 665 ScrnTypes.InitDisplayFrame( MsgFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 666 DspFiles.ReadFrame( TheFile, MsgFrame, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 667 fnum := 1; 668 IF NOT FindNextField( MsgFrame, ScrnTypes.StringCode, fnum, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 669 FieldPtr ) THEN ***** ^ not supported yet 670 result := FALSE; 671 ELSE 672 ChangeField( MsgFrame, Default, FieldPtr^.fnam, TRUE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 673 FramePainter.ShowDisplayFrame( MsgFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 674 InputManager.ControlFrame( MsgFrame, 1, '', FALSE, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 675 IF PosUtils.Equal( MsgFrame^.parent, NextFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 676 result := FALSE; 677 ELSE 678 result := TRUE; 679 END; 680 ReadInput( MsgFrame, TheStr, FieldPtr^.fnam ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 681 END; 682 StrEdit.CrunchBlanks( TheStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 683 ScrnUtl2.CloseDisplayFrame( MsgFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 684 RETURN result; 685 END GetStrResponse; ***** ^ not supported yet 686 687 688 PROCEDURE ReadShowAndCntrl( TheFile: ScrnTypes.DisplayFile; ***** ^ not supported yet 689 TheFrame: ScrnTypes.DisplayFrame; VAR FrameName : ***** ^ not supported yet 690 ScrnTypes.AFrameName ); ***** ^ not supported yet 691 BEGIN 692 DspFiles.ReadFrame( TheFile, TheFrame, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 693 FramePainter.ShowDisplayFrame( TheFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 694 InputManager.ControlFrame( TheFrame, 1, '', FALSE, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 695 END ReadShowAndCntrl; ***** ^ not supported yet 696 697 698 PROCEDURE RdShwAndCntrlConst( TheFile: ScrnTypes.DisplayFile; ***** ^ not supported yet 699 TheFrame: ScrnTypes.DisplayFrame; FrameName : ARRAY OF CHAR ); ***** ^ not supported yet ***** ^ not supported yet 700 VAR 701 TmpName: ScrnTypes.AFrameName; ***** ^ not supported yet 702 BEGIN 703 M2Strings.Assign( FrameName, TmpName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 704 ReadShowAndCntrl( TheFile, TheFrame, TmpName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 705 END RdShwAndCntrlConst; ***** ^ not supported yet 706 707 708 PROCEDURE Input( TheFrame: ScrnTypes.DisplayFrame; VAR ***** ^ not supported yet 709 FrameName : ScrnTypes.AFrameName ); ***** ^ not supported yet 710 BEGIN 711 DspFiles.ReadFrame( TheFrame^.FromFile, TheFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 712 FrameName ); ***** ^ not supported yet 713 FramePainter.ShowDisplayFrame( TheFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 714 InputManager.ControlFrame( TheFrame, 1, '', FALSE, FrameName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 715 END Input; ***** ^ not supported yet 716 717 718 PROCEDURE InputConst( TheFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 719 FrameName : ARRAY OF CHAR ); ***** ^ not supported yet 720 VAR 721 TmpName: ScrnTypes.AFrameName; ***** ^ not supported yet 722 BEGIN 723 M2Strings.Assign( FrameName, TmpName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 724 DspFiles.ReadFrame( TheFrame^.FromFile, TheFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 725 TmpName ); ***** ^ not supported yet 726 FramePainter.ShowDisplayFrame( TheFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 727 InputManager.ControlFrame( TheFrame, 0, '', FALSE, TmpName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 728 END InputConst; ***** ^ not supported yet 729 730 731 PROCEDURE ReadInput(VAR TheFrame : ScrnTypes.DisplayFrame; VAR TheStr : ***** ^ not supported yet 732 ARRAY OF CHAR; FieldName : ARRAY OF CHAR); ***** ^ not supported yet ***** ^ not supported yet 733 VAR 734 FieldPtr : ScrnTypes.InputFieldPtr; ***** ^ not supported yet 735 ImageRec: ScrnTypes.ImageElement; ***** ^ not supported yet 736 BEGIN 737 IF NOT ScrnUtl1.FindField( TheFrame, FieldName, FieldPtr, ImageRec ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 738 NotFieldWarning( FieldName, TheFrame^.ThisFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 739 END; 740 M2Strings.Assign(ImageRec.text, TheStr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 741 END ReadInput; ***** ^ not supported yet 742 743 744 PROCEDURE ReadNextField(VAR TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 745 VAR TheStr : ARRAY OF CHAR; skip : CARDINAL); ***** ^ not supported yet 746 (* will skip first field if it is input field *) 747 VAR 748 i : CARDINAL; 749 ImagePtr: ScrnTypes.ImageElmtPtr; ***** ^ not supported yet 750 BEGIN 751 IF (skip + TheFrame^.CurrentField) > ***** ^ not supported yet ***** ^ not supported yet 752 GenLists.ListLength(TheFrame^.FieldList) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 753 ErrorNames.WarningName('EndFld'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 754 END; 755 FOR i := 0 TO skip DO 756 INC( TheFrame^.CurrentField ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 757 END; 758 END ReadNextField; ***** ^ not supported yet 759 760 761 PROCEDURE ReadNextInput(VAR TheFrame : ScrnTypes.DisplayFrame; ***** ^ not supported yet 762 VAR TheStr : ARRAY OF CHAR; skip : CARDINAL); ***** ^ not supported yet 763 (* will skip first field if it is input field *) 764 VAR 765 MaxField, i : CARDINAL; 766 ImagePtr: ScrnTypes.ImageElmtPtr; ***** ^ not supported yet 767 BEGIN 768 (* 769 This version of ReadNextInput added at suggestion of Douglas Wrege 770 on 27 Dec 89 to make ReadNextInput skip Display fields, as it did 771 in release 1.4. ReadNextField, above, reads every field, display 772 or not. 773 *) 774 MaxField := GenLists.ListLength( TheFrame^.FieldList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 775 FOR i := 0 TO skip DO 776 IF TheFrame^.CurrentField < MaxField THEN ***** ^ not supported yet ***** ^ not supported yet 777 INC( TheFrame^.CurrentField ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 778 ELSE 779 ErrorNames.WarningName( 'EndFld' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 780 END; 781 WHILE (TheFrame^.CurrentField < MaxField) AND ***** ^ not supported yet ***** ^ not supported yet 782 (ScrnUtl1.FieldType(TheFrame,TheFrame^.CurrentField) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 783 = ScrnTypes.DispCode) DO ***** ^ not supported yet ***** ^ not supported yet 784 INC( TheFrame^.CurrentField ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 785 END; 786 END; 787 788 ScrnUtl1.GetFieldImagePtr( TheFrame, TheFrame^.CurrentField, ImagePtr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 789 M2Strings.Assign( ImagePtr^.text, TheStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 790 END ReadNextInput; ***** ^ not supported yet 791 792 BEGIN 793 Initialized := FALSE; 794 Init(); ***** ^ not supported yet ***** ^ not supported yet 795 END ControlUtils. ***** ^ not supported yet 1163 errors