home *** CD-ROM | disk | FTP | other *** search
-
- MSDOS menu system for IBM compatibles
-
-
- This menu system was written to support any PC that is IBM
- compatible. The only hardware dependent feature of this system is the
- code associated with the 'CursorSize' procedure. To convert this to run
- on any MSDOS compatible machine you would only have to replace this
- procedure with one appropriate for your hardware. Anyone familiar with
- the WANG PC menu system will find the function of this code almost
- identical. The main reason for having this menu system is to allow novice
- users to be able to 'pick' what they want to do off of a menu rather than
- have to remember a command. To explain how this code works I will go
- through the set up of a sample menu and How to use it.
-
-
- To set up a menu on your system you must execute the menu editor
- program. (EDTMENU or EDITOR) The first prompt will be for the menu file
- specification. You may use and name and extension for the menu, the
- system will by default set up a help file with the same name and an
- extension of 'HLP'. In my example I will use a file name of 'MENU.DAT'.
- The menu system allows up to 24 selection on any menu, and you can nest
- menus as deep as you want, provided that you have compiled the menu
- program with sufficient stack space. The selection from the menu will
- alwys be centered in your screen, and if there are more that 12 entries
- the system will split the selection into two 'balanced' columns.
-
- After entering the file name for the menu a prompt will appear
- stating that the file does not exist and asking if you wish to create the
- file. If you answer 'Y' the program will continue, otherwise the program
- will exit. The first screen allows the entry of up to three lines of text
- to be centered at the top of the screen. Enter the text and press
- <RETURN> to move from field to field, when all field are as you wish press
- <TA> to move on. Since this is a new menu the Program will automatically
- go to add mode. Near the center of the screen will be a field 32
- character wide for the selection text.
-
- Enter the selection text in such a way as to make the first
- character of each selection as unique as possible. The reason for doing
- this is the selection can be made by pressing only the first letter of the
- text. If there are multiple entries with the same first letter pressing
- the letter again will cause the next one in the sequence to be selected.
-
- After entering the text press <RETURN> to move to the file name
- field. Enter the name of the file to be loaded and executed if this
- selection is requested. Press <RETURN> to move to the file extension and
- enter it. Press <RETURN> to move to the drive field. If this field is
- left blank the menu system will look for the file on the current logged
- drive, otherwise if a drive is specified the given drive will become the
- logged drive. The drive is designated as 'A' 'B' 'C' ... ect. The next
- field is the subdirectory where the the file can be found. The directory
- should be enter minus the beginning and trailing '\'. If the file is in
- the current directory leave this field blank. The next field is the
- parameters to be passes in the command line to the program.
-
- Next you need to specify what kind of file this is, the different
- selection are selected by pressing the <SPACE> bar till the one desired is
- highlighted. The Menu selection is for another menu, the Program
- selection is for programs, the Other selection is to allow any command
- line that you could type to the command processor to be entered by the
- user, the System Function selection allows programs to be run where the
- screen will not be cleared on program completion until you press a key,
- and lastly the Command.com selection allows you to go to command.com from
- a menu selection. When all fields have been filled in press <TAB> to
- accept the screen.
-
- The entry you just put in will now be centered vertically and
- horizontally in the screen. At this point you can select different
- functions to perform or you can exit. To change move the cursor to the
- function select area press <RETURN>, then by pressing <SPACE> you can
- select the function to perform. If there was more than one entry on the
- menu you could move from one to another by pressing <SPACE>. Once the
- menu selection and function are selected pressing <TAB> will cause the
- function to be executed.
-
- If you select add then a new entry on the menu will be opened up
- just below the entry highlighted and then the information needs to be
- entered. The edit selection allows editing the information of the
- highlighted entry.
-
- The reorder function allows the highlighted entry to be moved to
- another place in the menu using the <UP ARROW> and <DOWN ARROW> keys. The
- delete function when selected displays the menu with the entry deleted and
- then request a confirmation. If the delete is not confirmed the menu will
- be redisplayed with the entry still there. The edit header allows the
- three lines on the top to be edited just as in the start of the program.
- The edit help screen allows a screen of text, lines 1 through 22, to be
- displayed to the user on request. his screen can contain information on
- how and when to use a particular menu selection.
-
- The End Menu Update function is selected when all changes have been
- made and you wish to write the new menu back to the disk. If this
- function is not selected then all changed will have been made in memory
- only and the original file will remain the same.
-
- The menu program (TURMENU) needs to be customized with the name and
- location of the file in the call to MENU. Once this is done the program
- should be compiled with the stack/heap minimum and maximum set to a value
- based on the depth of the menu nesting you use. I have found that an
- minimum and maximum of $0200 seem to work for a depth of up to 5. I have
- not tried more than that, I get lost after 4. Should you not need to go
- that deep you can reduce the minimum and maximum to some other value. I
- do not have hard and fast guide lines for the setting of the numbers but
- you can experiment to find out. Should you think of any more options or
- changes to this code feel free to send me a message. Should anyone want
- to use this as part of a commercial product go ahead, please don't charge
- extra for it. If you want support for this from me I could be convinced,
- for a fee, to do just that. Otherwise try it and ask whatever question
- you want.
-
- User Interface Standards
-
-
- The following text list the functions of the special keys supported
- by the MENU system.
-
- HOME move the cursor to the beginning of the line or
- field. In multiple line fields the cursor move to the
- beginning of the line.
-
- Up Arrow move the cursor up one line to the same horizontal
- position. In single line fields this key is
- inoperative.
-
- Down Arrow move the cursor down one line to the same horizontal
- position. In single line fields this key is
- inoperative.
-
- Right Arrow move the cursor to the right one character if there
- is data in that position.
-
- Left Arrow move the cursor to the left one character as long as
- the current position is no at the beginning of a
- line.
-
- END move the cursor to the last character of the field or
- line which ever comes first.
-
- CTRL END erase the characters from the current cursor position
- to the end of the field or line whichever omes first.
-
- PageUp moves the cursor in a multiple line field to the
- first line of the field.
-
- PageDown moves the cursor in a multiple line field to the last
- line of the field.
-
- BackSpace deletes the character just prior to the cursor unless
- the cursor is a the beginning of a line or field.
-
- DEL deletes the character that the cursor is under.
-
- INS toggles the insert/overwrite mode of entry in the
- current field. The default mode in a field is
- insert.