home *** CD-ROM | disk | FTP | other *** search
- { =========================================================================== }
- { WndwDemo.pas - Multi-level window demo for WNDW40.TPU ver 4.0, 12-12-87 }
- { }
- { This program shows you some of basic window utilities. It only shows }
- { access any window at any time. You can even hide the top level window for }
- { displaying later. }
- { =========================================================================== }
-
- program WindowDemo;
-
- {$M 16384, 22000, 22000 }
- {$R-,S-,I+,D-,T-,F-,V-,B-,N-,L+ }
-
- uses Crt,Qwik,WndwVars,Wndw;
-
- type
- Str80 = string[80];
- Steps = (Step0,Step1,Step2,Step3,Step3b,Step3c,Step4,Step5,Step5b,Step6,
- Step7,Step8,Step9,Step9b,Step9c,Step11,Step12,Step13,Step14,
- Step15,Step16,Step17);
-
- var
- Step: Steps;
- i,j,k,m,OldCursor: word;
- Battr,Wattr: integer;
- Key: char;
-
- const
- FuncKey = #00;
- RetKey = #13;
- EscKey = #27;
- StrA : array [1..17] of Str80 = (
- 'The windowing utilities in the file WNDW40.ARC',
- 'combined with QWIK40.ARC are ShareWare routines',
- 'that allow Turbo Pascal 4.0 to create incredibly',
- 'fast multi-level random-access windows. Here is',
- 'the kind of windows you can create:',
- '',
- ' Size: 2x2 to screen limits',
- ' Colors: 256 for window and/or border',
- ' Borders: 12 styles, 2 custom, or no border',
- ' Partitions: Horizontal, vertical and cross',
- ' Column mode: 40/80/variable',
- ' Text modes: All (0..3, 7)',
- '',
- 'These windows can be accessed at any level, shuf-',
- 'fled around, or even moved by the end user. These',
- 'utilities automatically configure to your video',
- 'card(s) and mode for the greatest speed.');
-
- StrB : array [1..11] of Str80 = (
- 'WNW40.ARC consists of fourteen utilities:',
- '',
- ' InitWindow TitleWindow',
- ' SetWindowModes ClearTitle',
- ' MakeWindow ClearWindow',
- ' PartitionWindow HideWindow',
- ' PartitionCross ShowWindow',
- ' ScrollWindow MoveWindow',
- ' RemoveWindow AccessWindow',
- '',
- 'and are described in the following windows:');
-
- StrC : array [1..6] of Str80 = (
- 'FORMAT: InitWindow (WindowAttr: byte, ClearScr: boolean);',
- '',
- 'InitWindow initializes 24 variables needed by the utilities.',
- 'You can select the foreground and background colors of the',
- 'initial screen display with the option to clear the screen.',
- 'InitWindow must be called before using any other procedures.');
-
- StrC1 : array [1..12] of Str80 = (
- 'FORMAT: SetWindowModes (SumOfAllModes: byte);',
- '',
- 'SetWindowModes is any easy way to set the following window mode',
- 'constants saved in the global variable WindowModes:',
- '',
- ' PermMode = $01 - Can''t be moved or removed; no underlay',
- ' FixedMode = $02 - Can''t be moved or accessed',
- ' ShadowLeft = $04 - Shadow on the left side',
- ' ShadowRight = $08 - Shadow on the right side',
- ' ZoomMode = $10 - Zoom effect on Make and AccessWindow',
- '',
- 'WindowModes is maintained for subsequent windows until changed.');
-
- StrC2: array [1..9] of Str80 = (
- 'CGA:',
- 'The CGA is self-regulating and controls the',
- 'zoom rate.',
- 'MDA, EGA, MCGA, VGA, Hercules, and others:',
- 'These video cards are quite fast and need a',
- 'delay for the effect. A default value of 12',
- 'or 18 milliseconds is used in "ZoomDelay",',
- 'the latter is used on faster 80286/80386',
- 'machines.');
-
- StrD1 : array [1..16] of Str80 = (
- 'FORMAT: MakeWindow (Row,Col,Rows,Cols: byte; Wattr,Battr: integer;',
- ' BrdrSel: Borders; WindowName: WindowNames);',
- '',
- 'MakeWindow creates a new blank window starting at (row,col) and',
- 'extending for a number of rows and columns (rows,cols). If a border',
- 'exists, the Turbo window will be shrunk within the borders. A name',
- 'serves as an ID for random access. The border can be any one of the',
- 'following:',
- '',
- ' NoBrdr - just window EvenSolidBrdr - evenly solid',
- ' BlankBrdr - blank spaces ThinSolidBrdr1 - thin solid line',
- ' SingleBrdr - single line ThinSolidBrdr2 - thin solid line',
- ' DoubleBrdr - double line LhatchBrdr - light hatch',
- ' HdoubleBrdr - horiz double MhatchBrdr - medium hatch',
- ' VdoubleBrdr - vert double HhatchBrdr - heavy hatch',
- ' SolidBrdr - solid UserBrdr1/2 - user defined borders');
-
- StrD2 : array [1..6] of Str80 = (
- 'FORMAT: PartitionWindow (Direction: DirType; RowOrCol: byte);',
- ' PartitionCross (WindowRow,WindowCol: byte);',
- 'Partitions can be made inside any window with a border as shown.',
- 'Simply specify the direction (Horiz/Vertical) and the location',
- 'relative to the Turbo window. A PartitionCross is needed where',
- 'both the vertcial and horizontal intersect.');
-
- StrE : array [1..4] of Str80 = (
- 'FORMAT: RemoveWindow;',
- 'RemoveWindow removes the top level',
- 'window from the screen and also',
- 'from memory.');
-
- StrF : array [1..2] of Str80 = (
- 'See if your BIOS gives you flicker',
- 'when your screen rolls down next ...');
-
- StrG : array [1..16] of Str80 = (
- '',
- 'FORMAT: ScrollWindow (RowBegin,RowEnd: byte; Dir: DirType);',
- '',
- 'Turbo''s standard procedures InsLine and DelLine may have worked just',
- 'fine this window. However, if your screen just had some bad flicker',
- 'as it was scrolling down, your BIOS is not flicker-free. To keep the',
- 'display flicker-free, to work on other video pages, VGA, or EGA, then',
- 'you will need this procedure. The upward scroll used ScrollWindow,',
- 'so no flicker was seen then. It also scrolls partial windows.',
- '',
- 'The direction of scroll can be either of the following:',
- '',
- ' ''Up'' - to scroll up',
- ' ''Down'' - to scroll down',
- '',
- '');
-
- StrH : array [1..5] of Str80 = (
- 'FORMAT: TitleWindow (TopOrBottom,Justify: DirType;',
- ' Title: string);',
- 'TitleWindow places a title in the top or bottom',
- 'border of the current window. Justify permits Left,',
- 'Center, or Right justification of the title.');
-
- StrH2 : array [1..3] of Str80 = (
- 'FORMAT: ClearTitle (TopOrBottom: DirType);',
- 'ClearTitle clears the entire top or bottom',
- 'border of a title by restoring the border.');
-
- StrH3 : array [1..4] of Str80 = (
- 'FORMAT: ClearWindow;',
- 'ClearWindow works just',
- 'like ClrScr, but also',
- 'on any video page.');
-
- StrJ : array [1..5] of Str80 = (
- 'The maximum number of windows that',
- 'may be on the screen at any one time',
- 'is specified by the constant',
- '"MaxWndw". Assign it in the unit',
- 'called WNDWVARS.PAS.');
-
- StrK : array [1..10] of Str80 = (
- 'In addition to windows, there are 17 powerful',
- 'QWIK screen write procedures you can use:',
- ' Qwrite QfillC GotoRC',
- ' QwriteC Qfill CursorChange',
- ' QwriteA QstoreToMem CursorOn',
- ' Qattr QstoreToScr CursorOff',
- ' QattrC QviewPage WhereR',
- ' QwritePage WhereC',
- 'In QWIK40.ARC, compile and run QWIKDEMO.PAS to',
- ' see all of the features.');
-
- StrL : array [1..20] of Str80 = (
- 'The procedures are used as follows:',
- '',
- ' program YourProgram;',
- ' uses Qwik,Crt,WndwVars,Wndw;',
- ' ...Your variables and procedures...',
- ' begin',
- ' InitWindow (WindowAttr,ClearScr);',
- ' SetWindowModes (SumOfAllModes);',
- ' MakeWindow (Row,Col,Rows,Cols,Wattr,Battr,',
- ' BrdrSelection,WindowName);',
- ' PartitionWindow (Direction,WindowRowOrCol);',
- ' PartitionCross (WindowRow,WindowCol);',
- ' TitleWindow (TopOrBottom,Justify,''Title'');',
- ' ...',
- ' MoveWindow (Direction,NumOfChars);',
- ' AccessWindow (WindowName);',
- ' RemoveWindow;',
- ' end.',
- '',
- '{ Use one RemoveWindow for each MakeWindow. }');
-
- StrM : array [1..15] of Str80 = (
- 'WNDW40.TPU works these ...',
- '',
- 'COMPUTERS: ADAPTERS:',
- '------------------ ---------',
- 'IBM PC MDA',
- 'IBM XT CGA',
- 'IBM AT EGA',
- 'IBM PCjr MCGA',
- 'IBM PC Convertible VGA',
- 'IBM PS/2 Model 25 8514/A',
- 'IBM PS/2 Model 30 Hercules:',
- 'IBM PS/2 Model 50 HGC',
- 'IBM PS/2 Model 60 HGC Plus',
- 'IBM PS/2 Model 80 InColor',
- 'IBM 3270 PC');
-
- StrN : array [1..9] of Str80 = (
- 'This demo was for serial access.',
- 'For the random-access demo of:',
- '',
- ' HideWindow',
- ' ShowWindow',
- ' MoveWindow',
- ' AccessWindow',
- '',
- 'run WMGRDEMO.PAS.');
-
- StrO : array [1..7] of Str80 = (
- 'If you have any questions or comments,',
- 'please write to or call:',
- '',
- ' Jim H. LeMay (CIS 76011,217)',
- ' 6341 Klamath Rd.',
- ' Ft. Worth, TX 76116',
- ' 1-(817)-735-4833 (after 1730 CST)');
-
- procedure Display30windows;
- begin
- { -- Throw out 30 windows 4 times -- }
- randomize;
- for m:=1 to 4 do
- begin
- for i:=1 to 30 do
- begin
- j := random (60);
- k := random (20);
- TextAttr:=yellow+GreenBG;
- MakeWindow (k+1,j+1,6,21,black+GreenBG,TextAttr,DoubleBrdr,
- aWindow);
- with TopWndwStat do
- begin
- QwriteC (WSrow+2,WScol,WScol2, -1,'Random-Access');
- QwriteC (WSrow+3,WScol,WScol2, -1,'WINDOWS');
- end;
- end;
- if m=4 then
- delay (1500)
- else delay ( 300);
- for i:=LI downto 1 do
- RemoveWindow;
- end
- end;
-
- procedure DisplayInitialScreen;
- begin
- { -- Create initial screen -- }
- QwriteC ( 1, 1,CRTcols, -1,'Turbo PASCAL Windows Tutorial');
- QwriteC ( 2, 1,CRTcols, -1,'Version 4.0');
- TextColor (black);
- QwriteC ( 4, 1,CRTcols,TextAttr,'For each of the following displays:');
- Qwrite ( 5,26 ,TextAttr,'1. Press RETURN to continue.');
- Qwrite ( 6,26 ,TextAttr,'2. Press ESC to back up.');
- QwriteC (12, 1,CRTcols,TextAttr,
- 'This is the original screen without windows.');
- Step:=Step0;
- end;
-
- procedure DisplayGeneral;
- begin
- { -- General description -- }
- SetWindowModes (ShadowRight);
- MakeWindow (4,15,19,52,black+GreenBG,black+GreenBG,HdoubleBrdr,aWindow);
- TitleWindow (Top,Center,' Turbo Pascal 4.0 Windows ');
- with TopWndwStat do
- begin
- for j:= 1 to 6 do Qwrite (WSrow+j,WScol+1, -1,StrA[j]);
- for j:= 7 to 12 do Qwrite (WSrow+j,WScol+1,yellow+GreenBG,StrA[j]);
- for j:=13 to 17 do Qwrite (WSrow+j,WScol+1, -1,StrA[j]);
- end;
- end;
-
- procedure DisplayList;
- begin
- { -- List of Procedures -- }
- SetWindowModes (0);
- MakeWindow (5,2,15,47,black+CyanBG,white+BlueBG,MhatchBrdr,aWindow);
- TitleWindow (Top,Center,' Fourteen Utilities ');
- with TopWndwStat do
- begin
- Qwrite (WSrow+2 ,WScol+2, -1,StrB[ 1]);
- for j:=2 to 9 do Qwrite (WSrow+1+j,WScol+2,white+CyanBG,StrB[ j]);
- Qwrite (WSrow+12 ,WScol+2, -1,StrB[11])
- end;
- end;
-
- procedure DisplayInitWindow;
- begin
- { -- InitWindow description -- }
- SetWindowModes (0);
- MakeWindow (10,16,10,64,yellow+RedBG,yellow+RedBG,SingleBrdr,aWindow);
- TitleWindow (Top,Left,' InitWindow ');
- with TopWndwStat do
- begin
- for j:=1 to 2 do Qwrite (WSrow+1+j,WScol+2,cyan+RedBG ,StrC[j]);
- for j:=3 to 6 do Qwrite (WSrow+1+j,WScol+2,white+RedBG,StrC[j]);
- end;
- end;
-
- procedure DisplaySetWindowModes;
- begin
- { -- SetWindowModes description -- }
- SetWindowModes (0);
- MakeWindow (6,9,16,67,yellow+BlueBG,brown+BlueBG,HdoubleBrdr,aWindow);
- TitleWindow (Top,Left,' SetWindowModes ');
- with TopWndwStat do
- begin
- for j:=1 to 2 do Qwrite (WSrow+1+j,WScol+2,white+BlueBG,StrC1[j]);
- for j:=3 to 12 do Qwrite (WSrow+1+j,WScol+2, -1,StrC1[j]);
- end;
- end;
-
- procedure DisplayZoomMode;
- begin
- { -- Zoom mode description -- }
- SetWindowModes (ZoomMode);
- MakeWindow (10,25,14,49,black+GreenBG,white+GreenBG,DoubleBrdr,aWindow);
- TitleWindow (Top,Left,' ZoomMode Control ');
- with TopWndwStat do
- begin
- Qwrite (WSrow+2 ,WScol+2,white+GreenBG,StrC2[1]);
- for j:=2 to 3 do Qwrite (WSrow+1+j,WScol+2, -1,StrC2[j]);
- Qwrite (WSrow+6 ,WScol+2,white+GreenBG,StrC2[4]);
- for j:=5 to 9 do Qwrite (WSrow+2+j,WScol+2, -1,StrC2[j]);
- end;
- end;
-
- procedure DisplayMakeWindow;
- begin
- { -- MakeWindow description -- }
- SetWindowModes (0);
- MakeWindow (5,6,20,72,lightmagenta+BlueBG,lightmagenta+BlueBG,SolidBrdr,
- aWindow);
- TitleWindow (Top,Left,' MakeWindow ');
- with TopWndwStat do
- begin
- for j:=1 to 2 do Qwrite (WSrow+1+j,WScol+2,lightred+BlueBG,StrD1[j]);
- for j:=3 to 16 do Qwrite (WSrow+1+j,WScol+2,yellow+BlueBG ,StrD1[j]);
- end;
- end;
-
- procedure DisplayBorders;
- {}procedure MakePartitions;
- {}begin
- {} PartitionWindow (Horiz ,2);
- {} PartitionWindow (Vertical,5);
- {} PartitionCross ( 2,5);
- {}end;
- begin
- { -- Display different borders -- }
- SetWindowModes (0);
- Battr:=yellow+GreenBG;
- Wattr:=black+GreenBG;
- MakeWindow (8,2,5,11,Wattr,Battr,Borders(NoBrdr),aWindow);
- MakePartitions;
- MakeWindow (11,8,5,11,Wattr,yellow+BrownBG,Borders(BlankBrdr),aWindow);
- MakePartitions;
- for i:=2 to 5 do
- begin
- MakeWindow (3*i-4,6*i-4,5,11,Wattr,Battr,Borders(i),aWindow);
- MakePartitions;
- end;
- for i:=6 to 8 do
- begin
- MakeWindow (3*i-13,6*i-4,5,11,Wattr,Battr,Borders(i),aWindow);
- MakePartitions;
- end;
- for i:=9 to 11 do
- begin
- MakeWindow (3*i-22,6*i-4,5,11,Wattr,Battr,Borders(i),aWindow);
- MakePartitions;
- end;
- for i:=12 to 13 do
- begin
- MakeWindow (3*i-34,6*i-9,5,11,Wattr,Battr,Borders(i),aWindow);
- MakePartitions;
- end;
- end;
-
- procedure DisplayPartitions;
- begin
- { -- PartitionWindow description -- }
- SetWindowModes (0);
- MakeWindow (16, 8,10,68,lightgreen,lightgreen,SingleBrdr,aWindow);
- TitleWindow (Top,Left,' PartitionWindow/PartitionCross ');
- with TopWndwStat do
- begin
- for j:=1 to 2 do Qwrite (WSrow+1+j,WScol+2,yellow+BlackBG,StrD2[j]);
- for j:=3 to 6 do Qwrite (WSrow+1+j,WScol+2, -1,StrD2[j]);
- end;
- end;
-
- procedure DisplayRemoveWindow;
- begin
- { -- RemoveWindow description -- }
- SetWindowModes (0);
- MakeWindow (11,22, 9,38,black+BrownBG,black+BrownBG,DoubleBrdr,
- aWindow);
- TitleWindow (Top,Left,' RemoveWindow ');
- with TopWndwStat do
- begin
- Qwrite (WSrow+2 ,WScol+2,yellow+BrownBG ,StrE[1]);
- for j:=2 to 4 do Qwrite (WSrow+2+j,WScol+2,white+BrownBG ,StrE[j]);
- end;
- end;
-
- procedure DisplayFlicker;
- begin
- { -- Flicker Note -- }
- SetWindowModes (ShadowRight);
- MakeWindow (11,22, 4,40,black+BrownBG,black+BrownBG,HdoubleBrdr,
- aWindow);
- with TopWndwStat do
- for j:=1 to 2 do
- Qwrite (WSrow+j,WScol+2,-1,StrF[j]);
- SetWindowModes (0);
- end;
-
- procedure DisplayScrollWindow;
- begin
- { -- ScrollWindow description -- }
- TitleWindow (Top,Left,' ScrollWindow ');
- with TopWndwStat do
- begin
- GotoRC (succ(WSrow),succ(WSCol));
- for j :=1 to 17 do InsLine;
- for j :=1 to 16 do
- begin
- ScrollWindow (1,18,up);
- Qwrite (WSrow+17,WScol+1,-1,StrG[j])
- end;
- end;
- end;
-
- procedure DisplayTitleWindow;
- begin
- { -- TitleWindow description -- }
- SetWindowModes (ZoomMode);
- MakeWindow (12,16,10,56,black+LightGrayBG,red+LightGrayBG,EvenSolidBrdr,
- aWindow);
- TitleWindow (Top ,Left ,' TitleWindow ');
- TitleWindow (Top ,Center,' TitleWindow ');
- TitleWindow (Top ,Right ,' TitleWindow ');
- TitleWindow (Bottom,Left ,' TitleWindow ');
- TitleWindow (Bottom,Center,' TitleWindow ');
- TitleWindow (Bottom,Right ,' TitleWindow ');
- with TopWndwStat do
- begin
- for j:=1 to 2 do Qwrite (WSrow+1+j,WScol+2,-1,StrH[j]);
- for j:=3 to 5 do Qwrite (WSrow+2+j,WScol+2,-1,StrH[j]);
- end;
- end;
-
- procedure DisplayClearTitle;
- begin
- { -- ClearTitle description -- }
- ClearTitle (Bottom);
- SetWindowModes (ZoomMode);
- MakeWindow ( 9,21, 8,47,lightcyan+BlueBG,lightcyan+BlueBG,
- HdoubleBrdr,aWindow);
- TitleWindow (Top,Left,' ClearTitle ');
- with TopWndwStat do
- begin
- Qwrite (WSrow+2 ,WScol+2,yellow+BlueBG,StrH2[1]);
- for j:=2 to 3 do Qwrite (WSrow+2+j,WScol+2, -1,StrH2[j]);
- end;
- end;
-
- procedure DisplayClearWindow;
- begin
- { -- ClearWindow description -- }
- SetWindowModes (ZoomMode);
- MakeWindow (15,13, 9,26,black+GreenBG,brown+GreenBG,
- HhatchBrdr,aWindow);
- TitleWindow (Top,Left,' ClearWindow ');
- with TopWndwStat do
- begin
- Qwrite (WSrow+2 ,WScol+2,yellow+GreenBG,StrH3[1]);
- for j:=2 to 4 do Qwrite (WSrow+2+j,WScol+2, -1,StrH3[j]);
- end;
- end;
-
- procedure DisplayMaxWndw;
- begin
- { -- MaxWndw constant -- }
- SetWindowModes (ZoomMode);
- MakeWindow (17, 9, 8,38,black+BrownBG,black+BrownBG,NoBrdr,aWindow);
- TitleWindow (Top,Center,'- WINDOW LIMITS -');
- with TopWndwStat do
- for j:=1 to 5 do Qwrite (WSrow+j+1,WScol+1,-1,StrJ[j]);
- end;
-
- procedure DisplayQWIK40;
- begin
- { -- QWIK40.TPU procedures -- }
- SetWindowModes (ZoomMode);
- MakeWindow (8,20,15,51,yellow+RedBG,yellow+RedBG,EvenSolidBrdr,aWindow);
- TitleWindow (Top,Center,' QWIK Utilities ');
- with TopWndwStat do
- begin
- for j:=1 to 2 do Qwrite (WSrow+1+j,WScol+2, -1,StrK[j]);
- for j:=3 to 8 do Qwrite (WSrow+2+j,WScol+2,white+RedBG,StrK[j]);
- for j:=9 to 10 do Qwrite (WSrow+3+j,WScol+2, -1,StrK[j])
- end;
- end;
-
- procedure DisplayProgramming;
- begin
- { -- Programming for WNDW40.TPU -- }
- SetWindowModes (ZoomMode);
- MakeWindow (2,25,23,50,yellow+MagentaBG,yellow+MagentaBG,MhatchBrdr,aWindow);
- TitleWindow (Top,Center,' Programming ');
- with TopWndwStat do
- for j:=1 to 20 do Qwrite (WSrow+1+j,WScol+2,-1,StrL[j]);
- end;
-
- procedure DisplayEquipmentList;
- begin
- { -- Compatible computers and adapters for WNDW40.TPU -- }
- SetWindowModes (ZoomMode);
- MakeWindow (4,35,17,34,black+BrownBG,black+BrownBG,HdoubleBrdr,aWindow);
- TitleWindow (Top,Center,' Software Compatibility ');
- with TopWndwStat do
- for j:=1 to 15 do Qwrite (WSrow+j,WScol+2,white+BrownBG,StrM[j]);
- end;
-
- procedure DisplayWndwMgrDemo;
- begin
- { -- Prompt for next demo -- }
- SetWindowModes (ZoomMode);
- MakeWindow (6,29,13,36,white+GreenBG,yellow+GreenBG,ThinSolidBrdr2,aWindow);
- TitleWindow (Top,Center,' Window Management Demo ');
- with TopWndwStat do
- for j:=1 to 9 do Qwrite (WSrow+j+1,WScol+2,-1,StrN[j]);
- end;
-
- procedure DisplayAuthor;
- begin
- { -- Author for WNDW40.TPU -- }
- SetWindowModes (ZoomMode);
- if VideoMode<>7 then
- SetWindowModes (WindowModes+ShadowRight);
- Brdr[UserBrdr2].BrdrArray:='┌┴┐┤├└┬┘┼─┼┼│┼┼';
- MakeWindow (8,20,11,42,black+BrownBG,black+BrownBG,UserBrdr2,aWindow);
- with TopWndwStat do
- for j:=1 to 7 do
- Qwrite (WSrow+1+j,WScol+2,white+BrownBG,StrO[j]);
- TitleWindow (Bottom,Center,' Press RETURN to exit ');
- end;
-
- procedure GetKey;
- var
- ExtKey: boolean;
- begin
- repeat
- Key:=ReadKey; { Read keyboard input. }
- if KeyPressed and (Key=FuncKey) then { If first Char was #00 ... }
- begin
- Key:=ReadKey; { ... read second char. }
- ExtKey := true
- end
- else ExtKey:=false;
- until (Key=RetKey) or (Key=EscKey);
- end;
-
- procedure FindNextStep;
- begin
- case Key of
- EscKey: begin
- if Step>Step0 then
- begin
- RemoveWindow;
- case Step of
- Step5: for j:=1 to 13 do RemoveWindow;
- Step7: begin
- DisplayBorders;
- DisplayPartitions;
- DisplayRemoveWindow;
- end;
- Step8: Step:=Step4;
- end; { case }
- dec (Step);
- end
- end;
- RetKey: begin
- inc (Step);
- case Step of
- Step7: for i:=1 to 16 do RemoveWindow;
- Step8: RemoveWindow;
- end
- end;
- end { case }
- end;
-
- procedure DisplayWindows;
- begin
- repeat
- GetKey;
- FindNextStep;
- if Key=RetKey then
- case Step of
- Step1: DisplayGeneral;
- Step2: DisplayList;
- Step3: DisplayInitWindow;
- Step3b: DisplaySetWindowModes;
- Step3c: DisplayZoomMode;
- Step4: DisplayMakeWindow;
- Step5: DisplayBorders;
- Step5b: DisplayPartitions;
- Step6: DisplayRemoveWindow;
- Step7: DisplayFlicker;
- Step8: DisplayScrollWindow;
- Step9: DisplayTitleWindow;
- Step9b: DisplayClearTitle;
- Step9c: DisplayClearWindow;
- Step11: DisplayMaxWndw;
- Step12: DisplayQWIK40;
- Step13: DisplayProgramming;
- Step14: DisplayEquipmentList;
- Step15: DisplayWndwMgrDemo;
- Step16: DisplayAuthor;
- end;
- until Step=Step17;
- end;
-
- procedure CheckCursor;
- var CursorMode: integer absolute $0040:$0060;
- begin
- if (ActiveDispDev=MdaMono) and (CursorMode=$0607) then
- CursorChange($0C0D,OldCursor);
- end;
-
- begin
- InitWindow (blue+LightGrayBG,true);
- CheckCursor;
- CursorOff;
- Display30windows;
- DisplayInitialScreen;
- DisplayWindows;
- { -- Use the following statment to return to the original screen.-- }
- for i:=1 to LI do RemoveWindow;
- Qfill (1,1,25,CRTcols,TextAttr,' ');
- QwriteC (12,1,CRTcols,TextAttr,'(c) 1986,1987 James H. LeMay');
- QwriteC (13,1,CRTcols,TextAttr,'This concludes the windows tutorial...');
- delay (2000);
- NormVideo;
- ClrScr;
- CursorOn;
- end.