home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / tttdem51.zip / PULLDEM2.PAS < prev    next >
Pascal/Delphi Source File  |  1989-01-31  |  3KB  |  101 lines

  1. Program PullTTT5_Demo_2;
  2.  
  3. Uses Crt, FastTTT5, WinTTT5, KeyTTT5, PullTTT5;
  4.  
  5.  
  6. {This program is very similar to Pulldem1.pas. The main difference the
  7.  the look and feel of the menu has bee modified by changing elements
  8.  of the PTTT record}
  9.  
  10. var
  11.     TheMenu : Pull_Array;   {Array holding the menu definitions}
  12.     Major,Minor : byte;
  13.  
  14.       Procedure Define_Demo_Menu;
  15.       begin
  16.          Fillchar(TheMenu,sizeof(TheMenu),#0);    {Empty the array}
  17.          TheMenu[1] := '\File';      {menu definition for pull down menu}
  18.          TheMenu[2] := 'Load        ';
  19.          TheMenu[2] := 'Pick        ';
  20.  
  21.          TheMenu[3] := 'New         ';
  22.          TheMenu[4] := 'Save        ';
  23.          TheMenu[5] := 'Write to    ';
  24.          TheMenu[6] := 'Directory   ';
  25.          TheMenu[7] := 'Change dir  ';
  26.          TheMenu[8] := 'OS shell    ';
  27.          TheMenu[9] := 'Quit        ';
  28.  
  29.          TheMenu[10] :=  '\Edit ';
  30.  
  31.          TheMenu[11] :=  '\Run ';
  32.          TheMenu[12] :=  'Program reset ';
  33.          TheMenu[13] :=  'Go to cursor  ';
  34.          TheMenu[14] :=  'Trace into    ';
  35.          TheMenu[15] :=  ' Step Over    ';
  36.          TheMenu[16] :=  'User Screen   ';
  37.  
  38.          TheMenu[17] := '\Compile';
  39.          TheMenu[18] := 'Compile      ';
  40.          TheMenu[19] := 'Make         ';
  41.          TheMenu[20] := 'Build        ';
  42.          TheMenu[21] := 'Destination  ';
  43.          TheMenu[22] := 'Find Error   ';
  44.          TheMenu[23] := 'Primary file ';
  45.          TheMenu[24] := 'Get Info     ';
  46.  
  47.          TheMenu[25] := '\Options';
  48.          TheMenu[26] := 'Compiler        ';
  49.          TheMenu[27] := 'Linker          ';
  50.          TheMenu[28] := 'Environment     ';
  51.          TheMenu[29] := 'Directories     ';
  52.          TheMenu[30] := 'Parameters      ';
  53.          TheMenu[31] := 'Save Options    ';
  54.          TheMenu[32] := 'Retrieve Options';
  55.  
  56.          TheMenu[22] := '\Debug';
  57.          TheMenu[23] := 'Evaluate              ';
  58.          TheMenu[23] := 'Call stack            ';
  59.          TheMenu[24] := 'Find procedure        ';
  60.          TheMenu[25] := 'Integrated debugging  ';
  61.          TheMenu[26] := 'Stand-alone debugging ';
  62.          TheMenu[27] := 'Display Swapping      ';
  63.          TheMenu[28] := 'Refresh display       ';
  64.  
  65.          TheMenu[29] := '\Break/Watch';
  66.          TheMenu[30] := 'Add Watch             ';
  67.          TheMenu[31] := 'Delete Watch          ';
  68.          TheMenu[32] := 'Edit Watch            ';
  69.          TheMenu[33] := 'Remove all watches    ';
  70.          TheMenu[34] := 'Toggle breakpoint     ';
  71.          TheMenu[35] := 'Clear all breakpoints ';
  72.          TheMenu[36] := 'View next breakpoint  ';
  73.  
  74.          TheMenu[37] := '\\';
  75.       end; {Proc Define demo menu}
  76.  
  77.  
  78. begin   {main demo program}
  79.     Define_Demo_Menu;
  80.     Major := 1;
  81.     Minor := 4;
  82.     FillScreen(1,1,80,25,white,blue,chr(177));
  83.     With PTTT do      {modify the display characteristics}
  84.     begin
  85.         Style := 0;  {0 no border, 1 single border, 2 double border}
  86.         TopX :=  1;
  87.         TopY := 2;
  88.         Gap :=  5;
  89.         AlwaysDown := true;
  90.     end; {With}
  91.     Pull_Menu(TheMenu,Major,Minor);
  92.     Clrscr;
  93.     If Major = 0 then
  94.        Write('You escaped')
  95.     else
  96.        Write('You selected main menu ',Major,' and sub-topic ',Minor);
  97.     WriteAT(1,4,white,black,'Run DemoTTT.exe for the main demo program');
  98.     WriteAT(1,5,white,black,'TechnoJock''s Turbo Toolkit v5.0');
  99.     GotoXY(1,7);
  100. end.
  101.