home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TVTOOL.ZIP / MENU.DOC < prev    next >
Encoding:
Text File  |  1992-08-23  |  4.5 KB  |  100 lines

  1. OVERVIEW
  2.  
  3. Here at last is a point and click way to create Turbo Vision menus.
  4. Here are a few notes to help you use "Menu Designer". The "Menu
  5. Designer" is not hard to use, so just play with it a while and you will
  6. probably have no trouble.
  7.  
  8. The first thing you will notice is the lack of a command menu. All the
  9. program commands are either in the menu design dialog box or on the
  10. status line. This allows the menu you are creating to be displayed at
  11. the top of the screen, in the standard menu position. The menus you
  12. create will be instantly available for view and testing. Whenever you
  13. insert or update a menu item your changes will be displayed.
  14.  
  15. CREATING A MENU
  16.  
  17. To create a menu, you work in the design dialog box. This dialog box
  18. displays a list box of all menu items, a list of short cut keys and
  19. prefixes, a help context field, and several command buttons. You enter
  20. menu item name in the input line labeled "Menu Text". You may enter any
  21. text up to 25 characters in length. To create a menu "Hot Key", precede
  22. the desired hot key character with an "&". This is easier to type than
  23. two "~" and follows the standard established by Windows resource files.
  24.  
  25. The menu input line is connected to the menu list, so you can edit
  26. existing menu entries. To edit an existing menu item, just move to the
  27. list box below the field and scroll the to desired entry. The
  28. highlighted entry will be displayed in the "Menu Text" field for your
  29. editing pleasure.
  30.  
  31. After entering a menu item name, you move may move to the "Short Cut
  32. Key" field to assign a short cut for the menu item. First, you select
  33. a short cut prefix, "Alt", "Ctrl", "Shift" or none, by pressing the
  34. desired radio button. Next, move to the key list box to select the
  35. actual key to use. Just scroll to the desired key, it will also be
  36. displayed above the list. You may not assign short cut keys to the top
  37. level items, the menu bar items.
  38.  
  39. If you desire, you may also enter a help context for a menu item. Enter
  40. a number in the "Help Context" and it will be assigned to the current
  41. menu item.
  42.  
  43. Here is a list of the commands in the menu design dialog: Insert,
  44. Append, Update, Delete, Cascade, Separator. THE MAIN THING TO REMEMBER
  45. IS THAT ALL COMMANDS WORK ON THE ITEM THAT IS CURRENTLY HIGHLIGHTED IN
  46. THE MENU LIST BOX.
  47.  
  48. Insert - Inserts a new item, the one currently displayed in the dialog,
  49. immediately above the menu item highlighted in the menu list box. The
  50. new item is inserted with the same menu level as the highlighted item.
  51. As you build your menus, you will notice that sub menus are indented
  52. one space from thier parent menus.
  53.  
  54. Append - Inserts a new item at the end of the current menu level. When
  55. you append a menu item, it will be inserted at the bottom of the
  56. current sub menu. In other words, if an item in the menu bar is
  57. highlighted in the list, and you add an item it will be added to the
  58. end of all menu bar items. If you add an item with some sub menu item
  59. highlighted, that item will be added to the end of the highlighted sub
  60. menu.
  61.  
  62. Update - Saves changes made to an existing menu item. To edit an item
  63. scroll to it in the menu list box. All information for the highlighted
  64. item will be displayed for editing.
  65.  
  66. Delete - Deletes the currently highlighted menu item. BE CAREFUL, this
  67. command will delete all sub menus cascaded from the current item.
  68.  
  69. Cascade - This is the only way to create sub menus. Highlight an item
  70. in the list box and press "Cascade". Two new items will be added as a
  71. sub menu to the highlighted menu item. These items will be indented one
  72. space from the current item. You may edit, delete, or append to these
  73. items as desired.
  74.  
  75. Separator - Inserts a menu separator line immediately above the
  76. highlighted item. You may not insert separators into the top level
  77. menu.
  78.  
  79. USING MENUS IN YOUR TV PROGRAMS
  80.  
  81. "Menu Designer" will generate an InitMenuBar method that you can copy
  82. right into your program's source code. It will also generate a list of
  83. constnat declarations for the menu commands needed. The menu command
  84. constants are created from your menu item names. So, depending on how
  85. you named your menus, you could get some duplicate identifier errors
  86. when you compile. Just, remove the offending declarations from the list
  87. of menu constants and try again (this will be fixed in a future
  88. update). A program, "MTEST.PAS", for testing the generated source code
  89. has been included.
  90.  
  91. Please contact me with any comments, suggestions, problems, bugs, or
  92. questions. 
  93.  
  94. Richard Hansen
  95. PO Box 18571
  96. Saint Paul, MN  55118-0571  USA
  97.  
  98. CompuServe ID 70242,3367
  99.  
  100.