FRAMEPAI.LST 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493
  1. Listing:
  2. 1 IMPLEMENTATION MODULE FramePainter;
  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/framepai.mov 1.6 17 Mar 1991 17:55:28 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15
  17. 16 IMPORT FrameManager;
  18. 17 IMPORT GenLists;
  19. 18 IMPORT Key;
  20. 19 IMPORT LowLevel;
  21. 20 IMPORT M2Strings;
  22. 21 IMPORT MsColors;
  23. 22 IMPORT Numbers;
  24. 23 IMPORT FAPI;
  25. 24 IMPORT PosUtils;
  26. 25 IMPORT Rectangles;
  27. 26 IMPORT ScrnTypes;
  28. 27 IMPORT ScrnUtl1;
  29. 28 IMPORT StrEdit;
  30. 29 IMPORT SYSTEM;
  31. 30 IMPORT VWindows;
  32. 31
  33. 32 VAR
  34. 33 Initialized : BOOLEAN;
  35. 34
  36. 35 PROCEDURE Init();
  37. 36 BEGIN
  38. 37 IF Initialized THEN
  39. 38 RETURN;
  40. 39 ELSE
  41. 40 Initialized := TRUE;
  42. 41 END;
  43. 42 FrameManager.Init();
  44. ***** ^ not supported yet
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. 43 GenLists.Init();
  48. ***** ^ not supported yet
  49. ***** ^ not supported yet
  50. ***** ^ not supported yet
  51. 44 Key.Init();
  52. ***** ^ not supported yet
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. 45 LowLevel.Init();
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. 46 M2Strings.Init();
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. 47 MsColors.Init();
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. 48 Numbers.Init();
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. 49 PosUtils.Init();
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 50 Rectangles.Init();
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. 51 ScrnTypes.Init();
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. 52 ScrnUtl1.Init();
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. 53 StrEdit.Init();
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. 54 VWindows.Init();
  92. ***** ^ not supported yet
  93. ***** ^ not supported yet
  94. ***** ^ not supported yet
  95. 55 END Init;
  96. ***** ^ not supported yet
  97. 56
  98. 57
  99. 58 PROCEDURE InColorMode(): BOOLEAN;
  100. 59 VAR
  101. 60 ModeData: FAPI.VIOMODEINFO;
  102. ***** ^ not supported yet
  103. 61 BEGIN
  104. 62 ModeData.cb := SYSTEM.TSIZE(FAPI.VIOMODEINFO);
  105. ***** ^ not supported yet
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. 63 IF FAPI.VIOGETMODE(SYSTEM.ADR(ModeData), 0) # 0 THEN
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. 64 RETURN FALSE;
  119. 65 END;
  120. 66
  121. 67 IF ModeData.color = FAPI.UCHAR(0) THEN
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. ***** ^ not supported yet
  126. ***** ^ not supported yet
  127. 68 RETURN FALSE;
  128. 69 ELSE
  129. 70 RETURN TRUE;
  130. 71 END;
  131. 72 END InColorMode;
  132. ***** ^ not supported yet
  133. 73
  134. 74
  135. 75 PROCEDURE DrawLine( col1, row1, col2, row2: CARDINAL; TheChar:
  136. 76 CHAR );
  137. 77 VAR
  138. 78 row : CARDINAL;
  139. 79 linestr : ARRAY [0..80] OF CHAR;
  140. ***** ^ not supported yet
  141. ***** ^ not supported yet
  142. 80 BEGIN
  143. 81 IF col1 < col2 THEN
  144. 82 (*We're drawing a horizontal line.*)
  145. 83 LowLevel.Fill( SYSTEM.ADR(linestr), 1+HIGH(linestr), TheChar);
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. ***** ^ undeclared identifier
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. 84 StrEdit.SetLength( linestr, col2 - col1 +1);
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. ***** ^ not supported yet
  159. 85 VWindows.DrawStr( VWindows.CurrentWindow, col1, row1,
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. 86 SYSTEM.ADR(linestr), col2 - col1 + 1 );
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. ***** ^ not supported yet
  169. 87 ELSE
  170. 88 (*We're drawing a vertical line.*)
  171. 89 FOR row := row1 TO row2 DO
  172. 90 VWindows.DrawStr( VWindows.CurrentWindow, col1, row,
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. ***** ^ not supported yet
  176. ***** ^ not supported yet
  177. 91 SYSTEM.ADR(TheChar), 1 );
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. 92 END;
  183. 93 END;
  184. 94 END DrawLine;
  185. ***** ^ not supported yet
  186. 95
  187. 96
  188. 97 PROCEDURE GetFrameCoords( TheFrame: ScrnTypes.DisplayFrame; VAR
  189. ***** ^ not supported yet
  190. 98 rect: Rectangles.ARectangle );
  191. ***** ^ not supported yet
  192. 99 BEGIN
  193. 100 Rectangles.DefineRectangle( rect, TheFrame^.startcol +
  194. ***** ^ not supported yet
  195. ***** ^ not supported yet
  196. ***** ^ not supported yet
  197. ***** ^ not supported yet
  198. ***** ^ not supported yet
  199. 101 1, TheFrame^.startrow + 1, TheFrame^.endcol + 1,
  200. ***** ^ not supported yet
  201. ***** ^ not supported yet
  202. ***** ^ not supported yet
  203. ***** ^ not supported yet
  204. 102 TheFrame^.endrow + 1 )
  205. ***** ^ not supported yet
  206. ***** ^ not supported yet
  207. ***** ^ not supported yet
  208. 103 END GetFrameCoords;
  209. ***** ^ not supported yet
  210. 104
  211. 105
  212. 106 PROCEDURE RedrawEdField( TheFrame: ScrnTypes.DisplayFrame;
  213. ***** ^ not supported yet
  214. 107 FieldCount: CARDINAL; VAR area: Rectangles.ARectangle;
  215. ***** ^ not supported yet
  216. 108 Selected: BOOLEAN );
  217. 109 VAR
  218. 110 cnt, TypeCode, AbsCol, AbsRow, TmpLength,
  219. 111 EdFieldHeight, EdFieldWidth : CARDINAL;
  220. 112 TmpList: GenLists.GenList;
  221. ***** ^ not supported yet
  222. 113 TmpAdr: SYSTEM.ADDRESS;
  223. ***** ^ not supported yet
  224. 114 EdArea, intersection : Rectangles.ARectangle;
  225. ***** ^ not supported yet
  226. 115
  227. 116 PROCEDURE DrawPartOfStr( StrAdr: SYSTEM.ADDRESS; StrSize, col,
  228. ***** ^ not supported yet
  229. 117 row: CARDINAL; VAR area: Rectangles.ARectangle );
  230. ***** ^ not supported yet
  231. 118 VAR
  232. 119 StrArea, intersection : Rectangles.ARectangle;
  233. ***** ^ not supported yet
  234. 120 LeadChop: CARDINAL;
  235. 121 BEGIN
  236. 122 StrSize := LowLevel.ScanEQ( StrSize, 0C, StrAdr );
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. ***** ^ not supported yet
  240. 123 Rectangles.DefineRectangle( StrArea, col, row, col +
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 124 StrSize - 1, row );
  245. ***** ^ not supported yet
  246. 125 IF Rectangles.RectsIntersect( StrArea, area, intersection ) THEN
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. ***** ^ not supported yet
  251. ***** ^ not supported yet
  252. 126 IF StrSize # 0 THEN
  253. 127 (* Added this test 8 Nov 88 at suggestion of John
  254. 128 McMonagle because DrawStr does a NullScan if last
  255. 129 parameter is 0. *)
  256. 130 IF intersection.col1 > INTEGER(col) THEN
  257. ***** ^ not supported yet
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. 131 LeadChop := CARDINAL(intersection.col1) - col;
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. 132 ELSE
  264. 133 LeadChop := 0;
  265. 134 END;
  266. 135 VWindows.DrawStr( TheFrame^.WindowHandle,
  267. ***** ^ not supported yet
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. 136 intersection.col1, intersection.row1,
  272. ***** ^ not supported yet
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. 137 LowLevel.AddAddr(StrAdr, LeadChop), (intersection.col2 -
  277. ***** ^ not supported yet
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. 138 intersection.col1) + 1 );
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. ***** ^ not supported yet
  287. 139 END;
  288. 140 END;
  289. 141 END DrawPartOfStr;
  290. ***** ^ not supported yet
  291. 142
  292. 143 BEGIN
  293. 144 AbsRow := ScrnUtl1.AbsFieldRow( TheFrame, FieldCount );
  294. ***** ^ not supported yet
  295. ***** ^ not supported yet
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. 145 AbsCol := ScrnUtl1.AbsFieldCol( TheFrame, FieldCount );
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. ***** ^ not supported yet
  302. ***** ^ not supported yet
  303. 146 ScrnUtl1.GetEdField( TheFrame, FieldCount, TmpList );
  304. ***** ^ not supported yet
  305. ***** ^ not supported yet
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. 147 IF Selected THEN
  309. 148 ScrnUtl1.SetPointerBarColors( TheFrame );
  310. ***** ^ not supported yet
  311. ***** ^ not supported yet
  312. ***** ^ not supported yet
  313. 149 ELSE
  314. 150 ScrnUtl1.SetFieldColors( TheFrame, FieldCount );
  315. ***** ^ not supported yet
  316. ***** ^ not supported yet
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. 151 END;
  320. 152
  321. 153 EdFieldHeight := ScrnUtl1.FieldHeight( TheFrame, FieldCount );
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. 154 EdFieldWidth := ScrnUtl1.FieldWidth( TheFrame, FieldCount );
  327. ***** ^ not supported yet
  328. ***** ^ not supported yet
  329. ***** ^ not supported yet
  330. ***** ^ not supported yet
  331. 155 Rectangles.DefineRectangle( EdArea, AbsCol, AbsRow, AbsCol
  332. ***** ^ not supported yet
  333. ***** ^ not supported yet
  334. ***** ^ not supported yet
  335. 156 + EdFieldWidth - 1, AbsRow + EdFieldHeight - 1 );
  336. ***** ^ not supported yet
  337. 157 IF Rectangles.RectsIntersect( EdArea, area, intersection ) THEN
  338. ***** ^ not supported yet
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. ***** ^ not supported yet
  342. ***** ^ not supported yet
  343. 158 VWindows.ClearPart( TheFrame^.WindowHandle, intersection.col1,
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. 159 intersection.row1, intersection.col2, intersection.row2 );
  351. ***** ^ not supported yet
  352. ***** ^ not supported yet
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. 160 END;
  358. 161
  359. 162 EdFieldHeight := Numbers.Min( EdFieldHeight,
  360. ***** ^ not supported yet
  361. ***** ^ not supported yet
  362. 163 GenLists.ListLength( TmpList ) );
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. 164 (*EdFieldHeight gets the lesser of the full height
  367. 165 of the editor window or the number of lines
  368. 166 presently in it.*)
  369. 167
  370. 168 FOR cnt := 1 TO EdFieldHeight DO
  371. 169 (* write each row in editor window *)
  372. 170 GenLists.GetElmtAdr( TmpList, cnt, TmpAdr, TmpLength,
  373. ***** ^ not supported yet
  374. ***** ^ not supported yet
  375. ***** ^ not supported yet
  376. ***** ^ not supported yet
  377. 171 TypeCode );
  378. ***** ^ not supported yet
  379. 172 DrawPartOfStr( TmpAdr, TmpLength, AbsCol,
  380. ***** ^ not supported yet
  381. ***** ^ not supported yet
  382. 173 CARDINAL(AbsRow) + cnt - 1, intersection );
  383. ***** ^ not supported yet
  384. ***** ^ not supported yet
  385. 174 END;
  386. 175 END RedrawEdField;
  387. ***** ^ not supported yet
  388. 176
  389. 177
  390. 178
  391. 179 PROCEDURE RedrawArea( TheFrame: ScrnTypes.DisplayFrame; col1,
  392. ***** ^ not supported yet
  393. 180 row1, col2, row2: CARDINAL );
  394. 181 VAR
  395. 182 inside: BOOLEAN;
  396. 183 FrameRect, TheArea, intersection, EdRect,
  397. 184 EdToDraw: Rectangles.ARectangle;
  398. ***** ^ not supported yet
  399. 185 TmpFieldPtr: ScrnTypes.InputFieldPtr;
  400. ***** ^ not supported yet
  401. 186 ImagePtr: ScrnTypes.ImageElmtPtr;
  402. ***** ^ not supported yet
  403. 187 tmprow, tmpcol, tmpfield, LeadChop, EdFieldCount, ImageCount,
  404. 188 FieldListEnd, ImageListEnd,
  405. 189 TmpLength: CARDINAL;
  406. 190 EdFieldHeight, EdFieldWidth, AbsoluteRow, AbsoluteCol: INTEGER;
  407. 191 TheBox : VWindows.BoxStr;
  408. ***** ^ not supported yet
  409. 192 tmpforeg, tmpbackg: MsColors.AColor;
  410. ***** ^ not supported yet
  411. 193 tmpatrb: MsColors.AMonoAttribute;
  412. ***** ^ not supported yet
  413. 194 BEGIN
  414. 195 (* First, we find each field that's in the area we have to
  415. 196 redraw, taking TheFrame^.RowsScrolled and
  416. 197 TheFrame^.ColsScrolled into account.*)
  417. 198 GetFrameCoords( TheFrame, FrameRect );
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. 199 Rectangles.DefineRectangle( TheArea, col1, row1, col2, row2 );
  422. ***** ^ not supported yet
  423. ***** ^ not supported yet
  424. ***** ^ not supported yet
  425. ***** ^ not supported yet
  426. 200 (* We could check here to make sure TheArea is inside
  427. 201 FrameRect, but we'll let the caller be responsible for
  428. 202 that. *)
  429. 203 IF TheFrame^.ClearFirst THEN
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 204 (* clear underlying window if this screen is "ClearFirst" *)
  433. 205 ScrnUtl1.SetNormalColors( TheFrame );
  434. ***** ^ not supported yet
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. 206 VWindows.ClearPart( TheFrame^.WindowHandle, col1, row1, col2, row2 );
  438. ***** ^ not supported yet
  439. ***** ^ not supported yet
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. 207 END;
  444. 208 IF TheFrame^.EntryBox[0] # 0C THEN
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. 209 (* Oh no. We may have to restore some or all of the box. *)
  449. 210 Rectangles.ShrinkRect( FrameRect );
  450. ***** ^ not supported yet
  451. ***** ^ not supported yet
  452. ***** ^ not supported yet
  453. 211 IF Rectangles.RectIsInside( TheArea, FrameRect ) THEN
  454. ***** ^ not supported yet
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. 212 (* Breathe sigh of relief. TheArea does not extend
  459. 213 into the box. *)
  460. 214 Rectangles.ExpandRect( FrameRect );
  461. ***** ^ not supported yet
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. 215 ELSE
  465. 216 Rectangles.ExpandRect( FrameRect );
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. 217 IF Rectangles.RectsIntersect( FrameRect, TheArea, intersection ) THEN
  470. ***** ^ not supported yet
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. ***** ^ not supported yet
  475. 218 (* Actually, we already know they intersect; this just computes
  476. 219 the intersection for us. *)
  477. 220 END;
  478. 221 (* The code below is temporarily determining whether
  479. 222 the frame is active from capitalization of the
  480. 223 .action char. If it's uppercase, we know the
  481. 224 frame is inactive, so we redraw the ExitBox. *)
  482. 225 IF TheFrame^.action <= 'Z' THEN
  483. ***** ^ not supported yet
  484. ***** ^ not supported yet
  485. 226 TheBox := TheFrame^.ExitBox;
  486. ***** ^ not supported yet
  487. ***** ^ not supported yet
  488. ***** ^ not supported yet
  489. 227 ELSE
  490. 228 TheBox := TheFrame^.EntryBox;
  491. ***** ^ not supported yet
  492. ***** ^ not supported yet
  493. ***** ^ not supported yet
  494. 229 END;
  495. 230 ScrnUtl1.SetBorderColors( TheFrame );
  496. ***** ^ not supported yet
  497. ***** ^ not supported yet
  498. ***** ^ not supported yet
  499. 231 IF TheArea.col2 >= FrameRect.col2 THEN
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. ***** ^ not supported yet
  504. 232 DEC( col2 );
  505. ***** ^ undeclared identifier
  506. ***** ^ not supported yet
  507. 233 (* We're doing something tricky here. We know
  508. 234 there's a box, and we know the area to be
  509. 235 redrawn extends into it on the right side, so
  510. 236 that means we also know that col2 is wrong--the
  511. 237 area to be redrawn is actually one column less
  512. 238 wide than we had supposed. *)
  513. 239 DrawLine( intersection.col2, intersection.row1,
  514. ***** ^ not supported yet
  515. ***** ^ not supported yet
  516. ***** ^ not supported yet
  517. ***** ^ not supported yet
  518. ***** ^ not supported yet
  519. 240 intersection.col2, intersection.row2, TheBox[4] );
  520. ***** ^ not supported yet
  521. ***** ^ not supported yet
  522. ***** ^ not supported yet
  523. ***** ^ not supported yet
  524. ***** ^ not supported yet
  525. ***** ^ not supported yet
  526. 241 IF intersection.row1 = FrameRect.row1 THEN
  527. ***** ^ not supported yet
  528. ***** ^ not supported yet
  529. ***** ^ not supported yet
  530. ***** ^ not supported yet
  531. 242 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col2,
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. ***** ^ not supported yet
  536. ***** ^ not supported yet
  537. ***** ^ not supported yet
  538. 243 intersection.row1, SYSTEM.ADR(TheBox[2]), 1 );
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. ***** ^ not supported yet
  546. 244 END;
  547. 245 IF intersection.row2 = FrameRect.row2 THEN
  548. ***** ^ not supported yet
  549. ***** ^ not supported yet
  550. ***** ^ not supported yet
  551. ***** ^ not supported yet
  552. 246 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col2,
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. ***** ^ not supported yet
  558. ***** ^ not supported yet
  559. 247 intersection.row2, SYSTEM.ADR(TheBox[7]), 1 );
  560. ***** ^ not supported yet
  561. ***** ^ not supported yet
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. ***** ^ not supported yet
  565. ***** ^ not supported yet
  566. ***** ^ not supported yet
  567. 248 END;
  568. 249 END;
  569. 250 IF TheArea.col1 <= FrameRect.col1 THEN
  570. ***** ^ not supported yet
  571. ***** ^ not supported yet
  572. ***** ^ not supported yet
  573. ***** ^ not supported yet
  574. 251 INC( col1 );
  575. ***** ^ undeclared identifier
  576. ***** ^ not supported yet
  577. 252 DrawLine( intersection.col1, intersection.row1,
  578. ***** ^ not supported yet
  579. ***** ^ not supported yet
  580. ***** ^ not supported yet
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. 253 intersection.col1, intersection.row2, TheBox[3] );
  584. ***** ^ not supported yet
  585. ***** ^ not supported yet
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. 254 IF intersection.row1 = FrameRect.row1 THEN
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. ***** ^ not supported yet
  594. ***** ^ not supported yet
  595. 255 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col1,
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. ***** ^ not supported yet
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. 256 intersection.row1, SYSTEM.ADR(TheBox[0]), 1 );
  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. ***** ^ not supported yet
  610. 257 END;
  611. 258 IF intersection.row2 = FrameRect.row2 THEN
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. ***** ^ not supported yet
  615. ***** ^ not supported yet
  616. 259 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col1,
  617. ***** ^ not supported yet
  618. ***** ^ not supported yet
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. ***** ^ not supported yet
  622. ***** ^ not supported yet
  623. 260 intersection.row2, SYSTEM.ADR(TheBox[5]), 1 );
  624. ***** ^ not supported yet
  625. ***** ^ not supported yet
  626. ***** ^ not supported yet
  627. ***** ^ not supported yet
  628. ***** ^ not supported yet
  629. ***** ^ not supported yet
  630. ***** ^ not supported yet
  631. 261 END;
  632. 262 END;
  633. 263 IF TheArea.row2 >= FrameRect.row2 THEN
  634. ***** ^ not supported yet
  635. ***** ^ not supported yet
  636. ***** ^ not supported yet
  637. ***** ^ not supported yet
  638. 264 DEC( row2 );
  639. ***** ^ undeclared identifier
  640. ***** ^ not supported yet
  641. 265 DrawLine( intersection.col1, intersection.row2,
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. ***** ^ not supported yet
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. 266 intersection.col2, intersection.row2, TheBox[6] );
  648. ***** ^ not supported yet
  649. ***** ^ not supported yet
  650. ***** ^ not supported yet
  651. ***** ^ not supported yet
  652. ***** ^ not supported yet
  653. ***** ^ not supported yet
  654. 267 IF intersection.col1 = FrameRect.col1 THEN
  655. ***** ^ not supported yet
  656. ***** ^ not supported yet
  657. ***** ^ not supported yet
  658. ***** ^ not supported yet
  659. 268 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col1,
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. ***** ^ not supported yet
  663. ***** ^ not supported yet
  664. ***** ^ not supported yet
  665. ***** ^ not supported yet
  666. 269 intersection.row2, SYSTEM.ADR(TheBox[5]), 1 );
  667. ***** ^ not supported yet
  668. ***** ^ not supported yet
  669. ***** ^ not supported yet
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. ***** ^ not supported yet
  673. ***** ^ not supported yet
  674. 270 END;
  675. 271 IF intersection.col2 = FrameRect.col2 THEN
  676. ***** ^ not supported yet
  677. ***** ^ not supported yet
  678. ***** ^ not supported yet
  679. ***** ^ not supported yet
  680. 272 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col2,
  681. ***** ^ not supported yet
  682. ***** ^ not supported yet
  683. ***** ^ not supported yet
  684. ***** ^ not supported yet
  685. ***** ^ not supported yet
  686. ***** ^ not supported yet
  687. 273 intersection.row2, SYSTEM.ADR(TheBox[7]), 1 );
  688. ***** ^ not supported yet
  689. ***** ^ not supported yet
  690. ***** ^ not supported yet
  691. ***** ^ not supported yet
  692. ***** ^ not supported yet
  693. ***** ^ not supported yet
  694. ***** ^ not supported yet
  695. 274 END;
  696. 275 END;
  697. 276 IF TheArea.row1 <= FrameRect.row1 THEN
  698. ***** ^ not supported yet
  699. ***** ^ not supported yet
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. 277 INC( row1 );
  703. ***** ^ undeclared identifier
  704. ***** ^ not supported yet
  705. 278 DrawLine( intersection.col1, intersection.row1,
  706. ***** ^ not supported yet
  707. ***** ^ not supported yet
  708. ***** ^ not supported yet
  709. ***** ^ not supported yet
  710. ***** ^ not supported yet
  711. 279 intersection.col2, intersection.row1, TheBox[1] );
  712. ***** ^ not supported yet
  713. ***** ^ not supported yet
  714. ***** ^ not supported yet
  715. ***** ^ not supported yet
  716. ***** ^ not supported yet
  717. ***** ^ not supported yet
  718. 280 IF intersection.col1 = FrameRect.col1 THEN
  719. ***** ^ not supported yet
  720. ***** ^ not supported yet
  721. ***** ^ not supported yet
  722. ***** ^ not supported yet
  723. 281 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col1,
  724. ***** ^ not supported yet
  725. ***** ^ not supported yet
  726. ***** ^ not supported yet
  727. ***** ^ not supported yet
  728. ***** ^ not supported yet
  729. ***** ^ not supported yet
  730. 282 intersection.row1, SYSTEM.ADR(TheBox[0]), 1 );
  731. ***** ^ not supported yet
  732. ***** ^ not supported yet
  733. ***** ^ not supported yet
  734. ***** ^ not supported yet
  735. ***** ^ not supported yet
  736. ***** ^ not supported yet
  737. ***** ^ not supported yet
  738. 283 END;
  739. 284 IF intersection.col2 = FrameRect.col2 THEN
  740. ***** ^ not supported yet
  741. ***** ^ not supported yet
  742. ***** ^ not supported yet
  743. ***** ^ not supported yet
  744. 285 VWindows.DrawStr( VWindows.CurrentWindow, intersection.col2,
  745. ***** ^ not supported yet
  746. ***** ^ not supported yet
  747. ***** ^ not supported yet
  748. ***** ^ not supported yet
  749. ***** ^ not supported yet
  750. ***** ^ not supported yet
  751. 286 intersection.row1, SYSTEM.ADR(TheBox[2]), 1 );
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. ***** ^ not supported yet
  755. ***** ^ not supported yet
  756. ***** ^ not supported yet
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. 287 END;
  760. 288 END;
  761. 289 ScrnUtl1.SetNormalColors( TheFrame );
  762. ***** ^ not supported yet
  763. ***** ^ not supported yet
  764. ***** ^ not supported yet
  765. 290 END;
  766. 291 END;
  767. 292 IF NOT GenLists.Initialized( TheFrame^.ImageList ) THEN
  768. ***** ^ not supported yet
  769. ***** ^ not supported yet
  770. ***** ^ not supported yet
  771. ***** ^ not supported yet
  772. 293 RETURN;
  773. 294 END;
  774. 295 EdFieldCount := 0;
  775. 296 ImageCount := 1;
  776. 297 ImageListEnd := ScrnUtl1.NumberOfImages( TheFrame );
  777. ***** ^ not supported yet
  778. ***** ^ not supported yet
  779. ***** ^ not supported yet
  780. 298 WHILE ImageCount <= ImageListEnd DO
  781. 299 ScrnUtl1.GetImagePtr( TheFrame, ImageCount, ImagePtr );
  782. ***** ^ not supported yet
  783. ***** ^ not supported yet
  784. ***** ^ not supported yet
  785. ***** ^ not supported yet
  786. 300 TmpLength := M2Strings.Length(ImagePtr^.text);
  787. ***** ^ not supported yet
  788. ***** ^ not supported yet
  789. ***** ^ not supported yet
  790. ***** ^ not supported yet
  791. 301 tmprow := ImagePtr^.row;
  792. ***** ^ not supported yet
  793. ***** ^ not supported yet
  794. 302 tmpcol := ImagePtr^.col;
  795. ***** ^ not supported yet
  796. ***** ^ not supported yet
  797. 303 tmpfield := ImagePtr^.field;
  798. ***** ^ not supported yet
  799. ***** ^ not supported yet
  800. 304 tmpforeg := ImagePtr^.foreg;
  801. ***** ^ not supported yet
  802. ***** ^ not supported yet
  803. ***** ^ not supported yet
  804. 305 tmpbackg := ImagePtr^.backg;
  805. ***** ^ not supported yet
  806. ***** ^ not supported yet
  807. ***** ^ not supported yet
  808. 306 tmpatrb := ImagePtr^.atrb;
  809. ***** ^ not supported yet
  810. ***** ^ not supported yet
  811. ***** ^ not supported yet
  812. 307
  813. 308 ScrnUtl1.DecodeWord( tmprow );
  814. ***** ^ not supported yet
  815. ***** ^ not supported yet
  816. ***** ^ not supported yet
  817. 309 ScrnUtl1.DecodeWord( tmpcol );
  818. ***** ^ not supported yet
  819. ***** ^ not supported yet
  820. ***** ^ not supported yet
  821. 310 ScrnUtl1.DecodeWord( tmpfield );
  822. ***** ^ not supported yet
  823. ***** ^ not supported yet
  824. ***** ^ not supported yet
  825. 311 ScrnUtl1.DecodeByte( tmpforeg );
  826. ***** ^ not supported yet
  827. ***** ^ not supported yet
  828. ***** ^ not supported yet
  829. 312 ScrnUtl1.DecodeByte( tmpbackg );
  830. ***** ^ not supported yet
  831. ***** ^ not supported yet
  832. ***** ^ not supported yet
  833. 313 ScrnUtl1.DecodeByte( tmpatrb );
  834. ***** ^ not supported yet
  835. ***** ^ not supported yet
  836. ***** ^ not supported yet
  837. 314
  838. 315 IF tmprow <= TheFrame^.headline THEN
  839. ***** ^ not supported yet
  840. ***** ^ not supported yet
  841. 316 (* Is this image element protected from scrolling? *)
  842. 317 AbsoluteRow := INTEGER(TheFrame^.startrow + tmprow);
  843. ***** ^ not supported yet
  844. ***** ^ not supported yet
  845. ***** ^ not supported yet
  846. 318 (* If so, it's always going to be in the same place; we
  847. 319 don't have to subtract RowsScrolled to find out where
  848. 320 to write it. *)
  849. 321 ELSE
  850. 322 (* This image element is not protected from scrolling; we
  851. 323 have to add the absolute starting row of the window and
  852. 324 then subtract RowsScrolled to find out where to write it. *)
  853. 325 AbsoluteRow := INTEGER(TheFrame^.startrow + tmprow)
  854. ***** ^ not supported yet
  855. ***** ^ not supported yet
  856. ***** ^ not supported yet
  857. 326 - INTEGER( TheFrame^.RowsScrolled );
  858. ***** ^ not supported yet
  859. ***** ^ not supported yet
  860. 327 IF AbsoluteRow <= INTEGER(TheFrame^.startrow + TheFrame^.headline)
  861. ***** ^ not supported yet
  862. ***** ^ not supported yet
  863. ***** ^ not supported yet
  864. ***** ^ not supported yet
  865. 328 THEN
  866. 329 (* Image element has been scrolled up out of the visible
  867. 330 part of the window; it's either underneath the area
  868. 331 protected by the headline, or it's above the window
  869. 332 altogether; could be negative. *)
  870. 333 AbsoluteRow := AbsoluteRow - INTEGER( TheFrame^.headline );
  871. ***** ^ not supported yet
  872. ***** ^ not supported yet
  873. 334 END;
  874. 335 END;
  875. 336 (*A negative value for AbsoluteRow here indicates
  876. 337 that the field would have been scrolled off the top
  877. 338 of the screen.*)
  878. 339 AbsoluteCol := INTEGER(TheFrame^.startcol + tmpcol)
  879. ***** ^ not supported yet
  880. ***** ^ not supported yet
  881. ***** ^ not supported yet
  882. 340 - INTEGER( TheFrame^.ColsScrolled );
  883. ***** ^ not supported yet
  884. ***** ^ not supported yet
  885. 341
  886. 342 LeadChop := 0;
  887. 343
  888. 344
  889. 345 IF (tmpfield # 0) THEN
  890. 346 ScrnUtl1.GetFieldPtr( TheFrame, tmpfield, TmpFieldPtr );
  891. ***** ^ not supported yet
  892. ***** ^ not supported yet
  893. ***** ^ not supported yet
  894. ***** ^ not supported yet
  895. 347 END;
  896. 348 IF (tmpfield # 0) AND (TmpFieldPtr^.typ = ScrnTypes.EditorCode) THEN
  897. ***** ^ not supported yet
  898. ***** ^ not supported yet
  899. ***** ^ not supported yet
  900. ***** ^ not supported yet
  901. 349 AbsoluteRow := ScrnUtl1.AbsFieldRow( TheFrame, tmpfield );
  902. ***** ^ not supported yet
  903. ***** ^ not supported yet
  904. ***** ^ not supported yet
  905. ***** ^ not supported yet
  906. 350 AbsoluteCol := ScrnUtl1.AbsFieldCol( TheFrame, tmpfield );
  907. ***** ^ not supported yet
  908. ***** ^ not supported yet
  909. ***** ^ not supported yet
  910. ***** ^ not supported yet
  911. 351 EdFieldHeight := ScrnUtl1.FieldHeight( TheFrame, tmpfield );
  912. ***** ^ not supported yet
  913. ***** ^ not supported yet
  914. ***** ^ not supported yet
  915. ***** ^ not supported yet
  916. 352 EdFieldWidth := ScrnUtl1.FieldWidth( TheFrame, tmpfield );
  917. ***** ^ not supported yet
  918. ***** ^ not supported yet
  919. ***** ^ not supported yet
  920. ***** ^ not supported yet
  921. 353 Rectangles.DefineRectangle(EdRect , AbsoluteCol, AbsoluteRow,
  922. ***** ^ not supported yet
  923. ***** ^ not supported yet
  924. ***** ^ not supported yet
  925. 354 (AbsoluteCol + EdFieldWidth) - 1,
  926. 355 (AbsoluteRow + EdFieldHeight) - 1 );
  927. ***** ^ not supported yet
  928. 356
  929. 357 inside := Rectangles.RectsIntersect(TheArea,EdRect,EdToDraw);
  930. ***** ^ not supported yet
  931. ***** ^ not supported yet
  932. ***** ^ not supported yet
  933. ***** ^ not supported yet
  934. ***** ^ not supported yet
  935. 358 ELSE
  936. 359 IF NOT Numbers.IntIsBetween(row1, AbsoluteRow, row2) THEN
  937. ***** ^ not supported yet
  938. ***** ^ not supported yet
  939. ***** ^ not supported yet
  940. 360 inside := FALSE;
  941. 361 ELSIF (AbsoluteCol > INTEGER(col2)) THEN
  942. ***** ^ not supported yet
  943. 362 inside := FALSE;
  944. 363 ELSIF (AbsoluteCol < INTEGER(col1)) THEN
  945. ***** ^ not supported yet
  946. 364 IF (AbsoluteCol + INTEGER(TmpLength)) < INTEGER(col1) THEN
  947. ***** ^ not supported yet
  948. ***** ^ not supported yet
  949. 365 inside := FALSE;
  950. 366 ELSE
  951. 367 LeadChop := CARDINAL(INTEGER(col1) - AbsoluteCol);
  952. ***** ^ not supported yet
  953. ***** ^ not supported yet
  954. 368 inside := TRUE;
  955. 369 END;
  956. 370 ELSE
  957. 371 inside := TRUE;
  958. 372 END;
  959. 373 END;
  960. 374
  961. 375 IF inside THEN
  962. 376 IF (tmpfield # 0) THEN
  963. 377 (* Uh oh. It's not a normal piece of text. *)
  964. 378 IF (TmpFieldPtr^.typ = ScrnTypes.GroupMember) AND
  965. ***** ^ not supported yet
  966. ***** ^ not supported yet
  967. ***** ^ not supported yet
  968. ***** ^ not supported yet
  969. 379 TmpFieldPtr^.selected THEN
  970. ***** ^ not supported yet
  971. ***** ^ not supported yet
  972. 380 (* It's a choice field (member of a group) and it's
  973. 381 selected, so we use selection colors *)
  974. 382 ScrnUtl1.SetSelectionColors( TheFrame );
  975. ***** ^ not supported yet
  976. ***** ^ not supported yet
  977. ***** ^ not supported yet
  978. 383 ELSIF (TmpFieldPtr^.typ = ScrnTypes.EditorCode) AND
  979. ***** ^ not supported yet
  980. ***** ^ not supported yet
  981. ***** ^ not supported yet
  982. ***** ^ not supported yet
  983. 384 (EdFieldCount = 0) THEN
  984. 385 (* Note the first editor field, but don't write it. Editor
  985. 386 fields have to be written last because
  986. 387 lines below onto which the bottom part of the editor field
  987. 388 overlaps may not be in the background color. Spaces will
  988. 389 be written over them in whatever that color is, and we
  989. 390 don't want to wipe out the bottom of the editor field. *)
  990. 391 EdFieldCount := tmpfield;
  991. 392 ELSE
  992. 393 (* use normal colors for this field*)
  993. 394 ScrnUtl1.SetFieldColors( TheFrame, tmpfield );
  994. ***** ^ not supported yet
  995. ***** ^ not supported yet
  996. ***** ^ not supported yet
  997. ***** ^ not supported yet
  998. 395 END;
  999. 396 ELSE
  1000. 397 (* use normal colors for this field*)
  1001. 398 VWindows.SetForeColor( TheFrame^.WindowHandle,
  1002. ***** ^ not supported yet
  1003. ***** ^ not supported yet
  1004. ***** ^ not supported yet
  1005. ***** ^ not supported yet
  1006. 399 tmpforeg );
  1007. ***** ^ not supported yet
  1008. 400 VWindows.SetBackColor( TheFrame^.WindowHandle,
  1009. ***** ^ not supported yet
  1010. ***** ^ not supported yet
  1011. ***** ^ not supported yet
  1012. ***** ^ not supported yet
  1013. 401 tmpbackg );
  1014. ***** ^ not supported yet
  1015. 402 VWindows.SetMonoAttr( TheFrame^.WindowHandle,
  1016. ***** ^ not supported yet
  1017. ***** ^ not supported yet
  1018. ***** ^ not supported yet
  1019. ***** ^ not supported yet
  1020. 403 tmpatrb );
  1021. ***** ^ not supported yet
  1022. 404 END;
  1023. 405 IF (tmpfield = 0) OR (TmpFieldPtr^.typ # ScrnTypes.EditorCode) THEN
  1024. ***** ^ not supported yet
  1025. ***** ^ not supported yet
  1026. ***** ^ not supported yet
  1027. ***** ^ not supported yet
  1028. 406 IF (AbsoluteCol + INTEGER(TmpLength)) >= (INTEGER(col2) + 1) THEN
  1029. ***** ^ not supported yet
  1030. ***** ^ not supported yet
  1031. 407 (*If the string would extend past the right boundary.*)
  1032. 408 TmpLength := CARDINAL((( INTEGER(col2) - AbsoluteCol)
  1033. ***** ^ not supported yet
  1034. 409 + 1) - INTEGER(LeadChop));
  1035. ***** ^ not supported yet
  1036. 410 VWindows.DrawStr( TheFrame^.WindowHandle,
  1037. ***** ^ not supported yet
  1038. ***** ^ not supported yet
  1039. ***** ^ not supported yet
  1040. ***** ^ not supported yet
  1041. 411 CARDINAL( (AbsoluteCol + INTEGER(LeadChop))),
  1042. ***** ^ not supported yet
  1043. ***** ^ not supported yet
  1044. 412 CARDINAL(AbsoluteRow),
  1045. ***** ^ not supported yet
  1046. 413 LowLevel.AddAddr(SYSTEM.ADR(ImagePtr^.text),
  1047. ***** ^ not supported yet
  1048. ***** ^ not supported yet
  1049. ***** ^ not supported yet
  1050. ***** ^ not supported yet
  1051. ***** ^ not supported yet
  1052. ***** ^ not supported yet
  1053. 414 LeadChop), TmpLength );
  1054. ***** ^ not supported yet
  1055. ***** ^ not supported yet
  1056. 415 ELSE
  1057. 416 VWindows.DrawStr( TheFrame^.WindowHandle,
  1058. ***** ^ not supported yet
  1059. ***** ^ not supported yet
  1060. ***** ^ not supported yet
  1061. ***** ^ not supported yet
  1062. 417 CARDINAL( (AbsoluteCol + INTEGER(LeadChop))),
  1063. ***** ^ not supported yet
  1064. ***** ^ not supported yet
  1065. 418 CARDINAL(AbsoluteRow),
  1066. ***** ^ not supported yet
  1067. 419 LowLevel.AddAddr(SYSTEM.ADR(ImagePtr^.text),
  1068. ***** ^ not supported yet
  1069. ***** ^ not supported yet
  1070. ***** ^ not supported yet
  1071. ***** ^ not supported yet
  1072. ***** ^ not supported yet
  1073. ***** ^ not supported yet
  1074. 420 LeadChop), TmpLength - LeadChop );
  1075. ***** ^ not supported yet
  1076. ***** ^ not supported yet
  1077. 421 END;
  1078. 422 END;
  1079. 423 END;
  1080. 424 INC( ImageCount );
  1081. ***** ^ undeclared identifier
  1082. ***** ^ not supported yet
  1083. 425 END;
  1084. 426 IF EdFieldCount = 0 THEN
  1085. 427 RETURN;
  1086. 428 END;
  1087. 429 FieldListEnd := ScrnUtl1.FieldListTotal( TheFrame );
  1088. ***** ^ not supported yet
  1089. ***** ^ not supported yet
  1090. ***** ^ not supported yet
  1091. 430 WHILE (EdFieldCount <= FieldListEnd) DO
  1092. 431 ScrnUtl1.GetFieldPtr( TheFrame, EdFieldCount, TmpFieldPtr );
  1093. ***** ^ not supported yet
  1094. ***** ^ not supported yet
  1095. ***** ^ not supported yet
  1096. ***** ^ not supported yet
  1097. 432 IF (TmpFieldPtr^.typ = ScrnTypes.EditorCode) THEN
  1098. ***** ^ not supported yet
  1099. ***** ^ not supported yet
  1100. ***** ^ not supported yet
  1101. ***** ^ not supported yet
  1102. 433 (* It's an editor field. *)
  1103. 434 AbsoluteRow := ScrnUtl1.AbsFieldRow( TheFrame, EdFieldCount );
  1104. ***** ^ not supported yet
  1105. ***** ^ not supported yet
  1106. ***** ^ not supported yet
  1107. ***** ^ not supported yet
  1108. 435 AbsoluteCol := ScrnUtl1.AbsFieldCol( TheFrame, EdFieldCount );
  1109. ***** ^ not supported yet
  1110. ***** ^ not supported yet
  1111. ***** ^ not supported yet
  1112. ***** ^ not supported yet
  1113. 436 EdFieldHeight := ScrnUtl1.FieldHeight( TheFrame, EdFieldCount );
  1114. ***** ^ not supported yet
  1115. ***** ^ not supported yet
  1116. ***** ^ not supported yet
  1117. ***** ^ not supported yet
  1118. 437 EdFieldWidth := ScrnUtl1.FieldWidth( TheFrame, EdFieldCount );
  1119. ***** ^ not supported yet
  1120. ***** ^ not supported yet
  1121. ***** ^ not supported yet
  1122. ***** ^ not supported yet
  1123. 438 Rectangles.DefineRectangle(EdRect , AbsoluteCol, AbsoluteRow,
  1124. ***** ^ not supported yet
  1125. ***** ^ not supported yet
  1126. ***** ^ not supported yet
  1127. 439 (AbsoluteCol + EdFieldWidth) - 1,
  1128. 440 AbsoluteRow + EdFieldHeight - 1 );
  1129. ***** ^ not supported yet
  1130. 441 IF Rectangles.RectsIntersect(TheArea,EdRect,EdToDraw) THEN
  1131. ***** ^ not supported yet
  1132. ***** ^ not supported yet
  1133. ***** ^ not supported yet
  1134. ***** ^ not supported yet
  1135. ***** ^ not supported yet
  1136. 442 (* We now know we have to display at least part of
  1137. 443 the editor field *)
  1138. 444 RedrawEdField( TheFrame, EdFieldCount, EdToDraw, FALSE );
  1139. ***** ^ not supported yet
  1140. ***** ^ not supported yet
  1141. ***** ^ not supported yet
  1142. ***** ^ not supported yet
  1143. 445 END;
  1144. 446 END;
  1145. 447 INC( EdFieldCount );
  1146. ***** ^ undeclared identifier
  1147. ***** ^ not supported yet
  1148. 448 END;
  1149. 449 END RedrawArea;
  1150. ***** ^ not supported yet
  1151. 450
  1152. 451
  1153. 452 PROCEDURE RedrawField( TheFrame: ScrnTypes.DisplayFrame; TheField:
  1154. ***** ^ not supported yet
  1155. 453 CARDINAL; Selected: BOOLEAN );
  1156. 454 (* Selected tells us whether the pointer bar is on this
  1157. 455 field, not whether it's a selected member of a choice
  1158. 456 group; we'll figure out the latter from the field
  1159. 457 itself.*)
  1160. 458 VAR
  1161. 459 FieldRec: ScrnTypes.InputFieldRecord;
  1162. ***** ^ not supported yet
  1163. 460 ImageRec: ScrnTypes.ImageElement;
  1164. ***** ^ not supported yet
  1165. 461 spot : CARDINAL;
  1166. 462 CurrentChoice, save : BOOLEAN;
  1167. 463 SelChar: ARRAY [0..0] OF CHAR;
  1168. ***** ^ not supported yet
  1169. ***** ^ not supported yet
  1170. 464 FrameArea : Rectangles.ARectangle;
  1171. ***** ^ not supported yet
  1172. 465 BEGIN
  1173. 466 CurrentChoice := FALSE;
  1174. 467 ScrnUtl1.GetFieldRec( TheFrame, TheField, FieldRec );
  1175. ***** ^ not supported yet
  1176. ***** ^ not supported yet
  1177. ***** ^ not supported yet
  1178. ***** ^ not supported yet
  1179. 468 ScrnUtl1.GetFieldImageRec( TheFrame, TheField, ImageRec );
  1180. ***** ^ not supported yet
  1181. ***** ^ not supported yet
  1182. ***** ^ not supported yet
  1183. ***** ^ not supported yet
  1184. 469 IF Selected THEN
  1185. 470 ScrnUtl1.SetPointerBarColors( TheFrame );
  1186. ***** ^ not supported yet
  1187. ***** ^ not supported yet
  1188. ***** ^ not supported yet
  1189. 471 ELSIF (FieldRec.typ = ScrnTypes.GroupMember) AND
  1190. ***** ^ not supported yet
  1191. ***** ^ not supported yet
  1192. ***** ^ not supported yet
  1193. ***** ^ not supported yet
  1194. 472 (FieldRec.selected) THEN
  1195. ***** ^ not supported yet
  1196. ***** ^ not supported yet
  1197. 473 CurrentChoice := TRUE;
  1198. 474 (* We do this to prevent selection character from being
  1199. 475 highlighted if the choice is already selected. *)
  1200. 476 ScrnUtl1.SetSelectionColors( TheFrame );
  1201. ***** ^ not supported yet
  1202. ***** ^ not supported yet
  1203. ***** ^ not supported yet
  1204. 477 ELSE
  1205. 478 ScrnUtl1.SetFieldColors( TheFrame, TheField );
  1206. ***** ^ not supported yet
  1207. ***** ^ not supported yet
  1208. ***** ^ not supported yet
  1209. ***** ^ not supported yet
  1210. 479 END;
  1211. 480 IF (FieldRec.typ = ScrnTypes.EditorCode) THEN
  1212. ***** ^ not supported yet
  1213. ***** ^ not supported yet
  1214. ***** ^ not supported yet
  1215. ***** ^ not supported yet
  1216. 481 Rectangles.DefineRectangle( FrameArea, TheFrame^.startcol + 1,
  1217. ***** ^ not supported yet
  1218. ***** ^ not supported yet
  1219. ***** ^ not supported yet
  1220. ***** ^ not supported yet
  1221. ***** ^ not supported yet
  1222. 482 TheFrame^.startrow + 1, TheFrame^.endcol + 1,
  1223. ***** ^ not supported yet
  1224. ***** ^ not supported yet
  1225. ***** ^ not supported yet
  1226. ***** ^ not supported yet
  1227. 483 TheFrame^.endrow + 1 );
  1228. ***** ^ not supported yet
  1229. ***** ^ not supported yet
  1230. ***** ^ not supported yet
  1231. 484 RedrawEdField( TheFrame, TheField, FrameArea, Selected );
  1232. ***** ^ not supported yet
  1233. ***** ^ not supported yet
  1234. ***** ^ not supported yet
  1235. ***** ^ not supported yet
  1236. 485 RETURN;
  1237. 486 END;
  1238. 487 ScrnUtl1.GetFieldImageRec( TheFrame, TheField, ImageRec );
  1239. ***** ^ not supported yet
  1240. ***** ^ not supported yet
  1241. ***** ^ not supported yet
  1242. ***** ^ not supported yet
  1243. 488 VWindows.DrawStr( TheFrame^.WindowHandle,
  1244. ***** ^ not supported yet
  1245. ***** ^ not supported yet
  1246. ***** ^ not supported yet
  1247. ***** ^ not supported yet
  1248. 489 ImageRec.col + TheFrame^.startcol - TheFrame^.ColsScrolled,
  1249. ***** ^ not supported yet
  1250. ***** ^ not supported yet
  1251. ***** ^ not supported yet
  1252. ***** ^ not supported yet
  1253. ***** ^ not supported yet
  1254. ***** ^ not supported yet
  1255. 490 ImageRec.row + TheFrame^.startrow - TheFrame^.RowsScrolled,
  1256. ***** ^ not supported yet
  1257. ***** ^ not supported yet
  1258. ***** ^ not supported yet
  1259. ***** ^ not supported yet
  1260. ***** ^ not supported yet
  1261. ***** ^ not supported yet
  1262. 491 SYSTEM.ADR(ImageRec.text), M2Strings.Length(ImageRec.text) );
  1263. ***** ^ not supported yet
  1264. ***** ^ not supported yet
  1265. ***** ^ not supported yet
  1266. ***** ^ not supported yet
  1267. ***** ^ not supported yet
  1268. ***** ^ not supported yet
  1269. ***** ^ not supported yet
  1270. ***** ^ not supported yet
  1271. 492
  1272. 493 (*Now hilite the selection character, if there is one.*)
  1273. 494 IF CurrentChoice OR (Selected AND NOT InColorMode()) THEN
  1274. ***** ^ not supported yet
  1275. ***** ^ not supported yet
  1276. 495
  1277. 496 (*Don't bother if it's a choice field in selection
  1278. 497 colors, and don't bother if the field is already
  1279. 498 selected and the screen isn't in a color mode.*)
  1280. 499 RETURN;
  1281. 500 END;
  1282. 501 IF (FieldRec.typ = ScrnTypes.GroupMember) AND
  1283. ***** ^ not supported yet
  1284. ***** ^ not supported yet
  1285. ***** ^ not supported yet
  1286. ***** ^ not supported yet
  1287. 502 (FieldRec.ChoiceKey <= Key.Extended) THEN
  1288. ***** ^ not supported yet
  1289. ***** ^ not supported yet
  1290. ***** ^ not supported yet
  1291. ***** ^ not supported yet
  1292. 503 SelChar[0] := CHR(FieldRec.ChoiceKey);
  1293. ***** ^ not supported yet
  1294. ***** ^ not supported yet
  1295. ***** ^ undeclared identifier
  1296. ***** ^ not supported yet
  1297. ***** ^ not supported yet
  1298. 504 ELSIF (FieldRec.typ = ScrnTypes.GotoCode) AND
  1299. ***** ^ not supported yet
  1300. ***** ^ not supported yet
  1301. ***** ^ not supported yet
  1302. ***** ^ not supported yet
  1303. 505 (FieldRec.MenuKey <= Key.Extended) THEN
  1304. ***** ^ not supported yet
  1305. ***** ^ not supported yet
  1306. ***** ^ not supported yet
  1307. ***** ^ not supported yet
  1308. 506 SelChar[0] := CHR(FieldRec.MenuKey);
  1309. ***** ^ not supported yet
  1310. ***** ^ not supported yet
  1311. ***** ^ undeclared identifier
  1312. ***** ^ not supported yet
  1313. ***** ^ not supported yet
  1314. 507 ELSE
  1315. 508 RETURN;
  1316. 509 END;
  1317. 510 save := PosUtils.CaseSensitive;
  1318. ***** ^ not supported yet
  1319. ***** ^ not supported yet
  1320. 511 PosUtils.CaseSensitive := TRUE;
  1321. ***** ^ not supported yet
  1322. ***** ^ not supported yet
  1323. 512 IF NOT PosUtils.PresentPos( SelChar, ImageRec.text, spot ) THEN
  1324. ***** ^ not supported yet
  1325. ***** ^ not supported yet
  1326. ***** ^ not supported yet
  1327. ***** ^ not supported yet
  1328. ***** ^ not supported yet
  1329. ***** ^ not supported yet
  1330. 513 PosUtils.CaseSensitive := save;
  1331. ***** ^ not supported yet
  1332. ***** ^ not supported yet
  1333. 514 RETURN;
  1334. 515 END;
  1335. 516 PosUtils.CaseSensitive := save;
  1336. ***** ^ not supported yet
  1337. ***** ^ not supported yet
  1338. 517 ScrnUtl1.SetSelCharColors( TheFrame, TheField );
  1339. ***** ^ not supported yet
  1340. ***** ^ not supported yet
  1341. ***** ^ not supported yet
  1342. ***** ^ not supported yet
  1343. 518 IF Selected THEN
  1344. 519 VWindows.SetBackColor( TheFrame^.WindowHandle,
  1345. ***** ^ not supported yet
  1346. ***** ^ not supported yet
  1347. ***** ^ not supported yet
  1348. ***** ^ not supported yet
  1349. 520 TheFrame^.pbbak );
  1350. ***** ^ not supported yet
  1351. ***** ^ not supported yet
  1352. 521 END;
  1353. 522 VWindows.DrawStr( TheFrame^.WindowHandle,
  1354. ***** ^ not supported yet
  1355. ***** ^ not supported yet
  1356. ***** ^ not supported yet
  1357. ***** ^ not supported yet
  1358. 523 ImageRec.col + TheFrame^.startcol -
  1359. ***** ^ not supported yet
  1360. ***** ^ not supported yet
  1361. ***** ^ not supported yet
  1362. ***** ^ not supported yet
  1363. 524 TheFrame^.ColsScrolled + spot, ImageRec.row +
  1364. ***** ^ not supported yet
  1365. ***** ^ not supported yet
  1366. ***** ^ not supported yet
  1367. ***** ^ not supported yet
  1368. 525 TheFrame^.startrow - TheFrame^.RowsScrolled,
  1369. ***** ^ not supported yet
  1370. ***** ^ not supported yet
  1371. ***** ^ not supported yet
  1372. ***** ^ not supported yet
  1373. 526 SYSTEM.ADR(ImageRec.text[spot]), 1 );
  1374. ***** ^ not supported yet
  1375. ***** ^ not supported yet
  1376. ***** ^ not supported yet
  1377. ***** ^ not supported yet
  1378. ***** ^ not supported yet
  1379. ***** ^ not supported yet
  1380. 527 END RedrawField;
  1381. ***** ^ not supported yet
  1382. 528
  1383. 529
  1384. 530 PROCEDURE ShowDisplayFrame(VAR FrameRec : ScrnTypes.DisplayFrame;
  1385. ***** ^ not supported yet
  1386. 531 Col1, Row1, ColX, RowX : CARDINAL);
  1387. 532 (* Displays the screen in FrameRec on the screen
  1388. 533 in the window defined by Col1, Row1, ColX, RowX.
  1389. 534 Col1, Row1 = upper left hand corner of window;
  1390. 535 ColX, RowX = lower right corner coordinates.
  1391. 536 Note: if Col1=0, then this proc uses the default values for
  1392. 537 the window coordinates.*)
  1393. 538
  1394. 539 BEGIN (* ShowDisplayFrame *)
  1395. 540 IF Col1 > 0 THEN
  1396. 541 (*Correct the origin: starting col and row are
  1397. 542 decremented by one to represent "zero".*)
  1398. 543 FrameRec^.startcol := Col1-1;
  1399. ***** ^ not supported yet
  1400. ***** ^ not supported yet
  1401. 544 FrameRec^.endcol := ColX-1;
  1402. ***** ^ not supported yet
  1403. ***** ^ not supported yet
  1404. 545 FrameRec^.startrow := Row1-1;
  1405. ***** ^ not supported yet
  1406. ***** ^ not supported yet
  1407. 546 FrameRec^.endrow := RowX - 1;
  1408. ***** ^ not supported yet
  1409. ***** ^ not supported yet
  1410. 547 ELSE
  1411. 548 Col1 := FrameRec^.startcol + 1;
  1412. ***** ^ not supported yet
  1413. ***** ^ not supported yet
  1414. 549 Row1 := FrameRec^.startrow + 1;
  1415. ***** ^ not supported yet
  1416. ***** ^ not supported yet
  1417. 550 ColX := FrameRec^.endcol + 1;
  1418. ***** ^ not supported yet
  1419. ***** ^ not supported yet
  1420. 551 RowX := FrameRec^.endrow + 1;
  1421. ***** ^ not supported yet
  1422. ***** ^ not supported yet
  1423. 552 END;
  1424. 553 FrameManager.FrameActivated( FrameRec );
  1425. ***** ^ not supported yet
  1426. ***** ^ not supported yet
  1427. ***** ^ not supported yet
  1428. 554 FrameManager.FrameIsInForeGround( FrameRec );
  1429. ***** ^ not supported yet
  1430. ***** ^ not supported yet
  1431. ***** ^ not supported yet
  1432. 555 (* We have to call both because FrameActivated won't
  1433. 556 bring the frame to the foreground if it is already
  1434. 557 active. Note that we don't do this in RedrawArea,
  1435. 558 because RedrawArea is what FrameManager uses to
  1436. 559 restore areas of the screen -- if each call to
  1437. 560 RedrawArea changed the ordering of frames in
  1438. 561 FrameManager's FrameList, it would get stuck. *)
  1439. 562 IF NOT ScrnUtl1.BoxInFrame(FrameRec) THEN
  1440. ***** ^ not supported yet
  1441. ***** ^ not supported yet
  1442. ***** ^ not supported yet
  1443. 563 RedrawArea( FrameRec, Col1, Row1, ColX, RowX );
  1444. ***** ^ not supported yet
  1445. ***** ^ not supported yet
  1446. ***** ^ not supported yet
  1447. 564 ELSE
  1448. 565 (* draw the proper box for this screen *)
  1449. 566 ScrnUtl1.SetBorderColors( FrameRec );
  1450. ***** ^ not supported yet
  1451. ***** ^ not supported yet
  1452. ***** ^ not supported yet
  1453. 567 VWindows.DrawBox( FrameRec^.WindowHandle,
  1454. ***** ^ not supported yet
  1455. ***** ^ not supported yet
  1456. ***** ^ not supported yet
  1457. ***** ^ not supported yet
  1458. 568 FrameRec^.ExitBox, Col1, Row1, ColX, RowX );
  1459. ***** ^ not supported yet
  1460. ***** ^ not supported yet
  1461. ***** ^ not supported yet
  1462. 569 (*We draw the ExitBox because the frame is not active
  1463. 570 at this point.*)
  1464. 571 ScrnUtl1.WriteBetween( FrameRec^.WindowHandle, FrameRec^.Caption,
  1465. ***** ^ not supported yet
  1466. ***** ^ not supported yet
  1467. ***** ^ not supported yet
  1468. ***** ^ not supported yet
  1469. ***** ^ not supported yet
  1470. ***** ^ not supported yet
  1471. 572 Col1 + 1, Row1, ColX - 1, RowX );
  1472. ***** ^ not supported yet
  1473. 573 RedrawArea( FrameRec, Col1 + 1, Row1 + 1, ColX - 1, RowX - 1 );
  1474. ***** ^ not supported yet
  1475. ***** ^ not supported yet
  1476. ***** ^ not supported yet
  1477. 574 END;
  1478. 575 END ShowDisplayFrame;
  1479. ***** ^ not supported yet
  1480. 576
  1481. 577
  1482. 578 BEGIN
  1483. 579 Initialized := FALSE;
  1484. 580 Init();
  1485. ***** ^ not supported yet
  1486. ***** ^ not supported yet
  1487. 581 END FramePainter.
  1488. ***** ^ not supported yet
  1489. 906 errors