The standard routine for drawing menus on the jerq was
'menuhit'. Items in the menu were centered, and the menu was
scrollable when a certain threshold number of items was
reached, and in addition, when the mouse pointer was in the
top (bottom) item of the menu and it was possible to scroll
in the appropriate direction, the menu was scrolled up or
down 1 line. The structure associated with these menus is
'Menu'.
There was however another menu-drawing routine, 'mhit', the
menus drawn by this being hierarchical, the structure NMenu,
which no longer contained text strings but an array of NItems.
NMenus also had provision for 'help' text to be displayed, a
simple string displayed on the screen, when button 1 was
pressed while an entry in the menu was selected.
The earliest version in the Eight Edition jerq code, also has
one function in the NMenu structure which is called when the
mouse pointer invokes a hierarchical menu. By Ninth Edition
this has been expanded, with 3 functions, one as above, one
invoked when an item is selected ('hit') and one when a
hierarchical menu is exited.
In the jerq code directories, under 'lib/jj', is a small 'ms'
document, 'A Library of Goo for the 5620', which lists
routines available in the library, and their authors. Andrew
Hume is listed as the author of 'mhit'.
Are there examples of code using these three menu functions
('dfn', 'hfn', 'bfn')?
There seems to have been little interest in hierarchical menus
at the labs, their use was quite limited. I found a program
in the Tenth Edition archive, 'bubble' (which seems to be a
program for displaying the three-dimensional structure of
molecules) which uses them. 'samuel' made heavy use of them,
including use of the 'hit' function, and Tom Cargill used
basically the same code in 'pads' wherein the routine was
called 'scripthit'.
The plain 'menuhit' survived into Plan9, but as far as I
know, it is only used by 'sam'.