Menu Interface?
25-Aug-90 10:11:40
Sb: #21314-Menu Interface?
Fm: Bill Mayhew [VAX/DECPC] 76702,502
To: David Cressey 73230,1665
David,
Not to discourage you, but I have to ask the obvious question.
With all the *dozens* of MS-DOS menu programs that are over in the IBM
forums, many/most of which (I'd guess) are generic enough to work on the
Rainbow… why?
Call me a cynic, or an old something-else if you want… I hope you're
doing this "just for fun!"
But as long as you asked, the menu system my company uses in its products
(not on MS-DOS) doesn't use ANY kind of "menu database". The menu
descriptions are simply text files. Each line in the file contains a
description of one part of the menu: the (internal) menu name, title,
subtitle, name of a graphic "background" file that is displayed along with
the menu text, and one line for each entry on the menu. Each line is
"tagged" with its function, e.g.:
MENU:Mainmenu
TITLE:"WhizBang Products Corp. Main Menu"
BACKGROUND:"filename"
ITEM:WP,"WordPerfect",RUN:"wp"
ITEM:AF,"Auxiliary Functions",GOTO:Afmenu
ITEM:F,"Finished",RUN:"logout"
MENU:Afmenu
TITLE:"WhizBang Products Corp. Auxiliary Menu"
BACKGROUND:"filename"
ITEM:D,"Directory of files",RUN:"dir"
(…etc.)
Multiple menus can exist within a single text file. Each menu-entry
contains several comma-separated fields; each field is tagged with its
function (except for the "description" part) as you can see above. The 1-
or 2-character "item" legend is what the user types to select the menu
item. Menu items can do different things; GOTO branches to a submenu, RUN
executes a program, and there are others (e.g. READ another menu file).
There is a menu 'compiler' which does syntax verification and produces a
'binary' version of the menu but there is really no advantage to doing
that; the text version, interpreted by a menu 'interpreter', is just as
fast, and will syntax-check each line as it is displayed.
-Bill