PopUpMenuDoc.tioga
Christian Jacobi, September 12, 1985 11:20:28 am PDT
PopUpMenu
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
PopUpMenu
Christian Jacobi
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: package which implements pop up menus.
Created by: Christian Jacobi
Maintained by: Christian Jacobi <Jacobi.pa>
Keywords: popup, menu
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. Usage
RequestSelection: PROC [
label: Rope.ROPENIL, choice: LIST OF Rope.ROPE,
default: NAT ← 0, timeOut: NAT ← 0, mouse: REFNIL
] RETURNS [INT];
--returns: 1 for first choice, 2 for second...
-- 0 if selected outside menu or on title-line
-- -1 if time out
--label:  header text; can not be selected.
--choice:  list of possible selections.
--default:  the cursor might be initially moved to this line.
--timeOut:  in seconds; 0 for no time out.
--mouse:  to override mouse position. See below for possible types.
--Procedure must not be called from inside a viewers-repaint or a TIP-notify procedure.
When the procedure RequestSelection is called a pop up menu appears at the position of the mouse. The selection is made by releasing a mouse button. (If necessary pressing a mouse button down first).
Press a second mouse button down to move the menu to a different position.

mouse parameter:
NIL: Default, use the current mouse position. But: If the time since the last call finished is short enough, the menu will appear at exactly the same location as the previous menu. This allows imlementation of nested menus without moving around on the sceen.
$Mouse:  Use the current mouse position.
TIPUser.TIPScreenCoords: Use this position. [0,0] is lower left (of device)
REF Interminal.MousePosition: Use this position. [0,0] is upper left (of device).
2. User Profile Options
with their default values:
PopUpMenu.FontFamily: "Helvetica"
PopUpMenu.FontSize: 10
PopUpMenu.FontBold: TRUE
PopUpMenu.FontItalic: FALSE
PopUpMenu.LineHeightChange: 0