PopUpSelection.mesa
Copyright © 1983, 1985, 1986 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, August 3, 1983 9:47 am
Last edited by: Christian Jacobi, August 26, 1986 10:21:13 am PDT
DIRECTORY
Rope USING [ROPE];
PopUpSelection: CEDAR DEFINITIONS =
BEGIN
Package which implements a pop-up menu abstraction.
Request: PROC [
header: Rope.ROPENIL, choice: LIST OF Rope.ROPE,
headerDoc: Rope.ROPENIL, choiceDoc: LIST OF Rope.ROPENIL,
default: NAT ← 0, timeOut: NAT ← 0, position: REFNIL
] RETURNS [INT];
Shows a pop-up menu and returns the number of the selected entry.
returns: 1 for first choice, 2 for second...
 0 if selected outside menu or on header-line
 -1 if timed out
header:  Header text; can not be selected.
choice:  List of possible selections.
headerDoc: Documentation shown if selection is on header or outside menu.
choiceDoc: Documentation for the corresponding choice.
default:  Hint for initial selection by implicit mouse movement. 0 if no default.
timeOut:  In seconds; 0 for no time out.
position:  Hint to override mouse position. See documentation for possible types.
Procedure must not be called from inside a viewers-repaint or a TIP-notify procedure.
There might be a maximum number of choices, see documentation.
END.