| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838 |
- Listing:
- 1 IMPLEMENTATION MODULE ScrnUtl2;
- 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/scrnutl2.mov 1.5 10 Mar 1991 15:32:40 coleb $
- 12 *
- 13 *)
- 14
- 15
- 16
- 17 (*
- 18 This module contains utilities that neither ScreenDisplay nor
- 19 InputManager use, but that you may find useful.
- 20 *)
- 21
- 22 FROM ScrnTypes IMPORT DisplayFrameRec;
- 23 (*We have to import this separately because of a bug in Stony
- 24 Brook M2; TSIZE doesn't take qualified identifiers.*)
- 25
- 26 IMPORT ControlUtils;
- 27 IMPORT DspFiles;
- 28 IMPORT ErrorNames;
- 29 IMPORT FrameManager;
- 30 IMPORT FramePainter;
- 31 IMPORT GenLists;
- 32 IMPORT M2Strings;
- 33 IMPORT MsColors;
- 34 IMPORT Numbers;
- 35 IMPORT PosUtils;
- 36 IMPORT ScrnTypes;
- ***** ^ duplicate identifier
- 37 IMPORT ScrnUtl1;
- 38 IMPORT SYSTEM;
- 39 IMPORT VStorage;
- 40 IMPORT VWindows;
- 41
- 42 VAR
- 43 Initialized : BOOLEAN;
- 44
- 45 PROCEDURE Init();
- 46 BEGIN
- 47 IF Initialized THEN
- 48 RETURN;
- 49 ELSE
- 50 Initialized := TRUE;
- 51 END;
- 52 ControlUtils.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 53 DspFiles.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 54 ErrorNames.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 55 FrameManager.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 56 FramePainter.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 57 GenLists.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 Numbers.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 61 PosUtils.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 62 ScrnTypes.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 63 ScrnUtl1.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 64 VStorage.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 65 VWindows.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 66 END Init;
- ***** ^ not supported yet
- 67
- 68 CONST
- 69 AfterLastElmt = 65535;
- 70
- 71 PROCEDURE CloseDisplayFrame(VAR FrameRec : ScrnTypes.DisplayFrame);
- ***** ^ not supported yet
- 72 (* disposes of all records and pointers in use by FrameRec. *)
- 73 BEGIN (* procedure CloseDisplayFrame *)
- 74 ClearFrameStack(FrameRec);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 75 IF (FrameRec^.FromFile # NIL) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 76 (*Remember that there may not be a DspFile associated with
- 77 the frame.*)
- 78 IF NOT FrameRec^.SelfSharedWithFile THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 79 GenLists.DisposeList( FrameRec^.self );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 80 (*We only dispose of the self list, because all the other
- 81 lists are actually sublists of it. *)
- 82 END;
- 83 ELSE
- 84 GenLists.DisposeList( FrameRec^.self );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 85 END;
- 86 FrameManager.FrameDeactivated( FrameRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 87 VStorage.DosDealloc( FrameRec, SYSTEM.TSIZE(DisplayFrameRec));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 88 (*Note that we don't dispose of FromFile because some other
- 89 frame may be pointing to it.*)
- 90 END CloseDisplayFrame;
- ***** ^ not supported yet
- 91
- 92
- 93 PROCEDURE CopyEdField( frame1: ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 94 FieldName1: ARRAY OF CHAR; frame2: ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 95 FieldName2: ARRAY OF CHAR );
- ***** ^ not supported yet
- 96 VAR
- 97 list1, list2: GenLists.GenList;
- ***** ^ not supported yet
- 98 BEGIN
- 99 IF 0 # ScrnUtl1.FieldNum( frame1, FieldName1 ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 100 IF ScrnUtl1.ListFromEdField( frame1,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 101 frame1^.CurrentField, list1 ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 102 IF 0 # ScrnUtl1.FieldNum( frame2, FieldName2 ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 103 GenLists.CopyList( list1, list2 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 104 IF ScrnUtl1.ListToEdField( list2, frame2,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 105 frame2^.CurrentField ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 106 RETURN;
- 107 END;
- 108 END;
- 109 END;
- 110 END;
- 111 HALT();
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 112 END CopyEdField;
- ***** ^ not supported yet
- 113
- 114
- 115 PROCEDURE CreateImageElement( VAR TheElmt: ScrnTypes.ImageElement; col,
- ***** ^ not supported yet
- 116 row: CARDINAL; ForeColor, BackColor: MsColors.AColor; Attrib:
- ***** ^ not supported yet
- 117 MsColors.AMonoAttribute; FieldNum: CARDINAL; VAR TheText: ARRAY OF
- ***** ^ not supported yet
- 118 CHAR);
- ***** ^ not supported yet
- 119 BEGIN
- 120 TheElmt.row := row;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 121 TheElmt.col := col;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 122 TheElmt.foreg := ForeColor;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 123 TheElmt.backg := BackColor;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 124 TheElmt.atrb := Attrib;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 125 TheElmt.field := FieldNum;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 126 M2Strings.Assign( TheText, TheElmt.text );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 127 END CreateImageElement;
- ***** ^ not supported yet
- 128
- 129
- 130 PROCEDURE AddImageElement( VAR FrameRec: ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 131 VAR TheElmt: ScrnTypes.ImageElement; VAR NewImageNum: CARDINAL );
- ***** ^ not supported yet
- 132 VAR
- 133 width, LastImage, cnt, LastField: CARDINAL;
- 134 FieldPtr: ScrnTypes.InputFieldPtr;
- ***** ^ not supported yet
- 135 BEGIN
- 136 NewImageNum := 1;
- 137 width := M2Strings.Length( TheElmt.text );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 138 IF NOT GenLists.Initialized( FrameRec^.ImageList ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 139 GenLists.NewList( FrameRec^.ImageList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 140 ScrnUtl1.PutFrameLists( FrameRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 141 (* Make sure the new ImageList gets inserted into
- 142 FrameRec's .self list. *)
- 143 END;
- 144 LastImage := GenLists.ListLength( FrameRec^.ImageList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 145 (* find an image element lower than row *)
- 146 WHILE (NewImageNum <= LastImage) AND
- 147 (ScrnUtl1.VirtualImageRow(FrameRec, NewImageNum) <= TheElmt.row) DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 148 INC( NewImageNum );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 149 END;
- 150 IF (TheElmt.col + width - 1) > FrameRec^.VirtualWidth THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 151 FrameRec^.VirtualWidth := TheElmt.col + width - 1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 152 END;
- 153 IF TheElmt.row > FrameRec^.VirtualHeight THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 154 FrameRec^.VirtualHeight := TheElmt.row;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 155 END;
- 156 ScrnUtl1.EncodeImageRec( TheElmt );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 157 IF NewImageNum > LastImage THEN
- 158 (* No lower image element found, so we put it at the end of the
- 159 list. *)
- 160 GenLists.ListInsert( TheElmt, GenLists.StrCode,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 161 FrameRec^.ImageList, AfterLastElmt );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 162 ELSE
- 163 GenLists.ListInsert( TheElmt, GenLists.StrCode,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 164 FrameRec^.ImageList, NewImageNum );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 165 (* Now we have to fix up the field list; every field
- 166 with an ImageNum >= NewImageNum needs its ImageNum
- 167 field incremented. *)
- 168 LastField := ScrnUtl1.FieldListTotal( FrameRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 169 FOR cnt := 1 TO LastField DO
- 170 ScrnUtl1.GetFieldPtr( FrameRec, cnt, FieldPtr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 171 IF FieldPtr^.ImageNum >= NewImageNum THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 172 (* Because we're incrementing when ImageNum =
- 173 NewImageNum, you have to add to the ImageList
- 174 before adding to the FieldList when you're adding
- 175 a new field to a frame. *)
- 176 INC( FieldPtr^.ImageNum );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 177 END;
- 178 END;
- 179 END;
- 180 END AddImageElement;
- ***** ^ not supported yet
- 181
- 182
- 183 PROCEDURE WriteToFrame( VAR FrameRec: ScrnTypes.DisplayFrame; col,
- ***** ^ not supported yet
- 184 row: CARDINAL; text: ARRAY OF CHAR );
- ***** ^ not supported yet
- 185 VAR
- 186 ImageNum: CARDINAL;
- 187 TmpRec: ScrnTypes.ImageElement;
- ***** ^ not supported yet
- 188 BEGIN
- 189 CreateImageElement( TmpRec, col, row, FrameRec^.normfor,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 190 FrameRec^.normbak, FrameRec^.normatrb, 0, text );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 191 AddImageElement( FrameRec, TmpRec, ImageNum );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 192 END WriteToFrame;
- ***** ^ not supported yet
- 193
- 194
- 195 PROCEDURE ChoiceListToFrame( TheList: GenLists.GenList; TheFrame:
- ***** ^ not supported yet
- 196 ScrnTypes.DisplayFrame );
- ***** ^ not supported yet
- 197 VAR
- 198 cnt, lngth, TypeCode, col, row: CARDINAL;
- 199 TmpStr: ARRAY [0..79] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 200 BEGIN
- 201 lngth := GenLists.ListLength( TheList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 202 cnt := 1;
- 203 col := 2;
- 204 row := TheFrame^.headline + 1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 205 IF row = 1 THEN
- 206 INC( row);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 207 END;
- 208 WHILE cnt <= lngth DO
- 209 GenLists.GetElmt( TheList, cnt, TmpStr, TypeCode );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 210 IF TypeCode = GenLists.StrCode THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 211 ControlUtils.AddMenuItem( TheFrame, col, row, TmpStr,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 212 M2Strings.Length(TmpStr), 0, '' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 213 END;
- 214 INC( row );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 215 INC( cnt );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 216 END;
- 217 END ChoiceListToFrame;
- ***** ^ not supported yet
- 218
- 219
- 220 PROCEDURE ListToFrame( TheList: GenLists.GenList; TheFrame:
- ***** ^ not supported yet
- 221 ScrnTypes.DisplayFrame );
- ***** ^ not supported yet
- 222 VAR
- 223 cnt, lngth, TypeCode, col, row: CARDINAL;
- 224 TmpStr: ARRAY [0..79] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 225 BEGIN
- 226 lngth := GenLists.ListLength( TheList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 227 cnt := 1;
- 228 col := 2;
- 229 row := TheFrame^.headline + 1;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 230 IF row = 1 THEN
- 231 INC( row);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 232 END;
- 233 WHILE cnt <= lngth DO
- 234 GenLists.GetElmt( TheList, cnt, TmpStr, TypeCode );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 235 IF TypeCode = GenLists.StrCode THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 236 WriteToFrame( TheFrame, col, row, TmpStr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 237 END;
- 238 INC( row );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 239 INC( cnt );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 240 END;
- 241 END ListToFrame;
- ***** ^ not supported yet
- 242
- 243
- 244 PROCEDURE Display( TheFrame: ScrnTypes.DisplayFrame; FrameName
- ***** ^ not supported yet
- 245 : ARRAY OF CHAR );
- ***** ^ not supported yet
- 246 BEGIN
- 247 IF TheFrame^.FromFile = NIL THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 248 ErrorNames.WarningName( 'OpnDsp' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 249 RETURN;
- 250 END;
- 251 DspFiles.ReadFrame( TheFrame^.FromFile,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 252 TheFrame, FrameName );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 253 FramePainter.ShowDisplayFrame( TheFrame, 0, 0, 0, 0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 254 END Display;
- ***** ^ not supported yet
- 255
- 256
- 257 PROCEDURE ReadAndShow( TheFile: ScrnTypes.DisplayFile;
- ***** ^ not supported yet
- 258 TheFrame: ScrnTypes.DisplayFrame; FrameName : ARRAY OF CHAR
- ***** ^ not supported yet
- ***** ^ not supported yet
- 259 );
- 260 BEGIN
- 261 DspFiles.ReadFrame( TheFile, TheFrame, FrameName );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 262 FramePainter.ShowDisplayFrame( TheFrame, 0, 0, 0, 0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 263 END ReadAndShow;
- ***** ^ not supported yet
- 264
- 265
- 266 PROCEDURE PushFrame( VAR FrameRec : ScrnTypes.DisplayFrame);
- ***** ^ not supported yet
- 267 (* Push the current frame, with its fields list, onto the
- 268 frame stack for this file. The current frame will be left
- 269 undefined, with no fields list linked to it; it must be
- 270 filled in with a call to Display. *)
- 271 VAR
- 272 nodeptr : ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 273 BEGIN
- 274 VStorage.DosAlloc(nodeptr, SYSTEM.TSIZE(DisplayFrameRec) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 275 nodeptr^ := FrameRec^;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 276 (* save the frame *)
- 277 FrameRec^.PushedFrame := nodeptr;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 278 (* link it to the new current frame. *)
- 279 GenLists.CopyList( FrameRec^.self, nodeptr^.self );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 280 (*Note that FrameRec^.self probably equals
- 281 FrameRec^.FromFile^.ListBuf at this point, so we
- 282 have to be careful.*)
- 283 ScrnUtl1.GetFrameLists( nodeptr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 284 (*The pushed frame's lists are now completely disconnected
- 285 from FrameRec's lists.*)
- 286 nodeptr^.SelfSharedWithFile := FALSE;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 287 END PushFrame;
- ***** ^ not supported yet
- 288
- 289 PROCEDURE CheckPushedFrame(VAR FrameRec :
- 290 ScrnTypes.DisplayFrame) : ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 291 (* used internally by PopFrame and PopZapFrame *)
- 292 (* Returns pointer to valid pushed frame. *)
- 293 VAR
- 294 nodeptr : ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 295 BEGIN (* procedure CheckPushedFrame *)
- 296 nodeptr := FrameRec^.PushedFrame;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 297 IF nodeptr = NIL THEN
- ***** ^ not supported yet
- 298 ErrorNames.WarningName( 'FrmStk' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 299 END;
- 300 RETURN nodeptr;
- ***** ^ not supported yet
- 301 END CheckPushedFrame;
- ***** ^ not supported yet
- 302
- 303
- 304 PROCEDURE PopFrame(VAR FrameRec : ScrnTypes.DisplayFrame);
- ***** ^ not supported yet
- 305 (* Reverses the effect of PushFrame; current display file record is
- 306 discarded, and the frame on the top of the stack replaces it.
- 307 After PopFrame, program would usually call ControlScreen with
- 308 "showfields" TRUE.*)
- 309 VAR
- 310 nodeptr : ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 311 BEGIN
- 312 nodeptr := CheckPushedFrame(FrameRec);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 313 IF NOT FrameRec^.SelfSharedWithFile THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 314 GenLists.DisposeList( FrameRec^.self );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 315 (* This disposes of all FrameRec's lists, because they are
- 316 actually sublists of self.*)
- 317 END;
- 318 FrameRec^ := nodeptr^;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 319 (* restore pushed frame. *)
- 320 IF GenLists.ListLength( FrameRec^.self ) > 0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 321 (*We have to do this test because we need to allow
- 322 PushFrame's on frames that have been initialized but not
- 323 read into; we don't have to test for uninitialized self
- 324 lists because InitDisplayFrame does a NewList on it, and
- 325 we can at least require FrameRec to be initialized.*)
- 326 ScrnUtl1.GetFrameLists( FrameRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 327 (*Gets the frame's lists out of self. *)
- 328 END;
- 329 VStorage.DosDealloc(nodeptr, SYSTEM.TSIZE(DisplayFrameRec) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 330 (* discard storage for pushed frame. *)
- 331 END PopFrame;
- ***** ^ not supported yet
- 332
- 333 PROCEDURE PopZapFrame(VAR FrameRec : ScrnTypes.DisplayFrame);
- ***** ^ not supported yet
- 334 (*Removes last frame pushed from stack of Pushed frames, but
- 335 does not change current frame or its contents. The current
- 336 frame is linked to the next frame on the stack. *)
- 337 VAR
- 338 nodeptr : ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 339 BEGIN (* procedure PopZapFrame *)
- 340 nodeptr := CheckPushedFrame(FrameRec);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 341 IF NOT nodeptr^.SelfSharedWithFile THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 342 GenLists.DisposeList( nodeptr^.self );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 343 (* Disposes of all lists associated with pushed frame. *)
- 344 END;
- 345 FrameRec^.PushedFrame := nodeptr^.PushedFrame;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 346 (* link new top of stack. *)
- 347 VStorage.DosDealloc(nodeptr, SYSTEM.TSIZE(DisplayFrameRec) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 348 (* discard storage for pushed frame. *)
- 349 END PopZapFrame;
- ***** ^ not supported yet
- 350
- 351 PROCEDURE ClearFrameStack(VAR FrameRec : ScrnTypes.DisplayFrame);
- ***** ^ not supported yet
- 352 (* Removes all frames from stack of Pushed frames. *)
- 353 BEGIN (* procedure ClearFrameStack *)
- 354 WHILE FrameRec^.PushedFrame # NIL DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 355 PopZapFrame(FrameRec);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 356 END;
- 357 END ClearFrameStack;
- ***** ^ not supported yet
- 358
- 359
- 360 PROCEDURE ShowMessage( TheFile: ScrnTypes.DisplayFile;
- ***** ^ not supported yet
- 361 FrameName : ARRAY OF CHAR );
- ***** ^ not supported yet
- 362 VAR
- 363 TmpFrame: ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 364 BEGIN
- 365 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 366 DspFiles.ReadFrame( TheFile, TmpFrame, FrameName );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 367 FramePainter.ShowDisplayFrame( TmpFrame, 0, 0, 0, 0 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 368 ControlUtils.Control( TmpFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 369 CloseDisplayFrame( TmpFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 370 END ShowMessage;
- ***** ^ not supported yet
- 371
- 372
- 373 PROCEDURE GetEdField( TheFrame: ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 374 FieldName: ARRAY OF CHAR; VAR TheList: GenLists.GenList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 375 BEGIN
- 376 IF 0 # ScrnUtl1.FieldNum( TheFrame, FieldName ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 377 IF ScrnUtl1.ListFromEdField( TheFrame,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 378 TheFrame^.CurrentField, TheList ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 379 RETURN;
- 380 END;
- 381 END;
- 382 HALT();
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 383 END GetEdField;
- ***** ^ not supported yet
- 384
- 385
- 386 BEGIN
- 387 Initialized := FALSE;
- 388 Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 389 END ScrnUtl2.
- ***** ^ not supported yet
- 443 errors
|