home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / user_int.zip / INT.H < prev    next >
C/C++ Source or Header  |  1995-08-28  |  3KB  |  69 lines

  1. // Each menu must have items, hotkey definitions and messages.  All arrays //
  2. // must have the same # of elements, and must end with NULL as shown. //
  3. // The menus are fully automatic.  They size and position themselves. //
  4. // Ensure total length of main menu bar does not exceed 80 characters. //
  5. // To check the total size, use the calculation shown in the INT.CPP file //
  6. // under the size_error function.  Size will be checked automatically if //
  7. // you don't want to mess with it.  Create pulldowns with up to 21 rows. //
  8. // Main menu array must be named mainmenu, mainkeys, and mainmsgs. //
  9. // Pulldowns can have any name.  Use the same names when called in main(). //
  10. // Easy! Easy! Easy!  You just define them as below, and the User Interface //
  11. // takes care of everything else.  Examine the main() function in INT.CPP //
  12. // to see just how simple it is to call your functions after the selection //
  13. // is returned from the pulldown menus.  The windowing library also has //
  14. // just about any feature you may need for text window display functions. //
  15. // Also included is my free text file viewer (up to 600k) and source code //
  16. // Also included is a modified Borland mouse handler.  Simple and good! //
  17. // Enjoy!  Jay Lewis, 102365,3264 at Compuserve.  Please write. //
  18.  
  19. char *mainmenu[]   = {"Number1","nUmber2","nuMber3","Shell","Quit","Help",NULL};
  20. int   mainkeys[]   = {0,1,2,0,0,0,NULL};
  21. char *mainmsgs[]   = {"Choose from first, second, or third items",
  22.               "One item on this menu",
  23.               "Two items on this menu",
  24.               "Shell to DOS",
  25.               "Quit program, Do not quit",
  26.               "Show the menu definition file, Display program and version information",
  27.               NULL};
  28.  
  29. char *pull0items[] = {"First choice","Second choice","Third choice","fOurth choice","fIfth choice","siXth choice","sEventh choice",NULL};
  30. int    pull0keys[] = {0,0,0,1,1,2,1,NULL};
  31. char  *pull0msgs[] = {"This is the first pulldown menu choice",
  32.               "This is the second pulldown menu choice",
  33.               "This is the third pulldown menu choice",
  34.               "This is the fourth pulldown menu choice",
  35.               "This is the fifth pulldown menu choice",
  36.               "This is the sixth pulldown menu choice",
  37.               "This is the seventh pulldown choice, up to 21 allowed",
  38.               NULL};
  39.  
  40. char *pull1items[] = {"Only choice",NULL};
  41. int    pull1keys[] = {0,NULL};
  42. char  *pull1msgs[] = {"This is the only pulldown menu choice",
  43.               NULL};
  44.  
  45. char *pull2items[] = {"First choice","Second choice",NULL};
  46. int    pull2keys[] = {0,0,NULL};
  47. char  *pull2msgs[] = {"This is the first pulldown menu choice",
  48.               "This is the second pulldown menu choice",
  49.               NULL};
  50.  
  51. char *pull3items[] = {"Shell to DOS",NULL};
  52. int    pull3keys[] = {0,NULL};
  53. char  *pull3msgs[] = {"Shell to the operating system",
  54.               NULL};
  55.  
  56. char *pull4items[] = {"Yes","No",NULL};
  57. int    pull4keys[] = {0,0,NULL};
  58. char  *pull4msgs[] = {"Quit the program",
  59.               "Resume work in the program",
  60.               NULL};
  61.  
  62. // Automatically moves pulldown if length of item puts the pulldown //
  63. // past the right border.  Observe this feature in demo program //
  64. char *pull5items[] = {"Display INT.H include file used to create this demo","About User Interface",NULL};
  65. int    pull5keys[] = {0,0,NULL};
  66. char  *pull5msgs[] = {"Display menu definition file included to create this example",
  67.               "Display program and version information",
  68.               NULL};
  69.