home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / tot5.zip / DEMMN5.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-11  |  3KB  |  82 lines

  1. program DemoMenuFive;
  2. {DEMMN5 - a nested Lotus menu}
  3.  
  4. USES  DOS, CRT,
  5.       totMENU, totFAST;
  6.  
  7. var
  8.   Main,
  9.   Worksheet,
  10.   Range: LotusMenuOBJ;
  11.   Choice: word;
  12.  
  13. procedure Pretend;
  14. begin
  15.    Screen.Clear(31,' '); {paint the screen}
  16.    Screen.WriteAt(1,4,48,replicate(80,' '));
  17.    Screen.WriteCenter(4,48,'Not 1-2-3!');
  18.    Screen.PartClear(1,5,4,25,48,' ');
  19. end; {Pretend}
  20.  
  21. begin
  22.    Pretend;
  23.    with Worksheet do
  24.    begin
  25.       Init;
  26.       AddFullItem('~G~lobal',100,71,'Global stuff',nil);
  27.       AddFullItem('~I~nsert',101,73,'Insert stuff',nil);
  28.       AddFullItem('~D~elete',102,68,'Delete stuff',nil);
  29.       AddFullItem('~C~olumn',103,67,'Column stuff',nil);
  30.       AddFullItem('~E~rase',104,69,'Erase stuff',nil);
  31.       AddFullItem('~T~itles',105,84,'Titles stuff',nil);
  32.       AddFullItem('~W~indow',106,87,'Window stuff',nil);
  33.       AddFullItem('~S~tatus',107,83,'Status stuff',nil);
  34.       AddFullItem('~P~age',108,80,'Page stuff',nil);
  35.       AddFullItem('~H~ide',109,72,'Hide things',nil);
  36.       SetActiveItem(1);
  37.       SetGap(1);
  38.    end;
  39.    with Range do
  40.    begin
  41.       Init;
  42.       AddFullItem('~F~ormat',200,70,'Format stuff',nil);
  43.       AddFullItem('~L~abel',201,76,'Label stuff',nil);
  44.       AddFullItem('~E~rase',202,69,'Erase stuff',nil);
  45.       AddFullItem('~N~ame',203,78,'Name stuff',nil);
  46.       AddFullItem('~J~ustify',204,74,'Justify stuff',nil);
  47.       AddFullItem('~P~rot',205,80,'Protect stuff',nil);
  48.       AddFullItem('~U~nprot',206,85,'Unprotect stuff',nil);
  49.       AddFullItem('~I~nput',207,73,'Input stuff',nil);
  50.       AddFullItem('~V~alue',208,86,'Value stuff',nil);
  51.       AddFullItem('~T~rans',209,84,'Transpose stuff',nil);
  52.       AddFullItem('~S~earch',209,83,'Search for things',nil);
  53.       SetActiveItem(1);
  54.       SetGap(1);
  55.    end;
  56.    with Main do
  57.    begin
  58.       Init;
  59.       AddFullItem('~W~orksheet',1,87,'Worksheet and global operations',@Worksheet);
  60.       AddFullItem('~R~ange',2,82,'Commands for manipulating data ranges',@Range);
  61.       AddFullItem('~C~opy',3,67,'Cell and range copying commands',nil);
  62.       AddFullItem('~M~ove',4,77,'Cell and range moving commands',nil);
  63.       AddFullItem('~F~ile',5,70,'File loading and saving operations',nil);
  64.       AddFullItem('~P~rint',6,80,'Graph and spreadsheet printing',nil);
  65.       AddFullItem('~G~raph',7,71,'Spreadsheet charting',nil);
  66.       AddFullItem('~D~ata',8,68,'Database operations',nil);
  67.       AddFullItem('~S~ystem',9,83,'Drop to the Operating System',nil);
  68.       AddFullItem('~Q~uit',99,81,'Miller Time!',nil);
  69.       SetActiveItem(1);
  70.       SetGap(1);
  71.       Choice := Activate;
  72.       Done;
  73.       Worksheet.Done;
  74.       Range.Done;
  75.    end;
  76.    gotoxy(1,5);
  77.    if Choice = 0 then
  78.       Writeln('You escaped')
  79.    else
  80.       Writeln('You selected menu item ',Choice);
  81. end.    
  82.