home *** CD-ROM | disk | FTP | other *** search
- { ========================================================================== }
- { Wndw70c.pas - unit for Multi-level Virtual Windows ver 7.0c, 09-23-93 }
- { with multi-video page and virtual window capability. }
- { }
- { This unit has the complete utilities for serial- or random-access, or }
- { virtual multi-level windows. It works on any IBM or compatible including }
- { PCjr, IBM 3270 PC, and the PS/2 systems, in any video mode. It uses }
- { QWIK71.TPU for fast screen writing on any video page. The complete }
- { source code is available for registered users. }
- { Copyright (C) 1993 by James H. LeMay }
- { ========================================================================== }
-
- {$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,P-,Q-,R-,S-,T-,V-,X+}
-
- { If undefined, these directives saves data space and about 4.0k of code. }
- { If you are using only video page 0, insert a space before the "$": }
- {$Define MultiPage }
-
- { If you are NOT using virtual windows, insert a space before the "$": }
- {$Define AddVirtual }
-
- { If you are NOT using shadows, insert a space before the "$": }
- {$Define AddShadows }
-
- UNIT Wndw;
-
- INTERFACE
-
- USES Crt,Qwik,Wutil;
-
- {$i w70-var.inc }
-
- { -- Basic Window Utilities -- }
- procedure InitWindow (Wattr: integer; ClearScr: boolean);
- function HeapOK (NumOfBytes: word): boolean;
- procedure SetCursorDefault(CursorMode: word);
- procedure SetWindowModes (SumOfAllModes: word);
- procedure MakeWindow (Row,Col,Rows,Cols: byte; Wattr,Battr: integer;
- BrdrSel: Borders; WindowName: WindowNames);
- procedure TitleWindow (TopOrBottom,Justify: DirType;
- TitleAttr: integer; const Title: string);
- procedure LocateCursor;
- procedure RestoreTurboWindow;
- procedure RemoveWindow;
-
- { -- Window-relative writing utilities -- }
- { The WWrite* routines are very simple shells for QWrite. }
- { There's only one line of code so it's easy to customize your own. }
- procedure WWrite (Row,Col: byte; const aStr: string);
- procedure WWriteC (Row: byte; const aStr: string);
- procedure WWriteA (Row,Col: byte; Attr: integer; const aStr: string);
- procedure WWriteAC (Row: byte; Attr: integer; const aStr: string);
- procedure WWriteSub (Row,Col: byte; SubStringLen: word; var Chars);
-
- procedure WGotoRC (Row,Col: byte);
- procedure WGotoEos;
- procedure WEosToRC (Row,Col: byte);
- function WWhereR: byte;
- function WWhereC: byte;
- function WEosR: byte;
- function WEosC: byte;
- procedure WEosLn;
- procedure WBrdrH (Row: byte);
- procedure WBrdrV (Col: byte);
- procedure WBrdrPart (Row,Col: byte; Part: BrdrParts);
- procedure WLineH (Row,Col,Cols: byte);
- procedure WLineV (Row,Col,Rows: byte);
- procedure WLinePart (Row,Col: byte; Part: BrdrParts);
- procedure WScrollUp;
- procedure WScrollDown;
- procedure WInsLine (Row: byte);
- procedure WDelLine (Row: byte);
- procedure WClrLine (Row: byte);
- procedure WClrField (Row,Col,Cols: byte; Attr: integer);
- procedure WClrFieldEos ( Cols: byte; Attr: integer);
- procedure WClrEol (Row,Col: byte; Attr: integer);
- procedure WClrEos ( Attr: integer);
- procedure WClrTitle (TopOrBottom: DirType);
- procedure WClrScr;
-
- { -- Window management utilities -- }
- procedure WriteToCRT;
- procedure WriteToHidden (WindowName: WindowNames);
- {$ifdef MultiPage }
- procedure WriteToPage (PageNum: byte);
- procedure WriteAndViewPage(PageNum: byte);
- {$endif }
- procedure HideWindow;
- procedure ShowWindow (WindowName: WindowNames);
- procedure MoveWindow (NumOfRows,NumOfCols: integer);
- function GetLevelIndex (WindowName: WindowNames): word;
- procedure AccessWindow (WindowName: WindowNames);
- procedure ChangeBorder (NewBrdr: Borders);
- procedure RestoreBorder;
-
- { -- Virtual window utilities -- }
- {$ifdef AddVirtual }
- procedure SetVirtualSize (Rows,Cols: byte);
- procedure WriteToVirtual (WindowName: WindowNames);
- procedure VViewRC (Row,Col: byte);
- procedure VViewRCrel (NumOfRows,NumOfCols: integer);
- procedure VUpdateWindow; { Simply does the following 3 procedures: }
- procedure VUpdateView;
- procedure VUpdateTitles;
- procedure VUpdateCursor;
- procedure VUpdateRows (Row,Rows: byte);
- procedure VScrollView (NumOfRows,NumOfCols: integer);
- procedure VResizeWindow (NumOfRows,NumOfCols: integer);
- procedure VZoomWindow;
- {$endif }
-
-
- IMPLEMENTATION
-
- uses goof;
-
- { Complete source code provided to registered users only. }
-
- END.
-