MSGBOX2.LST 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. Listing:
  2. 1 IMPLEMENTATION MODULE MsgBox2;
  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/msgbox2.mov 1.5 10 Mar 1991 15:29:52 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15
  17. 16 IMPORT ControlUtils;
  18. 17 IMPORT DspFiles;
  19. 18 IMPORT FramePainter;
  20. 19 IMPORT FrameManager;
  21. 20 IMPORT GenLists;
  22. 21 IMPORT InputManager;
  23. 22 IMPORT ListUtils;
  24. 23 IMPORT M2Strings;
  25. 24 IMPORT Numbers;
  26. 25 IMPORT NumTypes;
  27. 26 IMPORT PosUtils;
  28. 27 IMPORT ScrnTypes;
  29. 28 IMPORT ScrnUtl1;
  30. 29 IMPORT ScrnUtl2;
  31. 30 IMPORT SYSTEM;
  32. 31 IMPORT VWindows;
  33. 32
  34. 33 VAR
  35. 34 Initialized : BOOLEAN;
  36. 35
  37. 36 PROCEDURE Init();
  38. 37 BEGIN
  39. 38 IF Initialized THEN
  40. 39 RETURN;
  41. 40 ELSE
  42. 41 Initialized := TRUE;
  43. 42 END;
  44. 43 ControlUtils.Init();
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. ***** ^ not supported yet
  48. 44 DspFiles.Init();
  49. ***** ^ not supported yet
  50. ***** ^ not supported yet
  51. ***** ^ not supported yet
  52. 45 FramePainter.Init();
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. 46 FrameManager.Init();
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. ***** ^ not supported yet
  60. 47 GenLists.Init();
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. ***** ^ not supported yet
  64. 48 InputManager.Init();
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. ***** ^ not supported yet
  68. 49 ListUtils.Init();
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 50 M2Strings.Init();
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. ***** ^ not supported yet
  76. 51 Numbers.Init();
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. 52 NumTypes.Init();
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. 53 PosUtils.Init();
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. 54 ScrnTypes.Init();
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. 55 ScrnUtl1.Init();
  93. ***** ^ not supported yet
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. 56 ScrnUtl2.Init();
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 57 VWindows.Init();
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. 58 END Init;
  105. ***** ^ not supported yet
  106. 59
  107. 60
  108. 61 PROCEDURE sub( n1, n2: CARDINAL ): CARDINAL;
  109. 62 BEGIN
  110. 63 IF n1 > n2 THEN
  111. 64 RETURN n1 - n2;
  112. 65 ELSE
  113. 66 RETURN 0;
  114. 67 END;
  115. 68 END sub;
  116. ***** ^ not supported yet
  117. 69
  118. 70 CONST
  119. 71 lftcol = 4;
  120. 72 toprow = 3;
  121. 73 rtcol = 42;
  122. 74 btmrow = 14;
  123. 75 midcol = 24;
  124. 76 midrow = 9;
  125. 77
  126. 78 (* These define starting points for msg box areas that we
  127. 79 use if we can't put the box inside the current frame. *)
  128. 80
  129. 81
  130. 82 PROCEDURE FindExteriorCoords( locatn: VWindows.Compass; ListWidth,
  131. ***** ^ not supported yet
  132. 83 ListHeight: CARDINAL; VAR col1, row1, col2, row2: CARDINAL );
  133. 84 BEGIN
  134. 85 CASE locatn OF
  135. ***** ^ not supported yet
  136. 86 VWindows.West, VWindows.NW, VWindows.SW :
  137. ***** ^ not supported yet
  138. ***** ^ not supported yet
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. ***** ^ not supported yet
  142. ***** ^ not supported yet
  143. 87 col1 := lftcol;
  144. 88 | VWindows.North, VWindows.South :
  145. ***** ^ not supported yet
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. 89 col1 := midcol;
  150. 90 | VWindows.East, VWindows.NE, VWindows.SE :
  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. 91 col1 := rtcol;
  158. 92 END;
  159. 93 CASE locatn OF
  160. ***** ^ not supported yet
  161. 94 VWindows.North, VWindows.NW, VWindows.NE :
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. 95 row1 := toprow;
  169. 96 | VWindows.East, VWindows.West :
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. 97 row1 := midrow;
  175. 98 | VWindows.South, VWindows.SE, VWindows.SW :
  176. ***** ^ not supported yet
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. 99 row1 := btmrow;
  183. 100 END;
  184. 101 col2 := col1 + ListWidth + 3;
  185. 102 row2 := row1 + ListHeight + 3;
  186. 103 END FindExteriorCoords;
  187. ***** ^ not supported yet
  188. 104
  189. 105
  190. 106 PROCEDURE FindBestCoords( TheFrame: ScrnTypes.DisplayFrame;
  191. ***** ^ not supported yet
  192. 107 locatn: VWindows.Compass; ListWidth, ListHeight : CARDINAL;
  193. ***** ^ not supported yet
  194. 108 VAR col1, row1, col2, row2: CARDINAL );
  195. 109 VAR
  196. 110 width, height : CARDINAL;
  197. 111 BEGIN
  198. 112 width := TheFrame^.endcol - TheFrame^.startcol + 1;
  199. ***** ^ not supported yet
  200. ***** ^ not supported yet
  201. ***** ^ not supported yet
  202. ***** ^ not supported yet
  203. 113 height := TheFrame^.endrow - TheFrame^.startrow + 1;
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. ***** ^ not supported yet
  207. ***** ^ not supported yet
  208. 114 CASE locatn OF
  209. ***** ^ not supported yet
  210. 115 VWindows.West, VWindows.NW, VWindows.SW :
  211. ***** ^ not supported yet
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. 116 col1 := TheFrame^.startcol + 4;
  218. ***** ^ not supported yet
  219. ***** ^ not supported yet
  220. 117 col2 := TheFrame^.startcol + (width DIV 2);
  221. ***** ^ not supported yet
  222. ***** ^ not supported yet
  223. 118 | VWindows.East, VWindows.NE, VWindows.SE :
  224. ***** ^ not supported yet
  225. ***** ^ not supported yet
  226. ***** ^ not supported yet
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. ***** ^ not supported yet
  230. 119 col1 := sub( TheFrame^.endcol, width DIV 2 );
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. ***** ^ not supported yet
  235. 120 col2 := sub( TheFrame^.endcol, 4 );
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. ***** ^ not supported yet
  240. 121 ELSE
  241. 122 col1 := TheFrame^.startcol + (width DIV 4);
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 123 col2 := sub( TheFrame^.endcol, width DIV 4 );
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. 124 END;
  250. 125 CASE locatn OF
  251. ***** ^ not supported yet
  252. 126 VWindows.North, VWindows.NW, VWindows.NE :
  253. ***** ^ not supported yet
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. ***** ^ not supported yet
  259. 127 row1 := TheFrame^.startrow + 4;
  260. ***** ^ not supported yet
  261. ***** ^ not supported yet
  262. 128 row2 := TheFrame^.startrow + (height DIV 2);
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. 129 | VWindows.South, VWindows.SE, VWindows.SW :
  266. ***** ^ not supported yet
  267. ***** ^ not supported yet
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. 130 row1 := sub( TheFrame^.endrow, height DIV 2 );
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. 131 row2 := sub( TheFrame^.endrow, 4 );
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. 132 ELSE
  283. 133 row1 := TheFrame^.startrow + (height DIV 4);
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. 134 row2 := sub( TheFrame^.endrow, height DIV 4 );
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. 135 END;
  292. 136 IF (row1 >= row2) OR (col1 >= col2) THEN
  293. 137 FindExteriorCoords( locatn, ListWidth, ListHeight,
  294. ***** ^ not supported yet
  295. ***** ^ not supported yet
  296. 138 col1, row1, col2, row2 );
  297. ***** ^ not supported yet
  298. 139 END;
  299. 140 END FindBestCoords;
  300. ***** ^ not supported yet
  301. 141
  302. 142
  303. 143 PROCEDURE LstMsgBox( TheFrame: ScrnTypes.DisplayFrame;
  304. ***** ^ not supported yet
  305. 144 locatn : VWindows.Compass; VAR TheList: GenLists.GenList );
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. 145 VAR
  309. 146 MsgFrame: ScrnTypes.DisplayFrame;
  310. ***** ^ not supported yet
  311. 147 LinesAdded, BytesAdded : INTEGER;
  312. 148 StartLine, CursorLine, CursorCol,
  313. 149 col1, row1, col2, row2 : CARDINAL;
  314. 150 BytePos: LONGINT;
  315. 151 DummyName: ScrnTypes.AFrameName;
  316. ***** ^ not supported yet
  317. 152
  318. 153 BEGIN
  319. 154 StartLine := 1;
  320. 155 CursorLine := 1;
  321. 156 CursorCol := 1;
  322. 157 BytePos := NumTypes.L0;
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. 158 ListUtils.ReformPara( TheList, 0, 32, StartLine,
  326. ***** ^ not supported yet
  327. ***** ^ not supported yet
  328. ***** ^ not supported yet
  329. 159 CursorLine, CursorCol, LinesAdded, BytesAdded, BytePos );
  330. ***** ^ not supported yet
  331. 160 (* We're reformatting twice here -- first to help us find
  332. 161 a good location for the window, and second to
  333. 162 determine how large the window should be. *)
  334. 163
  335. 164 FindBestCoords( TheFrame, locatn,
  336. ***** ^ not supported yet
  337. ***** ^ not supported yet
  338. ***** ^ not supported yet
  339. 165 ListUtils.LongestLine(TheList),
  340. ***** ^ not supported yet
  341. ***** ^ not supported yet
  342. ***** ^ not supported yet
  343. 166 GenLists.ListLength(TheList), col1, row1, col2,
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. 167 row2 );
  348. ***** ^ not supported yet
  349. 168 ScrnTypes.InitDisplayFrame( MsgFrame, TheFrame^.WindowHandle );
  350. ***** ^ not supported yet
  351. ***** ^ not supported yet
  352. ***** ^ not supported yet
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. 169
  356. 170 StartLine := 1;
  357. 171 CursorLine := 1;
  358. 172 CursorCol := 1;
  359. 173 BytePos := NumTypes.L0;
  360. ***** ^ not supported yet
  361. ***** ^ not supported yet
  362. 174 ListUtils.ReformPara( TheList, 0, (col2 - col1) - 1, StartLine,
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. 175 CursorLine, CursorCol, LinesAdded, BytesAdded, BytePos );
  367. ***** ^ not supported yet
  368. 176
  369. 177 row2 := Numbers.Min( row2, row1 + GenLists.ListLength(TheList) + 1 );
  370. ***** ^ not supported yet
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. ***** ^ not supported yet
  374. ***** ^ not supported yet
  375. ***** ^ not supported yet
  376. 178 row2 := Numbers.Max( row2, row1 + 3 );
  377. ***** ^ not supported yet
  378. ***** ^ not supported yet
  379. ***** ^ not supported yet
  380. 179 (*Make sure we've got at least a two line window.*)
  381. 180 MsgFrame^.startcol := col1;
  382. ***** ^ not supported yet
  383. ***** ^ not supported yet
  384. 181 MsgFrame^.startrow := row1;
  385. ***** ^ not supported yet
  386. ***** ^ not supported yet
  387. 182 MsgFrame^.endcol := col2;
  388. ***** ^ not supported yet
  389. ***** ^ not supported yet
  390. 183 MsgFrame^.endrow := row2;
  391. ***** ^ not supported yet
  392. ***** ^ not supported yet
  393. 184 MsgFrame^.action := 'I';
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. 185 MsgFrame^.normfor := TheFrame^.msgfor;
  397. ***** ^ not supported yet
  398. ***** ^ not supported yet
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. 186 MsgFrame^.normbak := TheFrame^.msgbak;
  402. ***** ^ not supported yet
  403. ***** ^ not supported yet
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. 187 MsgFrame^.normatrb := TheFrame^.msgatrb;
  407. ***** ^ not supported yet
  408. ***** ^ not supported yet
  409. ***** ^ not supported yet
  410. ***** ^ not supported yet
  411. 188 ScrnUtl1.SetNormalColors( MsgFrame );
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. ***** ^ not supported yet
  415. 189 ScrnUtl2.ListToFrame( TheList, MsgFrame );
  416. ***** ^ not supported yet
  417. ***** ^ not supported yet
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. 190 FramePainter.ShowDisplayFrame( MsgFrame, 0, 0, 0, 0 );
  421. ***** ^ not supported yet
  422. ***** ^ not supported yet
  423. ***** ^ not supported yet
  424. ***** ^ not supported yet
  425. 191 InputManager.ControlFrame( MsgFrame, 1, '', FALSE, DummyName );
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. 192 FrameManager.EraseFrame( MsgFrame );
  431. ***** ^ not supported yet
  432. ***** ^ not supported yet
  433. ***** ^ not supported yet
  434. 193 ScrnUtl2.CloseDisplayFrame( MsgFrame );
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. ***** ^ not supported yet
  438. 194 InputManager.LookAlive( TheFrame );
  439. ***** ^ not supported yet
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. 195 END LstMsgBox;
  443. ***** ^ not supported yet
  444. 196
  445. 197
  446. 198 PROCEDURE StrMsgBox( TheFrame: ScrnTypes.DisplayFrame;
  447. ***** ^ not supported yet
  448. 199 locatn : VWindows.Compass; TheStr : ARRAY OF CHAR );
  449. ***** ^ not supported yet
  450. ***** ^ not supported yet
  451. 200 VAR
  452. 201 TmpList: GenLists.GenList;
  453. ***** ^ not supported yet
  454. 202 BEGIN
  455. 203 GenLists.NewList( TmpList );
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. ***** ^ not supported yet
  459. 204 GenLists.ListInsert( TheStr, GenLists.StrCode, TmpList, 1 );
  460. ***** ^ not supported yet
  461. ***** ^ not supported yet
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. ***** ^ not supported yet
  466. ***** ^ not supported yet
  467. 205 LstMsgBox( TheFrame, locatn, TmpList );
  468. ***** ^ not supported yet
  469. ***** ^ not supported yet
  470. ***** ^ not supported yet
  471. ***** ^ not supported yet
  472. 206 GenLists.DisposeList( TmpList );
  473. ***** ^ not supported yet
  474. ***** ^ not supported yet
  475. ***** ^ not supported yet
  476. 207 END StrMsgBox;
  477. ***** ^ not supported yet
  478. 208
  479. 209
  480. 210 PROCEDURE LstMsgBoxExterior( TheFrame: ScrnTypes.DisplayFrame;
  481. ***** ^ not supported yet
  482. 211 locatn : VWindows.Compass; VAR TheList: GenLists.GenList );
  483. ***** ^ not supported yet
  484. ***** ^ not supported yet
  485. 212 VAR
  486. 213 MsgFrame: ScrnTypes.DisplayFrame;
  487. ***** ^ not supported yet
  488. 214 LinesAdded, BytesAdded : INTEGER;
  489. 215 StartLine, CursorLine, CursorCol,
  490. 216 col1, row1, col2, row2 : CARDINAL;
  491. 217 BytePos: LONGINT;
  492. 218 DummyName: ScrnTypes.AFrameName;
  493. ***** ^ not supported yet
  494. 219
  495. 220 BEGIN
  496. 221 StartLine := 1;
  497. 222 CursorLine := 1;
  498. 223 CursorCol := 1;
  499. 224 BytePos := NumTypes.L0;
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. 225 ListUtils.ReformPara( TheList, 0, 32, StartLine,
  503. ***** ^ not supported yet
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. 226 CursorLine, CursorCol, LinesAdded, BytesAdded, BytePos );
  507. ***** ^ not supported yet
  508. 227 (* We're reformatting twice here -- first to help us find
  509. 228 a good location for the window, and second to
  510. 229 determine how large the window should be. *)
  511. 230
  512. 231 StartLine := 1;
  513. 232 (* Reset StartLine because it moves to end of paragraph
  514. 233 in ReformPara above. *)
  515. 234 FindExteriorCoords( locatn, ListUtils.LongestLine(TheList),
  516. ***** ^ not supported yet
  517. ***** ^ not supported yet
  518. ***** ^ not supported yet
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. 235 GenLists.ListLength(TheList), col1, row1, col2, row2 );
  522. ***** ^ not supported yet
  523. ***** ^ not supported yet
  524. ***** ^ not supported yet
  525. ***** ^ not supported yet
  526. 236 ScrnTypes.InitDisplayFrame( MsgFrame, TheFrame^.WindowHandle );
  527. ***** ^ not supported yet
  528. ***** ^ not supported yet
  529. ***** ^ not supported yet
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. 237
  533. 238 StartLine := 1;
  534. 239 CursorLine := 1;
  535. 240 CursorCol := 1;
  536. 241 BytePos := NumTypes.L0;
  537. ***** ^ not supported yet
  538. ***** ^ not supported yet
  539. 242 ListUtils.ReformPara( TheList, 0, (col2 - col1) - 1, StartLine,
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. ***** ^ not supported yet
  543. 243 CursorLine, CursorCol, LinesAdded, BytesAdded, BytePos );
  544. ***** ^ not supported yet
  545. 244
  546. 245 row2 := Numbers.Min( row2, row1 + GenLists.ListLength(TheList) + 1 );
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. ***** ^ not supported yet
  550. ***** ^ not supported yet
  551. ***** ^ not supported yet
  552. ***** ^ not supported yet
  553. 246 row2 := Numbers.Max( row2, row1 + 3 );
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. 247 (*Make sure we've got at least a two line window.*)
  558. 248 MsgFrame^.startcol := col1;
  559. ***** ^ not supported yet
  560. ***** ^ not supported yet
  561. 249 MsgFrame^.startrow := row1;
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. 250 MsgFrame^.endcol := col2;
  565. ***** ^ not supported yet
  566. ***** ^ not supported yet
  567. 251 MsgFrame^.endrow := row2;
  568. ***** ^ not supported yet
  569. ***** ^ not supported yet
  570. 252 MsgFrame^.action := 'I';
  571. ***** ^ not supported yet
  572. ***** ^ not supported yet
  573. 253 MsgFrame^.normfor := TheFrame^.msgfor;
  574. ***** ^ not supported yet
  575. ***** ^ not supported yet
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. 254 MsgFrame^.normbak := TheFrame^.msgbak;
  579. ***** ^ not supported yet
  580. ***** ^ not supported yet
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. 255 MsgFrame^.normatrb := TheFrame^.msgatrb;
  584. ***** ^ not supported yet
  585. ***** ^ not supported yet
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. 256 ScrnUtl1.SetNormalColors( MsgFrame );
  589. ***** ^ not supported yet
  590. ***** ^ not supported yet
  591. ***** ^ not supported yet
  592. 257 ScrnUtl2.ListToFrame( TheList, MsgFrame );
  593. ***** ^ not supported yet
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. 258 FramePainter.ShowDisplayFrame( MsgFrame, 0, 0, 0, 0 );
  598. ***** ^ not supported yet
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. 259 InputManager.ControlFrame( MsgFrame, 1, '', FALSE, DummyName );
  603. ***** ^ not supported yet
  604. ***** ^ not supported yet
  605. ***** ^ not supported yet
  606. ***** ^ not supported yet
  607. 260 FrameManager.EraseFrame( MsgFrame );
  608. ***** ^ not supported yet
  609. ***** ^ not supported yet
  610. ***** ^ not supported yet
  611. 261 ScrnUtl2.CloseDisplayFrame( MsgFrame );
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. ***** ^ not supported yet
  615. 262 InputManager.LookAlive( TheFrame );
  616. ***** ^ not supported yet
  617. ***** ^ not supported yet
  618. ***** ^ not supported yet
  619. 263 END LstMsgBoxExterior;
  620. ***** ^ not supported yet
  621. 264
  622. 265
  623. 266 PROCEDURE StrMsgBoxExterior( TheFrame: ScrnTypes.DisplayFrame;
  624. ***** ^ not supported yet
  625. 267 locatn : VWindows.Compass; TheStr : ARRAY OF CHAR );
  626. ***** ^ not supported yet
  627. ***** ^ not supported yet
  628. 268 VAR
  629. 269 TmpList: GenLists.GenList;
  630. ***** ^ not supported yet
  631. 270 BEGIN
  632. 271 GenLists.NewList( TmpList );
  633. ***** ^ not supported yet
  634. ***** ^ not supported yet
  635. ***** ^ not supported yet
  636. 272 GenLists.ListInsert( TheStr, GenLists.StrCode, TmpList, 1 );
  637. ***** ^ not supported yet
  638. ***** ^ not supported yet
  639. ***** ^ not supported yet
  640. ***** ^ not supported yet
  641. ***** ^ not supported yet
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. 273 LstMsgBoxExterior( TheFrame, locatn, TmpList );
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. ***** ^ not supported yet
  649. 274 GenLists.DisposeList( TmpList );
  650. ***** ^ not supported yet
  651. ***** ^ not supported yet
  652. ***** ^ not supported yet
  653. 275 END StrMsgBoxExterior;
  654. ***** ^ not supported yet
  655. 276
  656. 277
  657. 278 PROCEDURE MsgOkay( TheFrame: ScrnTypes.DisplayFrame;
  658. ***** ^ not supported yet
  659. 279 locatn : VWindows.Compass; TheStr : ARRAY OF CHAR ): BOOLEAN;
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. 280 VAR
  663. 281 TmpList: GenLists.GenList;
  664. ***** ^ not supported yet
  665. 282 MsgFrame: ScrnTypes.DisplayFrame;
  666. ***** ^ not supported yet
  667. 283 LinesAdded, BytesAdded : INTEGER;
  668. 284 StartLine, CursorLine, CursorCol,
  669. 285 col1, row1, col2, row2, ListEnd : CARDINAL;
  670. 286 BytePos: LONGINT;
  671. 287 NextFrame: ScrnTypes.AFrameName;
  672. ***** ^ not supported yet
  673. 288 blank: CHAR;
  674. 289 BEGIN
  675. 290
  676. 291 blank := ' ';
  677. 292 GenLists.NewList( TmpList );
  678. ***** ^ not supported yet
  679. ***** ^ not supported yet
  680. ***** ^ not supported yet
  681. 293 GenLists.ListInsert( TheStr, GenLists.StrCode, TmpList, 1 );
  682. ***** ^ not supported yet
  683. ***** ^ not supported yet
  684. ***** ^ not supported yet
  685. ***** ^ not supported yet
  686. ***** ^ not supported yet
  687. ***** ^ not supported yet
  688. ***** ^ not supported yet
  689. 294
  690. 295 ListUtils.InsertIntoElmt( TmpList, 1, SYSTEM.ADR(blank), 1, 0 );
  691. ***** ^ not supported yet
  692. ***** ^ not supported yet
  693. ***** ^ not supported yet
  694. ***** ^ not supported yet
  695. ***** ^ not supported yet
  696. ***** ^ not supported yet
  697. ***** ^ not supported yet
  698. 296 (* We insert a blank so that ReformPara will know to put
  699. 297 a leading blank on each line; keeps message from crowding
  700. 298 left edge of box. *)
  701. 299
  702. 300 StartLine := 1;
  703. 301 CursorLine := 1;
  704. 302 CursorCol := 1;
  705. 303 BytePos := NumTypes.L0;
  706. ***** ^ not supported yet
  707. ***** ^ not supported yet
  708. 304 ListUtils.ReformPara( TmpList, 1, 32, StartLine,
  709. ***** ^ not supported yet
  710. ***** ^ not supported yet
  711. ***** ^ not supported yet
  712. 305 CursorLine, CursorCol, LinesAdded, BytesAdded, BytePos );
  713. ***** ^ not supported yet
  714. 306 (* We're reformatting twice here -- first to help us find
  715. 307 a good location for the window, and second to
  716. 308 determine how large the window should be. *)
  717. 309
  718. 310 StartLine := 1;
  719. 311 (* Reset StartLine because it moves to end of paragraph
  720. 312 in ReformPara above. *)
  721. 313 FindExteriorCoords( locatn, ListUtils.LongestLine(TmpList),
  722. ***** ^ not supported yet
  723. ***** ^ not supported yet
  724. ***** ^ not supported yet
  725. ***** ^ not supported yet
  726. ***** ^ not supported yet
  727. 314 GenLists.ListLength(TmpList), col1, row1, col2, row2 );
  728. ***** ^ not supported yet
  729. ***** ^ not supported yet
  730. ***** ^ not supported yet
  731. ***** ^ not supported yet
  732. 315
  733. 316 ListUtils.ReformPara( TmpList, 1, (col2 - col1) - 1, StartLine,
  734. ***** ^ not supported yet
  735. ***** ^ not supported yet
  736. ***** ^ not supported yet
  737. 317 CursorLine, CursorCol, LinesAdded, BytesAdded, BytePos );
  738. ***** ^ not supported yet
  739. 318 ListEnd := GenLists.ListLength(TmpList);
  740. ***** ^ not supported yet
  741. ***** ^ not supported yet
  742. ***** ^ not supported yet
  743. 319
  744. 320 ScrnTypes.InitDisplayFrame( MsgFrame, TheFrame^.WindowHandle );
  745. ***** ^ not supported yet
  746. ***** ^ not supported yet
  747. ***** ^ not supported yet
  748. ***** ^ not supported yet
  749. ***** ^ not supported yet
  750. 321
  751. 322 row2 := Numbers.Min( row2, row1 + ListEnd + 3 );
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. ***** ^ not supported yet
  755. 323 row2 := Numbers.Max( row2, row1 + 3 );
  756. ***** ^ not supported yet
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. 324 (*Make sure we've got at least a two line window.*)
  760. 325 MsgFrame^.startcol := col1;
  761. ***** ^ not supported yet
  762. ***** ^ not supported yet
  763. 326 MsgFrame^.startrow := row1;
  764. ***** ^ not supported yet
  765. ***** ^ not supported yet
  766. 327 MsgFrame^.endcol := col2;
  767. ***** ^ not supported yet
  768. ***** ^ not supported yet
  769. 328 MsgFrame^.endrow := row2;
  770. ***** ^ not supported yet
  771. ***** ^ not supported yet
  772. 329 MsgFrame^.action := 'I';
  773. ***** ^ not supported yet
  774. ***** ^ not supported yet
  775. 330 MsgFrame^.EntryBox := VWindows.SingleBox;
  776. ***** ^ not supported yet
  777. ***** ^ not supported yet
  778. ***** ^ not supported yet
  779. ***** ^ not supported yet
  780. 331 MsgFrame^.normfor := TheFrame^.msgfor;
  781. ***** ^ not supported yet
  782. ***** ^ not supported yet
  783. ***** ^ not supported yet
  784. ***** ^ not supported yet
  785. 332 MsgFrame^.normbak := TheFrame^.msgbak;
  786. ***** ^ not supported yet
  787. ***** ^ not supported yet
  788. ***** ^ not supported yet
  789. ***** ^ not supported yet
  790. 333 MsgFrame^.normatrb := TheFrame^.msgatrb;
  791. ***** ^ not supported yet
  792. ***** ^ not supported yet
  793. ***** ^ not supported yet
  794. ***** ^ not supported yet
  795. 334 ScrnUtl1.SetNormalColors( MsgFrame );
  796. ***** ^ not supported yet
  797. ***** ^ not supported yet
  798. ***** ^ not supported yet
  799. 335
  800. 336 ScrnUtl2.ListToFrame( TmpList, MsgFrame );
  801. ***** ^ not supported yet
  802. ***** ^ not supported yet
  803. ***** ^ not supported yet
  804. ***** ^ not supported yet
  805. 337
  806. 338 ControlUtils.AddMenuItem( MsgFrame, 4, ListEnd + 3,
  807. ***** ^ not supported yet
  808. ***** ^ not supported yet
  809. ***** ^ not supported yet
  810. 339 'Okay', 4, ORD('O'), 'Okay' );
  811. ***** ^ not supported yet
  812. ***** ^ undeclared identifier
  813. ***** ^ not supported yet
  814. ***** ^ not supported yet
  815. 340 ControlUtils.AddMenuItem( MsgFrame, 12, ListEnd + 3,
  816. ***** ^ not supported yet
  817. ***** ^ not supported yet
  818. ***** ^ not supported yet
  819. 341 'Cancel', 6, ORD('C'), 'Cancel' );
  820. ***** ^ not supported yet
  821. ***** ^ undeclared identifier
  822. ***** ^ not supported yet
  823. ***** ^ not supported yet
  824. 342
  825. 343 FramePainter.ShowDisplayFrame( MsgFrame, 0, 0, 0, 0 );
  826. ***** ^ not supported yet
  827. ***** ^ not supported yet
  828. ***** ^ not supported yet
  829. ***** ^ not supported yet
  830. 344 InputManager.ControlFrame( MsgFrame, 1, '', FALSE, NextFrame );
  831. ***** ^ not supported yet
  832. ***** ^ not supported yet
  833. ***** ^ not supported yet
  834. ***** ^ not supported yet
  835. 345 FrameManager.EraseFrame( MsgFrame );
  836. ***** ^ not supported yet
  837. ***** ^ not supported yet
  838. ***** ^ not supported yet
  839. 346 ScrnUtl2.CloseDisplayFrame( MsgFrame );
  840. ***** ^ not supported yet
  841. ***** ^ not supported yet
  842. ***** ^ not supported yet
  843. 347 InputManager.LookAlive( TheFrame );
  844. ***** ^ not supported yet
  845. ***** ^ not supported yet
  846. ***** ^ not supported yet
  847. 348
  848. 349 GenLists.DisposeList( TmpList );
  849. ***** ^ not supported yet
  850. ***** ^ not supported yet
  851. ***** ^ not supported yet
  852. 350 RETURN PosUtils.Equal( NextFrame, 'Okay' );
  853. ***** ^ not supported yet
  854. ***** ^ not supported yet
  855. ***** ^ not supported yet
  856. ***** ^ not supported yet
  857. 351 END MsgOkay;
  858. ***** ^ not supported yet
  859. 352
  860. 353 BEGIN
  861. 354 Initialized := FALSE;
  862. 355 Init();
  863. ***** ^ not supported yet
  864. ***** ^ not supported yet
  865. 356 END MsgBox2.
  866. ***** ^ not supported yet
  867. 509 errors