SCRNUTL2.LST 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. Listing:
  2. 1 IMPLEMENTATION MODULE ScrnUtl2;
  3. 2 (*
  4. 3 * REPERTOIRE
  5. 4 * Release 1.6
  6. 5 * By Charles Bradford and Cole Brecheen
  7. 6 * (c) Copyright 1985-1992 PMI
  8. 7 * Green Bay, Wisconsin
  9. 8 * All rights reserved
  10. 9 * (414) 468-6040
  11. 10 *
  12. 11 * $Header: D:/logfiles/mods/scrnutl2.mov 1.5 10 Mar 1991 15:32:40 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15
  17. 16
  18. 17 (*
  19. 18 This module contains utilities that neither ScreenDisplay nor
  20. 19 InputManager use, but that you may find useful.
  21. 20 *)
  22. 21
  23. 22 FROM ScrnTypes IMPORT DisplayFrameRec;
  24. 23 (*We have to import this separately because of a bug in Stony
  25. 24 Brook M2; TSIZE doesn't take qualified identifiers.*)
  26. 25
  27. 26 IMPORT ControlUtils;
  28. 27 IMPORT DspFiles;
  29. 28 IMPORT ErrorNames;
  30. 29 IMPORT FrameManager;
  31. 30 IMPORT FramePainter;
  32. 31 IMPORT GenLists;
  33. 32 IMPORT M2Strings;
  34. 33 IMPORT MsColors;
  35. 34 IMPORT Numbers;
  36. 35 IMPORT PosUtils;
  37. 36 IMPORT ScrnTypes;
  38. ***** ^ duplicate identifier
  39. 37 IMPORT ScrnUtl1;
  40. 38 IMPORT SYSTEM;
  41. 39 IMPORT VStorage;
  42. 40 IMPORT VWindows;
  43. 41
  44. 42 VAR
  45. 43 Initialized : BOOLEAN;
  46. 44
  47. 45 PROCEDURE Init();
  48. 46 BEGIN
  49. 47 IF Initialized THEN
  50. 48 RETURN;
  51. 49 ELSE
  52. 50 Initialized := TRUE;
  53. 51 END;
  54. 52 ControlUtils.Init();
  55. ***** ^ not supported yet
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. 53 DspFiles.Init();
  59. ***** ^ not supported yet
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. 54 ErrorNames.Init();
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. 55 FrameManager.Init();
  67. ***** ^ not supported yet
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. 56 FramePainter.Init();
  71. ***** ^ not supported yet
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. 57 GenLists.Init();
  75. ***** ^ not supported yet
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. 58 M2Strings.Init();
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. 59 MsColors.Init();
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. 60 Numbers.Init();
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. 61 PosUtils.Init();
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. ***** ^ not supported yet
  94. 62 ScrnTypes.Init();
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. 63 ScrnUtl1.Init();
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. 64 VStorage.Init();
  103. ***** ^ not supported yet
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. 65 VWindows.Init();
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. 66 END Init;
  111. ***** ^ not supported yet
  112. 67
  113. 68 CONST
  114. 69 AfterLastElmt = 65535;
  115. 70
  116. 71 PROCEDURE CloseDisplayFrame(VAR FrameRec : ScrnTypes.DisplayFrame);
  117. ***** ^ not supported yet
  118. 72 (* disposes of all records and pointers in use by FrameRec. *)
  119. 73 BEGIN (* procedure CloseDisplayFrame *)
  120. 74 ClearFrameStack(FrameRec);
  121. ***** ^ undeclared identifier
  122. ***** ^ not supported yet
  123. 75 IF (FrameRec^.FromFile # NIL) THEN
  124. ***** ^ not supported yet
  125. ***** ^ not supported yet
  126. 76 (*Remember that there may not be a DspFile associated with
  127. 77 the frame.*)
  128. 78 IF NOT FrameRec^.SelfSharedWithFile THEN
  129. ***** ^ not supported yet
  130. ***** ^ not supported yet
  131. 79 GenLists.DisposeList( FrameRec^.self );
  132. ***** ^ not supported yet
  133. ***** ^ not supported yet
  134. ***** ^ not supported yet
  135. ***** ^ not supported yet
  136. 80 (*We only dispose of the self list, because all the other
  137. 81 lists are actually sublists of it. *)
  138. 82 END;
  139. 83 ELSE
  140. 84 GenLists.DisposeList( FrameRec^.self );
  141. ***** ^ not supported yet
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. 85 END;
  146. 86 FrameManager.FrameDeactivated( FrameRec );
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. ***** ^ not supported yet
  150. 87 VStorage.DosDealloc( FrameRec, SYSTEM.TSIZE(DisplayFrameRec));
  151. ***** ^ not supported yet
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. ***** ^ not supported yet
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. 88 (*Note that we don't dispose of FromFile because some other
  158. 89 frame may be pointing to it.*)
  159. 90 END CloseDisplayFrame;
  160. ***** ^ not supported yet
  161. 91
  162. 92
  163. 93 PROCEDURE CopyEdField( frame1: ScrnTypes.DisplayFrame;
  164. ***** ^ not supported yet
  165. 94 FieldName1: ARRAY OF CHAR; frame2: ScrnTypes.DisplayFrame;
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. 95 FieldName2: ARRAY OF CHAR );
  169. ***** ^ not supported yet
  170. 96 VAR
  171. 97 list1, list2: GenLists.GenList;
  172. ***** ^ not supported yet
  173. 98 BEGIN
  174. 99 IF 0 # ScrnUtl1.FieldNum( frame1, FieldName1 ) THEN
  175. ***** ^ not supported yet
  176. ***** ^ not supported yet
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. 100 IF ScrnUtl1.ListFromEdField( frame1,
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. ***** ^ not supported yet
  183. 101 frame1^.CurrentField, list1 ) THEN
  184. ***** ^ not supported yet
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. 102 IF 0 # ScrnUtl1.FieldNum( frame2, FieldName2 ) THEN
  188. ***** ^ not supported yet
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. 103 GenLists.CopyList( list1, list2 );
  193. ***** ^ not supported yet
  194. ***** ^ not supported yet
  195. ***** ^ not supported yet
  196. ***** ^ not supported yet
  197. 104 IF ScrnUtl1.ListToEdField( list2, frame2,
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. ***** ^ not supported yet
  201. ***** ^ not supported yet
  202. 105 frame2^.CurrentField ) THEN
  203. ***** ^ not supported yet
  204. ***** ^ not supported yet
  205. 106 RETURN;
  206. 107 END;
  207. 108 END;
  208. 109 END;
  209. 110 END;
  210. 111 HALT();
  211. ***** ^ undeclared identifier
  212. ***** ^ not supported yet
  213. 112 END CopyEdField;
  214. ***** ^ not supported yet
  215. 113
  216. 114
  217. 115 PROCEDURE CreateImageElement( VAR TheElmt: ScrnTypes.ImageElement; col,
  218. ***** ^ not supported yet
  219. 116 row: CARDINAL; ForeColor, BackColor: MsColors.AColor; Attrib:
  220. ***** ^ not supported yet
  221. 117 MsColors.AMonoAttribute; FieldNum: CARDINAL; VAR TheText: ARRAY OF
  222. ***** ^ not supported yet
  223. 118 CHAR);
  224. ***** ^ not supported yet
  225. 119 BEGIN
  226. 120 TheElmt.row := row;
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. 121 TheElmt.col := col;
  230. ***** ^ not supported yet
  231. ***** ^ not supported yet
  232. 122 TheElmt.foreg := ForeColor;
  233. ***** ^ not supported yet
  234. ***** ^ not supported yet
  235. ***** ^ not supported yet
  236. 123 TheElmt.backg := BackColor;
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. ***** ^ not supported yet
  240. 124 TheElmt.atrb := Attrib;
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 125 TheElmt.field := FieldNum;
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. 126 M2Strings.Assign( TheText, TheElmt.text );
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. ***** ^ not supported yet
  251. ***** ^ not supported yet
  252. ***** ^ not supported yet
  253. 127 END CreateImageElement;
  254. ***** ^ not supported yet
  255. 128
  256. 129
  257. 130 PROCEDURE AddImageElement( VAR FrameRec: ScrnTypes.DisplayFrame;
  258. ***** ^ not supported yet
  259. 131 VAR TheElmt: ScrnTypes.ImageElement; VAR NewImageNum: CARDINAL );
  260. ***** ^ not supported yet
  261. 132 VAR
  262. 133 width, LastImage, cnt, LastField: CARDINAL;
  263. 134 FieldPtr: ScrnTypes.InputFieldPtr;
  264. ***** ^ not supported yet
  265. 135 BEGIN
  266. 136 NewImageNum := 1;
  267. 137 width := M2Strings.Length( TheElmt.text );
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. 138 IF NOT GenLists.Initialized( FrameRec^.ImageList ) THEN
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. 139 GenLists.NewList( FrameRec^.ImageList );
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. 140 ScrnUtl1.PutFrameLists( FrameRec );
  283. ***** ^ not supported yet
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. 141 (* Make sure the new ImageList gets inserted into
  287. 142 FrameRec's .self list. *)
  288. 143 END;
  289. 144 LastImage := GenLists.ListLength( FrameRec^.ImageList );
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. ***** ^ not supported yet
  293. ***** ^ not supported yet
  294. 145 (* find an image element lower than row *)
  295. 146 WHILE (NewImageNum <= LastImage) AND
  296. 147 (ScrnUtl1.VirtualImageRow(FrameRec, NewImageNum) <= TheElmt.row) DO
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. ***** ^ not supported yet
  302. ***** ^ not supported yet
  303. 148 INC( NewImageNum );
  304. ***** ^ undeclared identifier
  305. ***** ^ not supported yet
  306. 149 END;
  307. 150 IF (TheElmt.col + width - 1) > FrameRec^.VirtualWidth THEN
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. ***** ^ not supported yet
  312. 151 FrameRec^.VirtualWidth := TheElmt.col + width - 1;
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. ***** ^ not supported yet
  316. ***** ^ not supported yet
  317. 152 END;
  318. 153 IF TheElmt.row > FrameRec^.VirtualHeight THEN
  319. ***** ^ not supported yet
  320. ***** ^ not supported yet
  321. ***** ^ not supported yet
  322. ***** ^ not supported yet
  323. 154 FrameRec^.VirtualHeight := TheElmt.row;
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. ***** ^ not supported yet
  328. 155 END;
  329. 156 ScrnUtl1.EncodeImageRec( TheElmt );
  330. ***** ^ not supported yet
  331. ***** ^ not supported yet
  332. ***** ^ not supported yet
  333. 157 IF NewImageNum > LastImage THEN
  334. 158 (* No lower image element found, so we put it at the end of the
  335. 159 list. *)
  336. 160 GenLists.ListInsert( TheElmt, GenLists.StrCode,
  337. ***** ^ not supported yet
  338. ***** ^ not supported yet
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. ***** ^ not supported yet
  342. 161 FrameRec^.ImageList, AfterLastElmt );
  343. ***** ^ not supported yet
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. 162 ELSE
  347. 163 GenLists.ListInsert( TheElmt, GenLists.StrCode,
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. ***** ^ not supported yet
  352. ***** ^ not supported yet
  353. 164 FrameRec^.ImageList, NewImageNum );
  354. ***** ^ not supported yet
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. 165 (* Now we have to fix up the field list; every field
  358. 166 with an ImageNum >= NewImageNum needs its ImageNum
  359. 167 field incremented. *)
  360. 168 LastField := ScrnUtl1.FieldListTotal( FrameRec );
  361. ***** ^ not supported yet
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. 169 FOR cnt := 1 TO LastField DO
  365. 170 ScrnUtl1.GetFieldPtr( FrameRec, cnt, FieldPtr );
  366. ***** ^ not supported yet
  367. ***** ^ not supported yet
  368. ***** ^ not supported yet
  369. ***** ^ not supported yet
  370. 171 IF FieldPtr^.ImageNum >= NewImageNum THEN
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. 172 (* Because we're incrementing when ImageNum =
  374. 173 NewImageNum, you have to add to the ImageList
  375. 174 before adding to the FieldList when you're adding
  376. 175 a new field to a frame. *)
  377. 176 INC( FieldPtr^.ImageNum );
  378. ***** ^ undeclared identifier
  379. ***** ^ not supported yet
  380. ***** ^ not supported yet
  381. 177 END;
  382. 178 END;
  383. 179 END;
  384. 180 END AddImageElement;
  385. ***** ^ not supported yet
  386. 181
  387. 182
  388. 183 PROCEDURE WriteToFrame( VAR FrameRec: ScrnTypes.DisplayFrame; col,
  389. ***** ^ not supported yet
  390. 184 row: CARDINAL; text: ARRAY OF CHAR );
  391. ***** ^ not supported yet
  392. 185 VAR
  393. 186 ImageNum: CARDINAL;
  394. 187 TmpRec: ScrnTypes.ImageElement;
  395. ***** ^ not supported yet
  396. 188 BEGIN
  397. 189 CreateImageElement( TmpRec, col, row, FrameRec^.normfor,
  398. ***** ^ not supported yet
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. ***** ^ not supported yet
  402. 190 FrameRec^.normbak, FrameRec^.normatrb, 0, text );
  403. ***** ^ not supported yet
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. ***** ^ not supported yet
  407. ***** ^ not supported yet
  408. 191 AddImageElement( FrameRec, TmpRec, ImageNum );
  409. ***** ^ not supported yet
  410. ***** ^ not supported yet
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. 192 END WriteToFrame;
  414. ***** ^ not supported yet
  415. 193
  416. 194
  417. 195 PROCEDURE ChoiceListToFrame( TheList: GenLists.GenList; TheFrame:
  418. ***** ^ not supported yet
  419. 196 ScrnTypes.DisplayFrame );
  420. ***** ^ not supported yet
  421. 197 VAR
  422. 198 cnt, lngth, TypeCode, col, row: CARDINAL;
  423. 199 TmpStr: ARRAY [0..79] OF CHAR;
  424. ***** ^ not supported yet
  425. ***** ^ not supported yet
  426. 200 BEGIN
  427. 201 lngth := GenLists.ListLength( TheList );
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. 202 cnt := 1;
  432. 203 col := 2;
  433. 204 row := TheFrame^.headline + 1;
  434. ***** ^ not supported yet
  435. ***** ^ not supported yet
  436. 205 IF row = 1 THEN
  437. 206 INC( row);
  438. ***** ^ undeclared identifier
  439. ***** ^ not supported yet
  440. 207 END;
  441. 208 WHILE cnt <= lngth DO
  442. 209 GenLists.GetElmt( TheList, cnt, TmpStr, TypeCode );
  443. ***** ^ not supported yet
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. 210 IF TypeCode = GenLists.StrCode THEN
  449. ***** ^ not supported yet
  450. ***** ^ not supported yet
  451. 211 ControlUtils.AddMenuItem( TheFrame, col, row, TmpStr,
  452. ***** ^ not supported yet
  453. ***** ^ not supported yet
  454. ***** ^ not supported yet
  455. ***** ^ not supported yet
  456. 212 M2Strings.Length(TmpStr), 0, '' );
  457. ***** ^ not supported yet
  458. ***** ^ not supported yet
  459. ***** ^ not supported yet
  460. ***** ^ not supported yet
  461. 213 END;
  462. 214 INC( row );
  463. ***** ^ undeclared identifier
  464. ***** ^ not supported yet
  465. 215 INC( cnt );
  466. ***** ^ undeclared identifier
  467. ***** ^ not supported yet
  468. 216 END;
  469. 217 END ChoiceListToFrame;
  470. ***** ^ not supported yet
  471. 218
  472. 219
  473. 220 PROCEDURE ListToFrame( TheList: GenLists.GenList; TheFrame:
  474. ***** ^ not supported yet
  475. 221 ScrnTypes.DisplayFrame );
  476. ***** ^ not supported yet
  477. 222 VAR
  478. 223 cnt, lngth, TypeCode, col, row: CARDINAL;
  479. 224 TmpStr: ARRAY [0..79] OF CHAR;
  480. ***** ^ not supported yet
  481. ***** ^ not supported yet
  482. 225 BEGIN
  483. 226 lngth := GenLists.ListLength( TheList );
  484. ***** ^ not supported yet
  485. ***** ^ not supported yet
  486. ***** ^ not supported yet
  487. 227 cnt := 1;
  488. 228 col := 2;
  489. 229 row := TheFrame^.headline + 1;
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. 230 IF row = 1 THEN
  493. 231 INC( row);
  494. ***** ^ undeclared identifier
  495. ***** ^ not supported yet
  496. 232 END;
  497. 233 WHILE cnt <= lngth DO
  498. 234 GenLists.GetElmt( TheList, cnt, TmpStr, TypeCode );
  499. ***** ^ not supported yet
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. ***** ^ not supported yet
  504. 235 IF TypeCode = GenLists.StrCode THEN
  505. ***** ^ not supported yet
  506. ***** ^ not supported yet
  507. 236 WriteToFrame( TheFrame, col, row, TmpStr );
  508. ***** ^ not supported yet
  509. ***** ^ not supported yet
  510. ***** ^ not supported yet
  511. 237 END;
  512. 238 INC( row );
  513. ***** ^ undeclared identifier
  514. ***** ^ not supported yet
  515. 239 INC( cnt );
  516. ***** ^ undeclared identifier
  517. ***** ^ not supported yet
  518. 240 END;
  519. 241 END ListToFrame;
  520. ***** ^ not supported yet
  521. 242
  522. 243
  523. 244 PROCEDURE Display( TheFrame: ScrnTypes.DisplayFrame; FrameName
  524. ***** ^ not supported yet
  525. 245 : ARRAY OF CHAR );
  526. ***** ^ not supported yet
  527. 246 BEGIN
  528. 247 IF TheFrame^.FromFile = NIL THEN
  529. ***** ^ not supported yet
  530. ***** ^ not supported yet
  531. 248 ErrorNames.WarningName( 'OpnDsp' );
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. 249 RETURN;
  536. 250 END;
  537. 251 DspFiles.ReadFrame( TheFrame^.FromFile,
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. 252 TheFrame, FrameName );
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. 253 FramePainter.ShowDisplayFrame( TheFrame, 0, 0, 0, 0);
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. ***** ^ not supported yet
  550. 254 END Display;
  551. ***** ^ not supported yet
  552. 255
  553. 256
  554. 257 PROCEDURE ReadAndShow( TheFile: ScrnTypes.DisplayFile;
  555. ***** ^ not supported yet
  556. 258 TheFrame: ScrnTypes.DisplayFrame; FrameName : ARRAY OF CHAR
  557. ***** ^ not supported yet
  558. ***** ^ not supported yet
  559. 259 );
  560. 260 BEGIN
  561. 261 DspFiles.ReadFrame( TheFile, TheFrame, FrameName );
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. ***** ^ not supported yet
  565. ***** ^ not supported yet
  566. ***** ^ not supported yet
  567. 262 FramePainter.ShowDisplayFrame( TheFrame, 0, 0, 0, 0);
  568. ***** ^ not supported yet
  569. ***** ^ not supported yet
  570. ***** ^ not supported yet
  571. ***** ^ not supported yet
  572. 263 END ReadAndShow;
  573. ***** ^ not supported yet
  574. 264
  575. 265
  576. 266 PROCEDURE PushFrame( VAR FrameRec : ScrnTypes.DisplayFrame);
  577. ***** ^ not supported yet
  578. 267 (* Push the current frame, with its fields list, onto the
  579. 268 frame stack for this file. The current frame will be left
  580. 269 undefined, with no fields list linked to it; it must be
  581. 270 filled in with a call to Display. *)
  582. 271 VAR
  583. 272 nodeptr : ScrnTypes.DisplayFrame;
  584. ***** ^ not supported yet
  585. 273 BEGIN
  586. 274 VStorage.DosAlloc(nodeptr, SYSTEM.TSIZE(DisplayFrameRec) );
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. ***** ^ not supported yet
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. 275 nodeptr^ := FrameRec^;
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. 276 (* save the frame *)
  597. 277 FrameRec^.PushedFrame := nodeptr;
  598. ***** ^ not supported yet
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. 278 (* link it to the new current frame. *)
  602. 279 GenLists.CopyList( FrameRec^.self, nodeptr^.self );
  603. ***** ^ not supported yet
  604. ***** ^ not supported yet
  605. ***** ^ not supported yet
  606. ***** ^ not supported yet
  607. ***** ^ not supported yet
  608. ***** ^ not supported yet
  609. 280 (*Note that FrameRec^.self probably equals
  610. 281 FrameRec^.FromFile^.ListBuf at this point, so we
  611. 282 have to be careful.*)
  612. 283 ScrnUtl1.GetFrameLists( nodeptr );
  613. ***** ^ not supported yet
  614. ***** ^ not supported yet
  615. ***** ^ not supported yet
  616. 284 (*The pushed frame's lists are now completely disconnected
  617. 285 from FrameRec's lists.*)
  618. 286 nodeptr^.SelfSharedWithFile := FALSE;
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. 287 END PushFrame;
  622. ***** ^ not supported yet
  623. 288
  624. 289 PROCEDURE CheckPushedFrame(VAR FrameRec :
  625. 290 ScrnTypes.DisplayFrame) : ScrnTypes.DisplayFrame;
  626. ***** ^ not supported yet
  627. ***** ^ not supported yet
  628. 291 (* used internally by PopFrame and PopZapFrame *)
  629. 292 (* Returns pointer to valid pushed frame. *)
  630. 293 VAR
  631. 294 nodeptr : ScrnTypes.DisplayFrame;
  632. ***** ^ not supported yet
  633. 295 BEGIN (* procedure CheckPushedFrame *)
  634. 296 nodeptr := FrameRec^.PushedFrame;
  635. ***** ^ not supported yet
  636. ***** ^ not supported yet
  637. ***** ^ not supported yet
  638. 297 IF nodeptr = NIL THEN
  639. ***** ^ not supported yet
  640. 298 ErrorNames.WarningName( 'FrmStk' );
  641. ***** ^ not supported yet
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. 299 END;
  645. 300 RETURN nodeptr;
  646. ***** ^ not supported yet
  647. 301 END CheckPushedFrame;
  648. ***** ^ not supported yet
  649. 302
  650. 303
  651. 304 PROCEDURE PopFrame(VAR FrameRec : ScrnTypes.DisplayFrame);
  652. ***** ^ not supported yet
  653. 305 (* Reverses the effect of PushFrame; current display file record is
  654. 306 discarded, and the frame on the top of the stack replaces it.
  655. 307 After PopFrame, program would usually call ControlScreen with
  656. 308 "showfields" TRUE.*)
  657. 309 VAR
  658. 310 nodeptr : ScrnTypes.DisplayFrame;
  659. ***** ^ not supported yet
  660. 311 BEGIN
  661. 312 nodeptr := CheckPushedFrame(FrameRec);
  662. ***** ^ not supported yet
  663. ***** ^ not supported yet
  664. ***** ^ not supported yet
  665. 313 IF NOT FrameRec^.SelfSharedWithFile THEN
  666. ***** ^ not supported yet
  667. ***** ^ not supported yet
  668. 314 GenLists.DisposeList( FrameRec^.self );
  669. ***** ^ not supported yet
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. ***** ^ not supported yet
  673. 315 (* This disposes of all FrameRec's lists, because they are
  674. 316 actually sublists of self.*)
  675. 317 END;
  676. 318 FrameRec^ := nodeptr^;
  677. ***** ^ not supported yet
  678. ***** ^ not supported yet
  679. 319 (* restore pushed frame. *)
  680. 320 IF GenLists.ListLength( FrameRec^.self ) > 0 THEN
  681. ***** ^ not supported yet
  682. ***** ^ not supported yet
  683. ***** ^ not supported yet
  684. ***** ^ not supported yet
  685. 321 (*We have to do this test because we need to allow
  686. 322 PushFrame's on frames that have been initialized but not
  687. 323 read into; we don't have to test for uninitialized self
  688. 324 lists because InitDisplayFrame does a NewList on it, and
  689. 325 we can at least require FrameRec to be initialized.*)
  690. 326 ScrnUtl1.GetFrameLists( FrameRec );
  691. ***** ^ not supported yet
  692. ***** ^ not supported yet
  693. ***** ^ not supported yet
  694. 327 (*Gets the frame's lists out of self. *)
  695. 328 END;
  696. 329 VStorage.DosDealloc(nodeptr, SYSTEM.TSIZE(DisplayFrameRec) );
  697. ***** ^ not supported yet
  698. ***** ^ not supported yet
  699. ***** ^ not supported yet
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. ***** ^ not supported yet
  703. 330 (* discard storage for pushed frame. *)
  704. 331 END PopFrame;
  705. ***** ^ not supported yet
  706. 332
  707. 333 PROCEDURE PopZapFrame(VAR FrameRec : ScrnTypes.DisplayFrame);
  708. ***** ^ not supported yet
  709. 334 (*Removes last frame pushed from stack of Pushed frames, but
  710. 335 does not change current frame or its contents. The current
  711. 336 frame is linked to the next frame on the stack. *)
  712. 337 VAR
  713. 338 nodeptr : ScrnTypes.DisplayFrame;
  714. ***** ^ not supported yet
  715. 339 BEGIN (* procedure PopZapFrame *)
  716. 340 nodeptr := CheckPushedFrame(FrameRec);
  717. ***** ^ not supported yet
  718. ***** ^ not supported yet
  719. ***** ^ not supported yet
  720. 341 IF NOT nodeptr^.SelfSharedWithFile THEN
  721. ***** ^ not supported yet
  722. ***** ^ not supported yet
  723. 342 GenLists.DisposeList( nodeptr^.self );
  724. ***** ^ not supported yet
  725. ***** ^ not supported yet
  726. ***** ^ not supported yet
  727. ***** ^ not supported yet
  728. 343 (* Disposes of all lists associated with pushed frame. *)
  729. 344 END;
  730. 345 FrameRec^.PushedFrame := nodeptr^.PushedFrame;
  731. ***** ^ not supported yet
  732. ***** ^ not supported yet
  733. ***** ^ not supported yet
  734. ***** ^ not supported yet
  735. 346 (* link new top of stack. *)
  736. 347 VStorage.DosDealloc(nodeptr, SYSTEM.TSIZE(DisplayFrameRec) );
  737. ***** ^ not supported yet
  738. ***** ^ not supported yet
  739. ***** ^ not supported yet
  740. ***** ^ not supported yet
  741. ***** ^ not supported yet
  742. ***** ^ not supported yet
  743. 348 (* discard storage for pushed frame. *)
  744. 349 END PopZapFrame;
  745. ***** ^ not supported yet
  746. 350
  747. 351 PROCEDURE ClearFrameStack(VAR FrameRec : ScrnTypes.DisplayFrame);
  748. ***** ^ not supported yet
  749. 352 (* Removes all frames from stack of Pushed frames. *)
  750. 353 BEGIN (* procedure ClearFrameStack *)
  751. 354 WHILE FrameRec^.PushedFrame # NIL DO
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. 355 PopZapFrame(FrameRec);
  755. ***** ^ not supported yet
  756. ***** ^ not supported yet
  757. 356 END;
  758. 357 END ClearFrameStack;
  759. ***** ^ not supported yet
  760. 358
  761. 359
  762. 360 PROCEDURE ShowMessage( TheFile: ScrnTypes.DisplayFile;
  763. ***** ^ not supported yet
  764. 361 FrameName : ARRAY OF CHAR );
  765. ***** ^ not supported yet
  766. 362 VAR
  767. 363 TmpFrame: ScrnTypes.DisplayFrame;
  768. ***** ^ not supported yet
  769. 364 BEGIN
  770. 365 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow );
  771. ***** ^ not supported yet
  772. ***** ^ not supported yet
  773. ***** ^ not supported yet
  774. ***** ^ not supported yet
  775. ***** ^ not supported yet
  776. 366 DspFiles.ReadFrame( TheFile, TmpFrame, FrameName );
  777. ***** ^ not supported yet
  778. ***** ^ not supported yet
  779. ***** ^ not supported yet
  780. ***** ^ not supported yet
  781. ***** ^ not supported yet
  782. 367 FramePainter.ShowDisplayFrame( TmpFrame, 0, 0, 0, 0 );
  783. ***** ^ not supported yet
  784. ***** ^ not supported yet
  785. ***** ^ not supported yet
  786. ***** ^ not supported yet
  787. 368 ControlUtils.Control( TmpFrame );
  788. ***** ^ not supported yet
  789. ***** ^ not supported yet
  790. ***** ^ not supported yet
  791. 369 CloseDisplayFrame( TmpFrame );
  792. ***** ^ not supported yet
  793. ***** ^ not supported yet
  794. 370 END ShowMessage;
  795. ***** ^ not supported yet
  796. 371
  797. 372
  798. 373 PROCEDURE GetEdField( TheFrame: ScrnTypes.DisplayFrame;
  799. ***** ^ not supported yet
  800. 374 FieldName: ARRAY OF CHAR; VAR TheList: GenLists.GenList );
  801. ***** ^ not supported yet
  802. ***** ^ not supported yet
  803. 375 BEGIN
  804. 376 IF 0 # ScrnUtl1.FieldNum( TheFrame, FieldName ) THEN
  805. ***** ^ not supported yet
  806. ***** ^ not supported yet
  807. ***** ^ not supported yet
  808. ***** ^ not supported yet
  809. 377 IF ScrnUtl1.ListFromEdField( TheFrame,
  810. ***** ^ not supported yet
  811. ***** ^ not supported yet
  812. ***** ^ not supported yet
  813. 378 TheFrame^.CurrentField, TheList ) THEN
  814. ***** ^ not supported yet
  815. ***** ^ not supported yet
  816. ***** ^ not supported yet
  817. 379 RETURN;
  818. 380 END;
  819. 381 END;
  820. 382 HALT();
  821. ***** ^ undeclared identifier
  822. ***** ^ not supported yet
  823. 383 END GetEdField;
  824. ***** ^ not supported yet
  825. 384
  826. 385
  827. 386 BEGIN
  828. 387 Initialized := FALSE;
  829. 388 Init();
  830. ***** ^ not supported yet
  831. ***** ^ not supported yet
  832. 389 END ScrnUtl2.
  833. ***** ^ not supported yet
  834. 443 errors