Dec 222017
Window routines for TP6.0. Very simple, but includes source code. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
WINSTACK.DOC | 1697 | 712 | deflated |
WINSTACK.PAS | 5732 | 1868 | deflated |
WINSTACK.TPU | 2848 | 1525 | deflated |
Download File WINSTACK.ZIP Here
Contents of the WINSTACK.DOC file
Unit WinStack;
{ A very simple Window Stack Unit -- by Steve MacGregor, FBI }
Interface
{NOTE: This unit calls NEW and DISPOSE, so the using program should
not call MARK or RELEASE between the first call to CreateWindow
and the last call to DisposeWindow}
Type
FrameType = ({style of frame to put around the new window}
no_frame {the new window is the *entire* defined area},
single_frame {frame is a single graphics line},
double_frame {frame is a double graphics line},
dash_frame {frame is dashes (-), bars (|), and plus signs (+)},
char_frame {first character of Name is used as frame});
Procedure CreateWindow
({save the attributes of the current window, and create a new one}
MinX, MinY, MaxX, MaxY: byte
{define a new window, as in CRT unit, including the frame, if any};
TextAttr: byte
{attributes of the new window, as in CRT unit}
{if zero, use attributes from the current window};
Frame: FrameType
{chose style of frame, or no_frame}
{the actual usable window will be reduced by two characters in each
dimension, unless Frame = no_frame};
FrameAttr: byte
{attributes of the frame and Name}
{if zero, use TextAttr instead};
Name: string
{title of window}
{if Frame = no_frame, Name is printed as the first line in the
new window, in the attributes defined by FrameAttr}
{if Frame = char_frame, the first character is used to frame the
new window, and is then deleted from Name});
Procedure DisposeWindow
{dispose of the current window, and restore the previous one}
{if no previous window was stored, just clear the screen};
{ A very simple Window Stack Unit -- by Steve MacGregor, FBI }
Interface
{NOTE: This unit calls NEW and DISPOSE, so the using program should
not call MARK or RELEASE between the first call to CreateWindow
and the last call to DisposeWindow}
Type
FrameType = ({style of frame to put around the new window}
no_frame {the new window is the *entire* defined area},
single_frame {frame is a single graphics line},
double_frame {frame is a double graphics line},
dash_frame {frame is dashes (-), bars (|), and plus signs (+)},
char_frame {first character of Name is used as frame});
Procedure CreateWindow
({save the attributes of the current window, and create a new one}
MinX, MinY, MaxX, MaxY: byte
{define a new window, as in CRT unit, including the frame, if any};
TextAttr: byte
{attributes of the new window, as in CRT unit}
{if zero, use attributes from the current window};
Frame: FrameType
{chose style of frame, or no_frame}
{the actual usable window will be reduced by two characters in each
dimension, unless Frame = no_frame};
FrameAttr: byte
{attributes of the frame and Name}
{if zero, use TextAttr instead};
Name: string
{title of window}
{if Frame = no_frame, Name is printed as the first line in the
new window, in the attributes defined by FrameAttr}
{if Frame = char_frame, the first character is used to frame the
new window, and is then deleted from Name});
Procedure DisposeWindow
{dispose of the current window, and restore the previous one}
{if no previous window was stored, just clear the screen};
December 22, 2017
Add comments