A menu-set is a set of multiple menus, picmenus, or barmenus that
are simultaneously active within the same window. Menu-sets can be used
to implement graphical user interfaces. A menu-conns is a
menu-set that includes connections between menus; this can be used to
implement interfaces that allow the user to construct a network from
components.
The source file for menu-sets is the GLISP file menu-set.lsp;
this file is translated as part of the file drawtrans.lsp in
plain Lisp. Examples of the use of menu sets are given at the top of the
file menu-set.lsp. In the following descriptions, ms is a
menu-set and mc is a menu-conns.
(menu-set-create w) creates a menu set to be displayed in the
window w.
(menu-set-name symbol) makes a gensym name that begins
with symbol.
(menu-set-add-menu ms name:symbol sym title items
&optional offset:vector)
This function adds a menu to a menu-set. sym is arbitrary
information that is saved with the menu.
(menu-set-add-picmenu ms name sym title spec:picmenu-spec
&optional offset:vector nobox)
(menu-set-add-component ms name &optional offset:vector)
This adds a component that has a picmenu-spec defined on the
property list of name.
(menu-set-add-barmenu ms name sym barmenu title
&optional offset:vector)
(menu-set-draw ms) draws all the menus.
(menu-set-select ms &optional redraw enabled)
menu-set-select gets a selection from a menu-set. If
redraw is non-nil, the menu-set is drawn. enabled
may be a list of names of menus that are enabled for selection. The
result is (selection menu-name), or
((x y) BACKGROUND button) for a click outside any menu.
(menu-conns-create ms) creates a menu-conns from a
menu-set.
(menu-conns-add-conn mc)
This function allows the user to select two ports from menus of the
menu-conns. It then draws a line between the ports and adds the
connection to the connections of the menu-conns.
(menu-conns-move mc)
This function allows the user to select a menu and move it. The
menu-set and connections are redrawn afterwards.
(menu-conns-find-conn mc pt:vector)
This finds the connection selected by the point pt, if any. This
is useful to allow the user to delete a connection:
(menu-conns-delete-conn mc conn)
(menu-conns-find-conns mc menuname port)
This returns all the connections from the specified port
(selection) of the menu whose name is menuname.