VEDITOR.MOD 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. IMPLEMENTATION MODULE VEditor;
  2. (*
  3. * REPERTOIRE
  4. * Release 1.6
  5. * By Charles Bradford and Cole Brecheen
  6. * (c) Copyright 1985-1992 PMI
  7. * Green Bay, Wisconsin
  8. * All rights reserved
  9. * (414) 468-6040
  10. *
  11. * $Header: D:/logfiles/mods/veditor.mov 1.5 10 Mar 1991 15:34:18 coleb $
  12. *
  13. *)
  14. IMPORT MsColors;
  15. IMPORT VWindows;
  16. VAR
  17. Initialized : BOOLEAN;
  18. PROCEDURE Init();
  19. BEGIN
  20. IF Initialized THEN
  21. RETURN;
  22. ELSE
  23. Initialized := TRUE;
  24. END;
  25. MsColors.Init();
  26. VWindows.Init();
  27. END Init;
  28. PROCEDURE InitEdRec( VAR Rec: AnEdControlRec );
  29. BEGIN
  30. Rec.Col1 := 1;
  31. Rec.Row1 := 1;
  32. Rec.Col2 := VWindows.EndCol( VWindows.CurrentWindow );
  33. Rec.Row2 := VWindows.EndRow( VWindows.CurrentWindow );
  34. Rec.TextRow1 := 1;
  35. Rec.CursorCol := 1;
  36. Rec.CursorRow := 1;
  37. Rec.Wrapping := FALSE;
  38. Rec.ReadOnly := FALSE;
  39. Rec.ChangeMade := FALSE;
  40. Rec.FrameRec := NIL;
  41. Rec.WindowHandle := VWindows.CurrentWindow;
  42. Rec.NextFrame := '';
  43. Rec.MaxLines := 0;
  44. Rec.EdLastKey := 0;
  45. Rec.overwriting := FALSE;
  46. Rec.DoCounting := FALSE;
  47. (* whether or not to use prompts *)
  48. Rec.ExitBox := 1;
  49. Rec.EntryBox := 2;
  50. (* if one of these is 0, no box is drawn around the editor
  51. window; 1 makes it a single-lined box, and 2 makes it
  52. a double-lined box. *)
  53. Rec.CountRow := Rec.Row2 - 1;
  54. (* the screen row to show counts if they are used *)
  55. Rec.EdPromptFore := MsColors.black;
  56. Rec.EdPromptBack := MsColors.cyan;
  57. Rec.EdPromptAttrib := MsColors.ReverseVideo;
  58. Rec.EntryAttrib := MsColors.plain;
  59. Rec.ExitAttrib := MsColors.plain;
  60. Rec.EntryForeColor := MsColors.lightgrey;
  61. Rec.EntryBackColor := MsColors.blue;
  62. Rec.ExitForeColor := MsColors.lightgrey;
  63. Rec.ExitBackColor := MsColors.blue;
  64. Rec.EntryForeBox := MsColors.red;
  65. Rec.EntryBackBox := MsColors.blue;
  66. Rec.ExitForeBox := MsColors.red;
  67. Rec.ExitBackBox := MsColors.blue;
  68. END InitEdRec;
  69. BEGIN
  70. Initialized := FALSE;
  71. Init();
  72. END VEditor.