{ =========================================================================== }
{ PullDemo.pas - Full demonstration of pull-down menus.    ver 5.Xc, 05-29-89 }
{                                                                             }
{   Copyright (c) 1987-1989 James H. LeMay, All rights reserved.              }
{ =========================================================================== }

{ R-,S-,I-,D-,T-,F-,V-,B-,N-,L+ }         { TP4 directives }
{$A-,B-,D-,E-,F-,I-,L-,N-,O-,R-,S-,V-}    { TP5 directives }

{$M 16384,18000,18000 }

program PullDemo;

uses
  Crt,Qwik,Wndw,Pull,
  { You must include the following units for this demo! : }
  PullStat,PullData,PullWork,Goof;

var
  OrigPathName: string[67];

procedure DisplayScreen;
begin
  WWrite ( 1, 1,'PULLDEMO v5.Xc            Multi-level Pu'+
                'll-down Menus       Copr 1989  J H LeMay');
  ShowTopLine;
  SetWindowModes (PermMode);
  MakeWindow (3,1,CRTrows-3,CRTcols,White+BlueBG,LightGray+BlackBG,DoubleBrdr,
              Window1);
  SetWindowModes (0);
  TitleWindow (Top,Left,SameAttr,'1');
  TWS.WndwAttr := Yellow+BlueBG;
  WWriteC ( 2,'PULL5XC.ARC - MULTI-LEVEL PULL-DOWN MENUS');
  WWriteC ( 9,'This is Work Window 1.');
  TWS.WndwAttr := TWS.OrigAttr;
  WWriteC ( 4,'Use F1 everywhere for some descriptions.');
  WWriteC ( 5,'Use ''Quit'' to exit demo program.        ');
  WWriteC ( 6,'Be sure to try a CR at "ð" marked lines.');
  WWriteC ( 7,'Also try all the EnterData lines.       ');
  WWrite(11, 9,'The following Data Entry fields have some arbitrary values');
  WWrite(12, 9,'and ranges.  Move the highlight and edit.  Press F1 for help.');
end;

begin
{ Qsnow := false; }
  GetDir (0,OrigPathName);
  PathName := OrigPathName;
  PreferMultiTask := true;   { Use Multi-tasking MTVB if possible. }
  InitPull (LightGray,false); { <<-- Be sure you do this!! }
  DisplayScreen;
  GotoKeyDispatcher;          { <<-- All keyboard entries go through here! }
  if OrigPathName<>PathName then
    begin
      {$I-} ChDir(OrigPathName); {$I+}
      if IOresult<>0 then;
    end;
  AccessWindow (Window0);
  WClrScr;
  WGotoRC (CRTrows,1);
  SetCursor (CursorInitial);
end.
