home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 December / simtel1292_SIMTEL_1292_Walnut_Creek.iso / msdos / turbopas / wndw55.arc / WNDW55-.PAS < prev    next >
Pascal/Delphi Source File  |  1989-08-24  |  4KB  |  109 lines

  1. { =========================================================================== }
  2. { Wndw55.pas - unit for Multi-level Virtual Windows         ver 5.5, 08-24-89 }
  3. {            with multi-video page and virtual window capability.             }
  4. {                                                                             }
  5. { This unit has the complete utilities for serial- or random-access, or       }
  6. { virtual multi-level windows.  It works on any IBM or compatible including   }
  7. { PCjr, IBM 3270 PC, and the PS/2 systems, in any video mode.  It uses        }
  8. { QWIK55.TPU for fast screen writing on any video page.  The complete         }
  9. { source code is available for registered users.                              }
  10. {   Copyright (C) 1987-1989 by James H. LeMay                                 }
  11. { =========================================================================== }
  12.  
  13. { R-,S-,I-,D-,T-,F-,V-,B-,N-,L+ }       { TP4 directives }
  14. {$A-,B-,D-,E-,F-,I-,L-,N-,O-,R-,S-,V-}  { TP5 directives }
  15.  
  16. { If undefined, these directives saves data space and about 2.5k of code. }
  17. { If you are using only video page 0, remove the following "$": }
  18. {$Define MultiPage }
  19.  
  20. { If you are NOT using virtual windows, remove the following "$": }
  21. {$Define AddVirtual }
  22.  
  23. UNIT Wndw;
  24.  
  25. INTERFACE
  26.  
  27. USES Crt,Qwik,Wutil;
  28.  
  29. {$I w55-var.inc }
  30.  
  31. { -- Basic Window Utilities -- }
  32. procedure InitWindow      (Wattr: integer; ClearScr: boolean);
  33. function  HeapOK          (NumOfBytes: word): boolean;
  34. procedure SetCursorDefault(CursorMode: word);
  35. procedure SetWindowModes  (SumOfAllModes: word);
  36. procedure MakeWindow      (Row,Col,Rows,Cols: byte; Wattr,Battr: integer;
  37.                            BrdrSel: Borders; WindowName: WindowNames);
  38. procedure TitleWindow     (TopOrBottom,Justify: DirType;
  39.                TitleAttr: integer; Title: string);
  40. procedure LocateCursor;
  41. procedure RestoreTurboWindow;
  42. procedure RemoveWindow;
  43.  
  44. { -- Window-relative writing utilities -- }
  45. procedure WWrite          (Row,Col: byte; aStr: string);
  46. procedure WWriteC         (Row: byte; aStr: string);
  47. procedure WWriteA         (Row,Col: byte; ArrayLength: word; VAR aStr);
  48. procedure WGotoRC         (Row,Col: byte);
  49. procedure WGotoEos;
  50. procedure WEosToRC        (Row,Col: byte);
  51. function  WWhereR:        byte;
  52. function  WWhereC:        byte;
  53. function  WEosR:          byte;
  54. function  WEosC:          byte;
  55. procedure WEosLn;
  56. procedure WBrdrH          (Row: byte);
  57. procedure WBrdrV          (Col: byte);
  58. procedure WBrdrPart       (Row,Col: byte; Part: BrdrParts);
  59. procedure WLineH          (Row,Col,Cols: byte);
  60. procedure WLineV          (Row,Col,Rows: byte);
  61. procedure WLinePart       (Row,Col: byte; Part: BrdrParts);
  62. procedure WScrollUp;
  63. procedure WScrollDown;
  64. procedure WInsLine        (Row: byte);
  65. procedure WDelLine        (Row: byte);
  66. procedure WClrLine        (Row: byte);
  67. procedure WClrField       (Row,Col,Cols: byte; Attr: integer);
  68. procedure WClrFieldEos    (        Cols: byte; Attr: integer);
  69. procedure WClrEol         (Row,Col:      byte; Attr: integer);
  70. procedure WClrEos         (                    Attr: integer);
  71. procedure WClrTitle       (TopOrBottom: DirType);
  72. procedure WClrScr;
  73.  
  74. { -- Window management utilities -- }
  75. procedure WriteToCRT;
  76. procedure WriteToHidden   (WindowName: WindowNames);
  77.   {$IfDef MultiPage }
  78. procedure WriteToPage     (PageNum: byte);
  79. procedure WriteAndViewPage(PageNum: byte);
  80.   {$EndIf }
  81. procedure HideWindow;
  82. procedure ShowWindow      (WindowName: WindowNames);
  83. procedure MoveWindow      (NumOfRows,NumOfCols: integer);
  84. function  GetLevelIndex   (WindowName: WindowNames): word;
  85. procedure AccessWindow    (WindowName: WindowNames);
  86. procedure ChangeBorder    (NewBrdr: Borders);
  87. procedure RestoreBorder;
  88.  
  89. { -- Virtual window utilities -- }
  90.   {$IfDef AddVirtual }
  91. procedure SetVirtualSize  (Rows,Cols: byte);
  92. procedure WriteToVirtual  (WindowName: WindowNames);
  93. procedure VViewRC         (Row,Col: byte);
  94. procedure VViewRCrel      (NumOfRows,NumOfCols: integer);
  95. procedure VUpdateWindow;   { Simply does the following 3 procedures: }
  96. procedure VUpdateView;
  97. procedure VUpdateTitles;
  98. procedure VUpdateCursor;
  99. procedure VUpdateRows     (Row,Rows: byte);
  100. procedure VScrollView     (NumOfRows,NumOfCols: integer);
  101. procedure VResizeWindow   (NumOfRows,NumOfCols: integer);
  102. procedure VZoomWindow;
  103.   {$EndIf }
  104.  
  105.  
  106. IMPLEMENTATION
  107.  
  108. END.
  109.