home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TURMENU.ZIP / EDITMEN.DOC next >
Encoding:
Text File  |  1986-03-01  |  8.3 KB  |  156 lines

  1.  
  2.                     MSDOS menu system for IBM compatibles
  3.  
  4.  
  5.       This menu system was written to support any PC that is IBM
  6. compatible.  The only hardware dependent feature of this system is the
  7. code associated with the 'CursorSize' procedure.  To convert this to run
  8. on any MSDOS compatible machine you would only have to replace this
  9. procedure with one appropriate for your hardware.  Anyone familiar with
  10. the WANG PC menu system will find the function of this code almost
  11. identical.  The main reason for having this menu system is to allow novice
  12. users to be able to 'pick' what they want to do off of a menu rather than
  13. have to remember a command.  To explain how this code works I will go
  14. through the set up of a sample menu and How to use it.
  15.  
  16.  
  17.       To set up a menu on your system you must execute the menu editor
  18. program. (EDTMENU or EDITOR)  The first prompt will be for the menu file
  19. specification.  You may use and name and extension for the menu, the
  20. system will by default set up a help file  with the same name and an
  21. extension of 'HLP'.  In my example I will use a file name of 'MENU.DAT'. 
  22. The menu system allows up to 24 selection on any menu, and you can nest
  23. menus as deep as you want, provided that you have compiled the menu
  24. program with sufficient stack space.  The selection from the menu will
  25. alwys be centered in your screen, and if there are more that 12 entries
  26. the system will split the selection into two 'balanced' columns.
  27.  
  28.       After entering the file name for the menu a prompt will appear
  29. stating that the file does not exist and asking if you wish to create the
  30. file.  If you answer 'Y' the program will continue, otherwise the program
  31. will exit.  The first screen allows the entry of up to three lines of text
  32. to be centered at the top of the screen.  Enter the text and press
  33. <RETURN> to move from field to field, when all field are as you wish press
  34. <TA> to move on.  Since this is a new menu the Program will automatically
  35. go to add mode.  Near the center of the screen will be a field 32
  36. character wide for the selection text.
  37.  
  38.       Enter the selection text in such a way as to make the first
  39. character of each selection as unique as possible.  The reason for doing
  40. this is the selection can be made by pressing only the first letter of the
  41. text.  If there are multiple entries with the same first letter pressing
  42. the letter again will cause the next one in the sequence to be selected.
  43.  
  44.       After entering the text press <RETURN> to move to the file name
  45. field.  Enter the name of the file to be loaded and executed if this
  46. selection is requested.  Press <RETURN> to move to the file extension and
  47. enter it.  Press <RETURN> to move to the drive field.  If this field is
  48. left blank the menu system will look for the file on the current logged
  49. drive, otherwise if a drive is specified the given drive will become the
  50. logged drive.  The drive is designated as 'A' 'B' 'C' ... ect.  The next
  51. field is the subdirectory where the the file can be found.  The directory
  52. should be enter minus the beginning and trailing '\'.  If the file is in
  53. the current directory leave this field blank.  The next field is the
  54. parameters to be passes in the command line to the program.
  55.  
  56.       Next you need to specify what kind of file this is, the different
  57. selection are selected by pressing the <SPACE> bar till the one desired is
  58. highlighted.  The Menu selection is for another menu, the Program
  59. selection is for programs, the Other selection is to allow any command
  60. line that you could type to the command processor to be entered by the
  61. user, the System Function selection allows programs to be run where the
  62. screen will not be cleared on program completion until you press a key,
  63. and lastly the Command.com selection allows you to go to command.com from
  64. a menu selection.  When all fields have been filled in press <TAB> to
  65. accept the screen.
  66.  
  67.       The entry you just put in will now be centered vertically and
  68. horizontally in the screen.  At this point you can select different
  69. functions to perform or you can exit.  To change move the cursor to the
  70. function select area press <RETURN>, then by pressing <SPACE> you can
  71. select the function to perform.  If there was more than one entry on the
  72. menu you could move from one to another by pressing <SPACE>.  Once the
  73. menu selection and function are selected pressing <TAB> will cause the
  74. function to be executed.
  75.  
  76.       If you select add then a new entry on the menu will be opened up
  77. just below the entry highlighted and then the information needs to be
  78. entered.  The edit selection allows editing the information of the
  79. highlighted entry.
  80.  
  81.       The reorder function allows the highlighted entry to be moved to
  82. another place in the menu using the <UP ARROW> and <DOWN ARROW> keys.  The
  83. delete function when selected displays the menu with the entry deleted and
  84. then request a confirmation.  If the delete is not confirmed the menu will
  85. be redisplayed with the entry still there.  The edit header allows the
  86. three lines on the top to be edited just as in the start of the program. 
  87. The edit help screen allows a screen of text, lines 1 through 22, to be
  88. displayed to the user on request.  his screen can contain information on
  89. how and when to use a particular menu selection.
  90.  
  91.       The End Menu Update function is selected when all changes have been
  92. made and you wish to write the new menu back to the disk.  If this
  93. function is not selected then all changed will have been made in memory
  94. only and the original file will remain the same.
  95.  
  96.       The menu program (TURMENU) needs to be customized with the name and
  97. location of the file in the call to MENU.  Once this is done the program
  98. should be compiled with the stack/heap minimum and maximum set to a value
  99. based on the depth of the menu nesting you use.  I have found that an
  100. minimum and maximum of $0200 seem to work for a depth of up to 5.  I have
  101. not tried more than that, I get lost after 4.  Should you not need to go
  102. that deep you can reduce the minimum and maximum to some other value.  I
  103. do not have hard and fast guide lines for the setting of the numbers but
  104. you can experiment to find out.  Should you think of any more options or
  105. changes to this code feel free to send me a message.  Should anyone want
  106. to use this as part of a commercial product go ahead, please don't charge
  107. extra for it.  If you want support for this from me I could be convinced,
  108. for a fee, to do just that.  Otherwise try it and ask whatever question
  109. you want.
  110.  
  111.                           User Interface Standards
  112.  
  113.  
  114.       The following text list the functions of the special keys supported
  115. by the MENU system.
  116.  
  117. HOME                 move the cursor to the beginning of the line or
  118.                      field. In multiple line fields the cursor move to the
  119.                      beginning of the line.
  120.  
  121. Up Arrow             move the cursor up one line to the same horizontal
  122.                      position.  In single line fields this key is
  123.                      inoperative.
  124.  
  125. Down Arrow           move the cursor down one line to the same horizontal
  126.                      position. In single line fields this key is
  127.                      inoperative.
  128.  
  129. Right Arrow          move the cursor to the right one character if there
  130.                      is data in that position.
  131.  
  132. Left Arrow           move the cursor to the left one character as long as
  133.                      the current position is no at the beginning of a
  134.                      line.
  135.  
  136. END                  move the cursor to the last character of the field or
  137.                      line which ever comes first.
  138.  
  139. CTRL END             erase the characters from the current cursor position
  140.                      to the end of the field or line whichever omes                    first.
  141.  
  142. PageUp               moves the cursor in a multiple line field to the
  143.                      first line of the field.
  144.  
  145. PageDown             moves the cursor in a multiple line field to the last
  146.                      line of the field.
  147.  
  148. BackSpace            deletes the character just prior to the cursor unless
  149.                      the cursor is a the beginning of a line or field.
  150.  
  151. DEL                  deletes the character that the cursor is under.
  152.  
  153. INS                  toggles the insert/overwrite mode of entry in the
  154.                      current field.  The default mode in a field is
  155.                      insert.
  156.