home *** CD-ROM | disk | FTP | other *** search
- {
- Copyright 1990, John W. Small, All Rights Reserved
- PSW/ Power SoftWare, P.O. Box 10072, McLean, VA 22102 8072
-
- Compile and run this demo with Turbo Pascal 5.5
- }
- program demo; { crtplus.pas }
-
- uses crt, crtplus;
-
- var tw : TextWindow;
- ftw : FramedTextWindow;
- stw : ShadowTextWindow;
- i : integer;
- ch : char;
-
- begin
-
- TxtScr.TextMode(co80+font8x8);
-
- crt.DirectVideo := true;
- crt.CheckSnow := true;
-
- TxtScr.SetVideo(BLUE,LIGHTGRAY);
- clrscr;
- writeln('Copyright 1990, John W. Small, All Rights Reserved');
- writeln('PSW / Power SoftWare, P.O. Box 10072, McLean, VA 22102 8072');
- writeln;
- writeln('CrtPlus provides keyboard, cursor, and window enhancements');
- writeln('to Turbo Pascal 5.5''s crt unit. This demo covers only the');
- writeln('highlights. For full details read crtplus.pas which');
- writeln('contains the unit''s interface section. If you send $20');
- writeln('registration fee you will receive source code and manual');
- writeln('on disk.');
- writeln;
- writeln('Press any key to preceed with demo.');
- ch := crtplus.readkey;
-
-
-
- { TextWindow }
-
- tw.window(10,10,50,23);
- TxtScr.SetVideo(WHITE,RED);
- clrscr;
- writeln('This is a TextWindow object.');
- writeln;
- writeln('Example:');
- writeln;
- writeln(' var tw : TextWindow;');
- writeln;
- writeln(' tw.window(10,10,50,23);');
- writeln;
- writeln(' tw.done;');
- ch := crtplus.readkey;
-
-
- { ShadowWindow }
-
- stw.window(5,7,42,20);
- stw.title(TxtScr.svideo(BLUE,RED),' ShadowTextWindow ');
- TxtScr.SetVideo(WHITE,GREEN);
- clrscr;
- writeln;
- writeln('ShadowTextWindow is an object derived from the TextWindow object.');
- writeln;
- writeln('Example:');
- writeln;
- writeln(' var stw : ShadowTextWindow;');
- writeln;
- writeln(' stw.window(5,7,42,20);');
- writeln;
- writeln(' stw.done;');
- ch := crtplus.readkey;
-
-
- { FramedTextWindow }
-
- ftw.window(15,3,70,18);
- ftw.frame(TxtScr.svideo(YELLOW,RED),svsh);
- ftw.titleFooter(true,$4E,'[ FramedTextWindow ]');
- ftw.scrollBar(true,$4E,svsh,2,10);
- ftw.scrollBar(false,$4E,svsh,5,8);
- TxtScr.SetVideo(WHITE,BLUE);
- clrscr;
- writeln('FramedTextWindow is also derived from TextWindow.');
- writeln('It has optional title/footer and scroll bars.');
- writeln;
- writeln('Example:');
- writeln;
- writeln(' var ftw : FramedTextWindow;');
- writeln;
- writeln(' ftw.window(15,3,70,18);');
- writeln;
- writeln(' ftw.done;');
- ch := crtplus.readkey;
-
- { TextScreen }
-
- writeln;
- writeln('var TxtScr : TextScreen; object demo');
- TxtScr.windColor(WHITE,MAGENTA);
- ch := crtplus.readkey;
- TxtScr.windColor(WHITE,CYAN);
- ch := crtplus.readkey;
- ftw.done;
- ch := crtplus.readkey;
-
- stw.done;
- ch := crtplus.readkey;
-
- { CursorShape }
-
- writeln;
- write('var cursor : CursorShape; object demo: ');
- cursor.block;
- ch := crtplus.readkey;
- cursor.off;
- ch := crtplus.readkey;
- cursor.restore;
- ch := crtplus.readkey;
- tw.done;
-
- writeln;
- TxtScr.SetVideo(WHITE,BLUE);
- writeln('CrtPlus works in all the text modes supported by Turbo Pascal ');
- writeln('including 43/50 line modes! It also respects the setting of ');
- writeln('Crt.CheckSnow and Crt.DirectVideo! The only restriction is ');
- writeln('that your call TxtScr.TextMode() instead of Crt.TextMode() ');
- writeln('when changing video modes. Unlike other windowing tools, ');
- writeln('CrtPlus extends Turbo Pascal''s form of windows instead of ');
- writeln('replacing it. Thus all of Turbo''s window relative routines ');
- writeln('work as usual in CrtPlus windows. You can also quickly design');
- writeln('your own style of window as an extension of a CrtPlus window. ');
- ch := crtplus.readkey;
- TxtScr.done;
-
- end.