[comp.emacs] Menu description languages

don@brillig.umd.edu (Don Hopkins) (01/13/89)

In article <550@island.uu.net> daniel@island.uu.net (Dan "yes that is my real name" Smith) writes:
[...]
>As long as I'm writing:  I'd like to see menuing systems more like the
>Info reader in Gnu Emacs - there are some situations where it makes
>sense to have a menu item in two or more places; also, the users should
>be able to redefine their menus.  I'm not talking about specific systems,
>just a general direction that I know I'd find more convenient to use.
>
>				dan

I did something along those lines for the UniPress's Emacs NeWS
interface (NeMACS).  I wrote a menu compiler that lets you create
popup menus for NeWS by describing them in Emacs INFO nodes. Each node
describes one menu. Each selection is specified by one line of text.
Submenus are represented as links to other INFO nodes. Menu selections
are pseudo-links that describe the action of a menu item.  Actions
include things like calling a PostScript function, typing in a string,
calling an Emacs functions, popping up a message, etc. The menu
compiler translates the info nodes into PostScript code for NeWS, and
MLisp code that interfaces them to Emacs.  The PostScript is loaded
into NeWS to define popup menus that run independantly in the window
server.

The menu description language has the same syntax as INFO menus, so a
selection that invokes a submenu is also an INFO link to the node
describing that submenu, and a selection that invokes an action is
just a link to a fake node whose name is the action. The menu compiler
traverses the tree of nodes, so the tree of popup menus it creates
reflects the structure of the INFO nodes. Users can edit the info
nodes, and recompile and reload them on the fly to customize their
menus. They can make popup menus for NeWS and interface them to Emacs
without ever having to touch or even look at the PostScript and MLisp
code produced by the compiler.

I wrote it while I was working for UniPress on the Emacs NeWS
interface, last summer, and it comes with Emacs version 2.20. Yes,
it's a supported commercial product, but no, this isn't a commercial
for it.  I'd certianly like to hear about other peoples' experiences
with menu description languages.

	-Don

chuck@melmac.harris-atd.com (Chuck Musciano) (01/17/89)

In article <15453@mimsy.UUCP> don@brillig.umd.edu.UUCP (Don Hopkins) writes:
>In article <550@island.uu.net> daniel@island.uu.net (Dan "yes that is my real name" Smith) writes:
>[...]
>>As long as I'm writing:  I'd like to see menuing systems more like the
>>Info reader in Gnu Emacs - there are some situations where it makes
>>sense to have a menu item in two or more places; also, the users should
>>be able to redefine their menus.  I'm not talking about specific systems,
>>just a general direction that I know I'd find more convenient to use.
>>
>>				dan
>
>I did something along those lines for the UniPress's Emacs NeWS
>interface (NeMACS).  I wrote a menu compiler that lets you create
>popup menus for NeWS by describing them in Emacs INFO nodes.  I'd certianly
>like to hear about other peoples' experiences with menu description languages.

My tooltool software lets you build relatively complex user interfaces using
English-like commands and runs under SunView.  Menus are one of the interface
elements it lets you manipulate.  I know of at least one person who was using
tooltool to build alternate sets of menus to evaluate the speed with which
users could navigate the menu system.  Tooltool lets you redefine and rebuild
an interface in just minutes, without recompilation.

Tooltool is in the public domain, and is now up to version 2.0.  It is
available via anonymous ftp from trantor.harris-atd.com.  If you can't
ftp, send me mail and I'll try to get you a copy.


Chuck Musciano
Advanced Technology Department
Harris Corporation
(407) 727-6131
ARPA: chuck@trantor.harris-atd.com