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

  1. Program PullTTT5_Demo_1;
  2.  
  3. Uses Crt, FastTTT5, WinTTT5, KeyTTT5, PullTTT5;
  4.  
  5. { Notes:   1) The Pull_Array Type is an array of strings holding the
  6.               description of the menu titles.
  7.            2) The main headings of each pull down option must start
  8.               with a '\'.
  9.            3) The last choice in the array must be followed by a
  10.               string '\\'.
  11.   Thats all there is to it.}
  12.  
  13. var
  14.   TheMenu : Pull_Array;   {Array holding the menu definitions}
  15.   Major,Minor : byte;
  16.   Ch : char;
  17.  
  18. begin   {main demo program}
  19.     Fillchar(TheMenu,sizeof(TheMenu),#0);    {Empty the array}
  20.     TheMenu[1] := '\File';      {menu definition for pull down menu}
  21.     TheMenu[2] := 'Load        ';
  22.     TheMenu[2] := 'Pick        ';
  23.  
  24.     TheMenu[3] := 'New         ';
  25.     TheMenu[4] := 'Save        ';
  26.     TheMenu[5] := 'Write to    ';
  27.     TheMenu[6] := 'Directory   ';
  28.     TheMenu[7] := 'Change dir  ';
  29.     TheMenu[8] := 'OS shell    ';
  30.     TheMenu[9] := 'Quit        ';
  31.  
  32.     TheMenu[10] :=  '\Edit ';
  33.  
  34.     TheMenu[11] :=  '\Run ';
  35.     TheMenu[12] :=  'Program reset ';
  36.     TheMenu[13] :=  'Go to cursor  ';
  37.     TheMenu[14] :=  'Trace into    ';
  38.     TheMenu[15] :=  ' Step Over    ';
  39.     TheMenu[16] :=  'User Screen   ';
  40.  
  41.     TheMenu[17] := '\Compile';
  42.     TheMenu[18] := 'Compile      ';
  43.     TheMenu[19] := 'Make         ';
  44.     TheMenu[20] := 'Build        ';
  45.     TheMenu[21] := 'Destination  ';
  46.     TheMenu[22] := 'Find Error   ';
  47.     TheMenu[23] := 'Primary file ';
  48.     TheMenu[24] := 'Get Info     ';
  49.  
  50.     TheMenu[25] := '\Options';
  51.     TheMenu[26] := 'Compiler        ';
  52.     TheMenu[27] := 'Linker          ';
  53.     TheMenu[28] := 'Environment     ';
  54.     TheMenu[29] := 'Directories     ';
  55.     TheMenu[30] := 'Parameters      ';
  56.     TheMenu[31] := 'Save Options    ';
  57.     TheMenu[32] := 'Retrieve Options';
  58.  
  59.     TheMenu[22] := '\Debug';
  60.     TheMenu[23] := 'Evaluate              ';
  61.     TheMenu[23] := 'Call stack            ';
  62.     TheMenu[24] := 'Find procedure        ';
  63.     TheMenu[25] := 'Integrated debugging  ';
  64.     TheMenu[26] := 'Stand-alone debugging ';
  65.     TheMenu[27] := 'Display Swapping      ';
  66.     TheMenu[28] := 'Refresh display       ';
  67.  
  68.     TheMenu[29] := '\Break/Watch';
  69.     TheMenu[30] := 'Add Watch             ';
  70.     TheMenu[31] := 'Delete Watch          ';
  71.     TheMenu[32] := 'Edit Watch            ';
  72.     TheMenu[33] := 'Remove all watches    ';
  73.     TheMenu[34] := 'Toggle breakpoint     ';
  74.     TheMenu[35] := 'Clear all breakpoints ';
  75.     TheMenu[36] := 'View next breakpoint  ';
  76.  
  77.     TheMenu[37] := '\\';
  78.  
  79.     Major := 1;
  80.     Minor := 4;
  81.  
  82.     FillScreen(1,1,80,25,white,blue,chr(177));
  83.     Pull_Menu(TheMenu,Major,Minor);
  84.     Clrscr;
  85.     If Major = 0 then
  86.        Write('You escaped')
  87.     else
  88.        Write('You selected main menu ',Major,' and sub-topic ',Minor);
  89.     WriteAT(1,4,white,black,'Run DemoTTT.exe for the main demo program');
  90.     WriteAT(1,5,white,black,'TechnoJock''s Turbo Toolkit v5.0');
  91.     GotoXY(1,7);
  92. end.
  93.