WMStringGrids.Mod 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. MODULE WMStringGrids; (** AUTHOR "TF"; PURPOSE "String grid component"; *)
  2. IMPORT
  3. Objects, Strings, XML, WMComponents, WMGraphics, WMGraphicUtilities,
  4. WMProperties, WMEvents, WMRectangles, WMGrids;
  5. CONST
  6. (* Cell.flags *)
  7. UsePerCellColors = 0;
  8. UseInternalBuffer = 1;
  9. TYPE
  10. String = Strings.String;
  11. Cell* = OBJECT
  12. VAR
  13. caption : String;
  14. color, textColor : WMGraphics.Color;
  15. align: LONGINT;
  16. img : WMGraphics.Image;
  17. data : ANY;
  18. flags : SET;
  19. PROCEDURE &Init;
  20. BEGIN
  21. caption := NIL;
  22. color := 0; textColor := 0; align := 0;
  23. img := NIL;
  24. data := NIL;
  25. flags := {};
  26. END Init;
  27. END Cell;
  28. CellArray = POINTER TO ARRAY OF Cell;
  29. Row = POINTER TO RECORD
  30. cells : CellArray;
  31. END;
  32. RowArray = POINTER TO ARRAY OF Row;
  33. TYPE
  34. StringGridModel* = OBJECT
  35. VAR
  36. lockedBy : ANY;
  37. lockLevel : LONGINT;
  38. viewChanged : BOOLEAN;
  39. onChanged* : WMEvents.EventSource; (** does not hold the lock, if called *)
  40. rows : RowArray;
  41. nofRows, nofCols : LONGINT;
  42. PROCEDURE &Init*;
  43. BEGIN
  44. NEW(onChanged, SELF, WMComponents.NewString("TreeModelChanged"), NIL, NIL);
  45. NEW(rows, 4);
  46. lockLevel :=0;
  47. END Init;
  48. (** acquire a read/write lock on the object *)
  49. PROCEDURE Acquire*;
  50. VAR me : ANY;
  51. BEGIN {EXCLUSIVE}
  52. me := Objects.ActiveObject();
  53. IF lockedBy = me THEN
  54. ASSERT(lockLevel # -1); (* overflow *)
  55. INC(lockLevel)
  56. ELSE
  57. AWAIT(lockedBy = NIL); viewChanged := FALSE;
  58. lockedBy := me; lockLevel := 1
  59. END
  60. END Acquire;
  61. (** release the read/write lock on the object *)
  62. PROCEDURE Release*;
  63. VAR hasChanged : BOOLEAN;
  64. BEGIN
  65. BEGIN {EXCLUSIVE}
  66. ASSERT(lockedBy = Objects.ActiveObject(), 3000);
  67. hasChanged := FALSE;
  68. DEC(lockLevel);
  69. IF lockLevel = 0 THEN lockedBy := NIL; hasChanged := viewChanged END
  70. END;
  71. IF hasChanged THEN onChanged.Call(NIL) END
  72. END Release;
  73. PROCEDURE AdjustRows(newSize : LONGINT);
  74. VAR i : LONGINT; newRows : RowArray;
  75. BEGIN
  76. NEW(newRows, newSize);
  77. FOR i := 0 TO MIN(nofRows, newSize) - 1 DO
  78. newRows[i] := rows[i]
  79. END;
  80. FOR i := MIN(nofRows, newSize) TO newSize - 1 DO
  81. NEW(newRows[i]);
  82. AdjustRow(newRows[i])
  83. END;
  84. rows := newRows
  85. END AdjustRows;
  86. PROCEDURE AdjustRow(row : Row);
  87. VAR i : LONGINT; newCells : CellArray;
  88. BEGIN
  89. IF row.cells = NIL THEN NEW(row.cells, nofCols) END;
  90. IF LEN(row.cells) # nofCols THEN
  91. NEW(newCells, nofCols);
  92. FOR i := 0 TO MIN(nofCols, LEN(row.cells)) - 1 DO
  93. newCells[i] := row.cells[i]
  94. END;
  95. row.cells := newCells
  96. END
  97. END AdjustRow;
  98. PROCEDURE SetNofRows*(newNofRows : LONGINT);
  99. BEGIN
  100. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  101. IF (newNofRows > nofRows) OR (newNofRows < nofRows DIV 2) THEN AdjustRows(newNofRows) END;
  102. nofRows := newNofRows;
  103. viewChanged := TRUE
  104. END SetNofRows;
  105. PROCEDURE SetNofCols*(newNofCols : LONGINT);
  106. VAR i : LONGINT;
  107. BEGIN
  108. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  109. nofCols := newNofCols;
  110. FOR i := 0 TO nofRows - 1 DO AdjustRow(rows[i]) END;
  111. viewChanged := TRUE
  112. END SetNofCols;
  113. PROCEDURE GetNofRows*() : LONGINT;
  114. BEGIN
  115. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  116. RETURN nofRows
  117. END GetNofRows;
  118. PROCEDURE GetNofCols*() : LONGINT;
  119. BEGIN
  120. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  121. RETURN nofCols
  122. END GetNofCols;
  123. PROCEDURE SetCellText*(col, row : LONGINT; caption : String);
  124. BEGIN
  125. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  126. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  127. IF rows[row].cells[col] = NIL THEN NEW(rows[row].cells[col]) END;
  128. EXCL(rows[row].cells[col].flags, UseInternalBuffer);
  129. IF rows[row].cells[col].caption # caption THEN
  130. rows[row].cells[col].caption := caption;
  131. viewChanged := TRUE
  132. END
  133. END
  134. END SetCellText;
  135. PROCEDURE GetCellText*(col, row : LONGINT ) : String;
  136. BEGIN
  137. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  138. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  139. IF rows[row].cells[col] = NIL THEN RETURN NIL END;
  140. RETURN rows[row].cells[col].caption
  141. ELSE RETURN NIL
  142. END
  143. END GetCellText;
  144. PROCEDURE SetCellTextAOC*(col, row, minBufferSize : LONGINT; CONST caption : ARRAY OF CHAR);
  145. VAR cell : Cell; length : LONGINT;
  146. BEGIN
  147. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  148. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  149. IF rows[row].cells[col] = NIL THEN NEW(rows[row].cells[col]) END;
  150. length := MAX(minBufferSize, Strings.Length(caption) + 1); (* 0X *)
  151. cell := rows[row].cells[col];
  152. IF (cell.caption = NIL) OR ~(UseInternalBuffer IN cell.flags) OR (LEN(cell.caption) < length) THEN
  153. NEW(cell.caption, length);
  154. INCL(cell.flags, UseInternalBuffer);
  155. END;
  156. IF (cell.caption^ # caption) THEN
  157. COPY(caption, rows[row].cells[col].caption^);
  158. viewChanged := TRUE
  159. END
  160. END
  161. END SetCellTextAOC;
  162. PROCEDURE GetCellTextAOC*(col, row : LONGINT; VAR caption : ARRAY OF CHAR);
  163. BEGIN
  164. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  165. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  166. IF rows[row].cells[col] # NIL THEN
  167. COPY(rows[row].cells[col].caption^, caption);
  168. ELSE
  169. caption := "";
  170. END;
  171. ELSE
  172. caption := "";
  173. END
  174. END GetCellTextAOC;
  175. PROCEDURE SetCellColors*(col, row : LONGINT; color, textColor : WMGraphics.Color);
  176. BEGIN
  177. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  178. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  179. IF rows[row].cells[col] = NIL THEN NEW(rows[row].cells[col]) END;
  180. INCL(rows[row].cells[col].flags, UsePerCellColors);
  181. IF rows[row].cells[col].color # color THEN
  182. rows[row].cells[col].color := color;
  183. viewChanged := TRUE;
  184. END;
  185. IF rows[row].cells[col].textColor # textColor THEN
  186. rows[row].cells[col].textColor := textColor;
  187. viewChanged := TRUE;
  188. END;
  189. END;
  190. END SetCellColors;
  191. PROCEDURE GetCellColors*(col, row : LONGINT; VAR color, textColor : WMGraphics.Color; VAR valid : BOOLEAN);
  192. BEGIN
  193. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  194. valid := FALSE;
  195. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  196. IF (rows[row].cells[col] # NIL) & (UsePerCellColors IN rows[row].cells[col].flags) THEN
  197. valid := TRUE;
  198. color := rows[row].cells[col].color;
  199. textColor := rows[row].cells[col].textColor;
  200. END;
  201. END;
  202. END GetCellColors;
  203. PROCEDURE SetCellData*(col, row : LONGINT; data : ANY);
  204. BEGIN
  205. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  206. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  207. IF rows[row].cells[col] = NIL THEN NEW(rows[row].cells[col]) END;
  208. IF rows[row].cells[col].data # data THEN
  209. rows[row].cells[col].data:= data;
  210. viewChanged := TRUE
  211. END
  212. END
  213. END SetCellData;
  214. PROCEDURE GetCellData*(col, row : LONGINT) : ANY;
  215. BEGIN
  216. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  217. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  218. IF rows[row].cells[col] = NIL THEN RETURN NIL END;
  219. RETURN rows[row].cells[col].data
  220. ELSE RETURN NIL
  221. END
  222. END GetCellData;
  223. PROCEDURE SetCellImage*(col, row : LONGINT; img : WMGraphics.Image);
  224. BEGIN
  225. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  226. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  227. IF rows[row].cells[col] = NIL THEN NEW(rows[row].cells[col]) END;
  228. IF rows[row].cells[col].img # img THEN
  229. rows[row].cells[col].img := img;
  230. viewChanged := TRUE
  231. END
  232. END
  233. END SetCellImage;
  234. PROCEDURE GetCellImage*(col, row : LONGINT) : WMGraphics.Image;
  235. BEGIN
  236. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  237. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  238. IF rows[row].cells[col] = NIL THEN RETURN NIL END;
  239. RETURN rows[row].cells[col].img
  240. ELSE RETURN NIL
  241. END
  242. END GetCellImage;
  243. PROCEDURE SetTextAlign*(col, row, align : LONGINT);
  244. BEGIN
  245. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  246. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  247. IF rows[row].cells[col] = NIL THEN NEW(rows[row].cells[col]) END;
  248. IF rows[row].cells[col].align # align THEN
  249. rows[row].cells[col].align:= align;
  250. viewChanged := TRUE
  251. END
  252. END
  253. END SetTextAlign;
  254. PROCEDURE GetTextAlign*(col, row : LONGINT) : LONGINT;
  255. BEGIN
  256. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  257. IF (col >= 0) & (row >= 0) & (col < nofCols) & (row < nofRows) THEN
  258. IF rows[row].cells[col] = NIL THEN RETURN 0 END;
  259. RETURN rows[row].cells[col].align
  260. ELSE RETURN 0
  261. END
  262. END GetTextAlign;
  263. PROCEDURE DeleteRow*(rowNo : LONGINT; viewChanged : BOOLEAN);
  264. VAR i : LONGINT;
  265. BEGIN
  266. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  267. IF (rowNo >= 0) & (rowNo < nofRows) THEN
  268. FOR i := rowNo TO nofRows - 2 DO
  269. rows[i] := rows[i + 1]
  270. END;
  271. DEC(nofRows);
  272. SELF.viewChanged := viewChanged
  273. END
  274. END DeleteRow;
  275. PROCEDURE InsertEmptyRow*(atRowNo : LONGINT);
  276. VAR i : LONGINT;
  277. newRows : RowArray;
  278. BEGIN
  279. ASSERT(Objects.ActiveObject() = lockedBy, 3000);
  280. IF (atRowNo >= 0) & (atRowNo <= nofRows) THEN
  281. NEW(newRows, nofRows + 1);
  282. FOR i := 0 TO atRowNo - 1 DO
  283. newRows[i] := rows[i]
  284. END;
  285. NEW(newRows[atRowNo]);
  286. AdjustRow(newRows[atRowNo]);
  287. FOR i := atRowNo + 1 TO nofRows DO
  288. newRows[i] := rows[i - 1]
  289. END
  290. END;
  291. INC(nofRows);
  292. rows := newRows;
  293. viewChanged := TRUE
  294. END InsertEmptyRow;
  295. END StringGridModel;
  296. TYPE
  297. StringGrid* = OBJECT(WMGrids.GenericGrid)
  298. VAR
  299. model- : StringGridModel;
  300. cellColor, hoverColor, selectedColor, fixedColor, textHoverColor, textColor, textSelectedColor : WMGraphics.Color;
  301. clCell-, clFixed-, clHover-, clSelected-, clTextDefault-, clTextHover-, clTextSelected- : WMProperties.ColorProperty;
  302. PROCEDURE &Init*;
  303. BEGIN
  304. Init^;
  305. SetNameAsString(StrStringGrid);
  306. SetGenerator("WMStringGrids.GenStringGrid");
  307. NEW(clCell, PrototypeTclCell, NIL, NIL); properties.Add(clCell);
  308. NEW(clHover, PrototypeTclHover, NIL, NIL); properties.Add(clHover);
  309. NEW(clSelected, PrototypeTclSelected, NIL, NIL); properties.Add(clSelected);
  310. NEW(clFixed, PrototypeTclFixed, NIL, NIL); properties.Add(clFixed);
  311. NEW(clTextDefault, PrototypeTclTextDefault, NIL, NIL); properties.Add(clTextDefault);
  312. NEW(clTextHover, PrototypeTclTextHover, NIL, NIL); properties.Add(clTextHover);
  313. NEW(clTextSelected, PrototypeTclTextSelected, NIL, NIL); properties.Add(clTextSelected);
  314. (* NEW(fontHeight, PrototypeTfontHeight, NIL, NIL); properties.Add(fontHeight); *)
  315. takesFocus.Set(TRUE);
  316. NEW(model);
  317. model.onChanged.Add(ModelChanged);
  318. ModelChanged(NIL,NIL);
  319. END Init;
  320. PROCEDURE ModelChanged(sender, data : ANY);
  321. BEGIN
  322. Acquire;
  323. nofCols.Set(model.nofCols);
  324. nofRows.Set(model.nofRows);
  325. Invalidate;
  326. SetDrawCellProc(DrawCell);
  327. Release
  328. END ModelChanged;
  329. PROCEDURE DrawBackground*(canvas : WMGraphics.Canvas);
  330. BEGIN
  331. cellColor := clCell.Get();
  332. hoverColor := clHover.Get();
  333. selectedColor := clSelected.Get();
  334. fixedColor := clFixed.Get();
  335. textColor := clTextDefault.Get();
  336. textHoverColor := clTextHover.Get();
  337. textSelectedColor := clTextSelected.Get();
  338. model.Acquire;
  339. DrawBackground^(canvas);
  340. model.Release
  341. END DrawBackground;
  342. PROCEDURE GetCellData*(col, row : LONGINT) : ANY;
  343. VAR data : ANY;
  344. BEGIN
  345. model.Acquire;
  346. data := model.GetCellData(col, row);
  347. model.Release;
  348. RETURN data
  349. END GetCellData;
  350. (* PROCEDURE CellClicked*(col, row : LONGINT); (** PROTECTED *)
  351. BEGIN
  352. model.Acquire;
  353. data := model.GetCellData(col, row);
  354. model.Release;
  355. CellClicked^(col, row);
  356. (* onClick.Call(data);
  357. IF wasSelected & onClickSelected.HasListeners() THEN
  358. onClickSelected.Call(data)
  359. END; *)
  360. END CellClicked; *)
  361. PROCEDURE DrawCell(canvas : WMGraphics.Canvas; w, h : LONGINT; state : SET; x, y : LONGINT);
  362. VAR
  363. s : String; font : WMGraphics.Font; left: LONGINT; c, tc: WMGraphics.Color; img : WMGraphics.Image; dispW, dispH: LONGINT;
  364. valid : BOOLEAN;
  365. BEGIN
  366. s := model.GetCellText(x, y);
  367. model.GetCellColors(x, y, c, tc, valid);
  368. IF ~valid THEN
  369. c := cellColor;
  370. tc := textColor;
  371. END;
  372. IF WMGrids.CellFixed IN state THEN
  373. c := fixedColor;
  374. IF WMGrids.CellSelected IN state THEN
  375. c := WMGraphicUtilities.InterpolateColorLinear(c, selectedColor, 128)
  376. ELSIF WMGrids.CellHighlighted IN state THEN
  377. c := WMGraphicUtilities.InterpolateColorLinear(c, hoverColor, 128)
  378. END;
  379. canvas.Fill(WMRectangles.MakeRect(0, 0, w, h), c, WMGraphics.ModeCopy)
  380. ELSIF WMGrids.CellSelected IN state THEN
  381. canvas.Fill(WMRectangles.MakeRect(0, 0, w, h), selectedColor, WMGraphics.ModeSrcOverDst);
  382. tc := textSelectedColor
  383. ELSIF WMGrids.CellHighlighted IN state THEN
  384. canvas.Fill(WMRectangles.MakeRect(0, 0, w, h), hoverColor, WMGraphics.ModeSrcOverDst);
  385. tc := textHoverColor
  386. ELSE
  387. canvas.Fill(WMRectangles.MakeRect(0, 0, w, h), c, WMGraphics.ModeSrcOverDst)
  388. END;
  389. font := GetFont();
  390. canvas.SetColor(tc);
  391. left := 1; img := model.GetCellImage(x, y);
  392. IF img # NIL THEN INC(left, img.width + 1) END;
  393. IF s # NIL THEN
  394. IF img # NIL THEN
  395. dispW := img.width;
  396. dispH := img.height;
  397. IF dispW > w-2 THEN dispW := w-2 END;
  398. IF dispH > h-2 THEN dispH := h-2 END;
  399. IF (dispW # img.width) OR (dispH # img.height) THEN
  400. canvas.ScaleImage(img, WMRectangles.MakeRect(0, 0, img.width, img.height), WMRectangles.MakeRect(1, 1, dispW, dispH), WMGraphics.ModeSrcOverDst, 10);
  401. ELSE
  402. canvas.DrawImage(1, 1, img, WMGraphics.ModeSrcOverDst);
  403. END
  404. END;
  405. WMGraphics.DrawStringInRect(canvas, WMRectangles.MakeRect(left, 1, w - 2, h - 2), FALSE,
  406. model.GetTextAlign(x, y), WMGraphics.AlignCenter, s^)
  407. END;
  408. IF WMGrids.CellSelected IN state THEN
  409. WMGraphicUtilities.ExtRectGlassShade(canvas, WMRectangles.MakeRect(0, 0, w, h), {1, 3}, 5, FALSE);
  410. END
  411. (* IF s # NIL THEN canvas.DrawString(0, h - font.descent, s^) END *)
  412. END DrawCell;
  413. END StringGrid;
  414. VAR
  415. PrototypeTclCell*, PrototypeTclHover*, PrototypeTclSelected*, PrototypeTclTextDefault*,
  416. PrototypeTclTextHover*, PrototypeTclTextSelected*, PrototypeTclFixed* : WMProperties.ColorProperty;
  417. PrototypeTfontHeight* : WMProperties.Int32Property;
  418. StrStringGrid : Strings.String;
  419. PROCEDURE GenStringGrid*() : XML.Element;
  420. VAR stringGrid : StringGrid;
  421. BEGIN
  422. NEW(stringGrid); RETURN stringGrid;
  423. END GenStringGrid;
  424. PROCEDURE InitStrings;
  425. BEGIN
  426. StrStringGrid := Strings.NewString("StringGrid");
  427. END InitStrings;
  428. PROCEDURE InitPrototypes;
  429. VAR plStringGrid : WMProperties.PropertyList;
  430. BEGIN
  431. NEW(plStringGrid);
  432. NEW(PrototypeTclCell, NIL, Strings.NewString("ClCell"), Strings.NewString("color of the cell"));
  433. plStringGrid.Add(PrototypeTclCell);
  434. NEW(PrototypeTclFixed, NIL, Strings.NewString("ClFixed"), Strings.NewString("color of a fixed cell"));
  435. plStringGrid.Add(PrototypeTclFixed);
  436. NEW(PrototypeTclHover, NIL, Strings.NewString("ClHover"), Strings.NewString("color of the tree item, if the mouse is over it"));
  437. plStringGrid.Add(PrototypeTclHover);
  438. NEW(PrototypeTclSelected, NIL, Strings.NewString("ClSelected"), Strings.NewString("color of the the tree item, if it is selected"));
  439. plStringGrid.Add(PrototypeTclSelected);
  440. NEW(PrototypeTclTextDefault, NIL, Strings.NewString("ClTextDefault"), Strings.NewString("default text color of the tree item"));
  441. plStringGrid.Add(PrototypeTclTextDefault);
  442. NEW(PrototypeTclTextHover, NIL, Strings.NewString("ClTextHover"), Strings.NewString("text color of the tree item, if the mouse is over it"));
  443. plStringGrid.Add(PrototypeTclTextHover);
  444. NEW(PrototypeTclTextSelected, NIL, Strings.NewString("ClTextSelected"), Strings.NewString("text color of the tree item, when selected"));
  445. plStringGrid.Add(PrototypeTclTextSelected);
  446. NEW(PrototypeTfontHeight, NIL, Strings.NewString("FontHeight"), Strings.NewString("height of the tree item text"));
  447. plStringGrid.Add(PrototypeTfontHeight);
  448. PrototypeTclCell.Set(LONGINT(0FFFFFFFFH));
  449. PrototypeTclFixed.Set(LONGINT(0CCCCCCFFH));
  450. PrototypeTclHover.Set(LONGINT(0FFFF00FFH));
  451. PrototypeTclSelected.Set(00000FFFFH);
  452. PrototypeTclTextDefault.Set(0000000FFH);
  453. PrototypeTclTextHover.Set(00000FFFFH);
  454. PrototypeTclTextSelected.Set(LONGINT(0FFFFFFFFH));
  455. PrototypeTfontHeight.Set(12);
  456. WMComponents.propertyListList.Add("StringGrid", plStringGrid);
  457. WMComponents.propertyListList.UpdateStyle;
  458. END InitPrototypes;
  459. BEGIN
  460. InitStrings;
  461. InitPrototypes;
  462. END WMStringGrids.
  463. System.Free WMStringGrids ~