home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Education
/
collectionofeducationcarat1997.iso
/
COMPUSCI
/
TOT11.ZIP
/
TOTDEM11.ZIP
/
TOTDEMO.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1991-02-11
|
44KB
|
1,128 lines
program TOTDEMO;
{ Copyright 1991 TechnoJock Software, Inc. }
{ All Rights Reserved }
{ Restricted by License }
{ Build # 1.00a }
{$M 16000,250000,250000}
{$I TOTFLAGS.INC}
{
This is the main demo program, designed to show the capabilities
of TechnoJock's Object Toolkit. The majority of the Toolkit demos
are educational and illustrative, rather than flashy! This file
combines many of the smaller demo programs and adds a touch of
glamor. (If you're from New York, don't worry about the glamor!)
}
{ COMPILATION PROBLEMS:
Memory: 1) Enable the FINAL directive in TOTFLAGS.INC
2) Set Compile destination to disk
3) Set Link to disk
4) Set Link Mapfile off
5) Trim your config.sys and remove TSRs
6) Disable integrated and standalone debugging
If you still have problems, run the command line
compiler: TPC or TPCX
File not found: Update the Unit, Include and OBJ Options
Directories to point to the Toolkit
directory.
Unit File Format Error: Select Compile Build to force recompilation
of all Toolkit units.
}
uses DOS, CRT,
totSYS, totINPUT, totFAST, totWIN, totMSG, totLINK,
totLIST, totDIR, totIO1, totIO2, totIO3, totMENU,
totSTR, totDATE, totMISC,
extWIN;
var MainMenu: MoveMenuOBJ;
Choice: byte;
SaveScreen: ScreenOBJ;
procedure Error(Line1,Line2:string);
{}
var PopUp:MessageOBJ;
begin
with PopUp do
begin
Init(1,' Error ');
AddLine('');
AddLine(Line1);
AddLine(Line2);
AddLine('');
Show;
Done;
end;
end; {Error}
{||||||||||||||||||||||||||||||||||}
{ }
{ I n t r o S c r e e n }
{ }
{||||||||||||||||||||||||||||||||||}
procedure Sparkle;
{}
var
tempX,tempC:byte;
I : integer;
begin
with Key do
with Screen do
begin
delay(1000);
for I := 5 to 11 do
begin
if keypressed then exit;
Attrib(5,I,78,I,yellow);
delay(75);
end;
delay(500);
for I := 13 to 18 do
begin
if keypressed then exit;
Attrib(5,I,78,I,lightgreen);
delay(75);
end;
for I := 1 to 80 do
begin
if keypressed then exit;
Attrib(I,20,I,20,lightcyan);
delay(15);
end;
repeat
tempX := Random(27);
TempC := Random(6);
Inc(TempC,9);
Attrib(27+tempX,2,27+tempX,2,TempC);
TempX := Random(40);
Attrib(20+tempX,20,20+tempX,20,TempC);
delay(50);
until Keypressed;
end;
end; {Sparkle}
procedure Banner;
{}
var StartUp: ScreenOBJ;
begin
with StartUp do
begin
Init;
Create(80,25,white);
Box(25,1,55,3,white,1);
WriteAt(27,2,7,'TechnoJock''s Object Toolkit');
WriteAT(5,5,15,'This program demonstrates the power of TechnoJock''s Object Toolkit for');
WriteAT(5,6,15,'Borland''s Turbo Pascal v5.5 and v6.0 (on IBM and true compatibles).');
WriteAT(5,7,15,'If you experience any difficulty using the product, please call or');
WriteAt(5,8,15,'write to us. More information about the Toolkit is located in the');
WriteAt(5,9,15,'README.COM file and in the documentation.');
WriteAt(5,11,15,'For further information, contact:');
WriteAt(30,13,15,'TechnoJock Software, Inc.');
WriteAt(30,14,15,'P.O. Box 820927');
WriteAT(30,15,15,'Houston, TX 77282');
WriteAT(30,17,15,'Voice (713) 493-6354');
WriteAT(30,18,15,'Fax (713) 493-5872');
WriteCenter(23,15,'Copyright (c) 1991 TechnoJock Software, Inc.');
WriteCenter(24,15,'Restricted by License');
SlideDisplay(down);
end;
Screen.CursOff;
Screen.WriteRight(80,25,7,'Press any key to continue...');
if not Key.Keypressed then
Screen.WriteClick(20,20,white,'"In the Software business since Tuesday"');
if Monitor^.ColorOn then
Sparkle;
Key.GetInput;
end; {Banner}
procedure Introduction;
{}
var
PopUp: PromptOBJ;
Result: tAction;
begin
Screen.Clear(white,'░'); {paint the screen}
with PopUp do
begin
Init(1,' TechnoJock''s Object Toolkit ');
AddLine('');
AddLine(' This is a demo of the Object Toolkit from ');
AddLine(' TechnoJock Software, Inc. Please do not ');
AddLine(' run this demo while intoxicated! ');
AddLine('');
AddLine(' Would you like to see the demo? ');
AddLine('');
SetOption(1,' Oh ~Y~es ',89,Finished);
SetOption(2,' Hell ~N~o ',78,Escaped);
Result := Show;
Done;
if Result = Escaped then
begin
Writeln('Be like that!');
halt;
end;
end;
Banner;
end; {Introduction}
{|||||||||||||||||||||||||||||}
{ }
{ M e n u S t u f f }
{ }
{|||||||||||||||||||||||||||||}
procedure SetUpMenu;
{}
begin
with MainMenu do
begin
Init;
SetStyleTitle(6,' TechnoJock''s Object Toolkit ');
SetMessageXY(0,24);
SetGap(5);
Win^.SetClose(false);
Win^.SetBoundary(1,1,80,23);
AddItem('');
AddFullItem(' ~I~ntroduction ',1,73,
'Displays a screen describing the main Toolkit features',nil);
AddFullItem(' ~F~orm Input ',2,70,
'Get an idea of the power of the Toolkit''s form management facility',nil);
AddFullItem(' Display ~D~irectories ',3,68,
'Use the Toolkit''s directory display objects',nil);
AddFullItem(' ~B~rowse Lists, etc. ',4,66,
'Use the Toolkit''s browse and list objects',nil);
AddFullItem(' Display ~M~enus ',5,77,
'View Pull-down and Lotus-style menus',nil);
AddFullItem(' ~S~trings and Dates ',6,83,
'A description of some of the other fine units!',nil);
AddFullItem(' ~H~ardware ',7,72,
'Using the totSYS unit to determine system hardware',nil);
AddFullItem(' I~n~ternational Features ',8,78,
'A description of the Toolkit''s international aspects',nil);
AddFullItem(' ~V~iewing the "read me" file ',9,86,
'Displays all the late breaking news about the Toolkit',nil);
AddFullItem(' ~P~rinting the documentation ',10,80,
'Information on how to print the User''s Manual',nil);
AddFullItem(' P~u~rchasing the Toolkit ',11,85,
'How to buy a copy of the Toolkit', nil);
AddItem('');
AddFullItem(' ~Q~uit ',99,81,
'Go do summat else',nil);
end;
Screen.PartClear(1,1,80,22,white,'░'); {paint the screen}
Screen.PartClear(1,23,80,25,30,' ');
end; {SetUpMenu}
{|||||||||||||||||||||||||}
{ }
{ O p t i o n 1 }
{ }
{|||||||||||||||||||||||||}
procedure IntroOption;
{uses a scrollable virtual window to display the text}
var
InfoData: ScreenOBJ;
InfoWin: VirtualWinOBJ;
begin
with InfoData do
begin
Init;
Create(80,46,71);
WriteAt(1,1,75,'What is the Object Toolkit?');
WritePlain(5,3,'TechnoJock''s Object Toolkit (or simply the Toolkit) is a library of');
WritePlain(5,4,'objects, procedures and functions for Pascal programmers. While writing');
WritePlain(5,5,'a PC program, most people s