TajoMenus.mesa
Copyright © 1985, Xerox Corporation. All rights reserved.
Last edited by Eric Nickell, March 29, 1985 1:26:54 pm PST
DIRECTORY
Rope USING [ROPE]
;
TajoMenus: CEDAR DEFINITIONS = BEGIN
ROPE: TYPE ~ Rope.ROPE;
TajoEntry: TYPE ~ RECORD [
rope: ROPE,
action: REFNIL
];
TajoMenu: TYPE ~ RECORD [
title: ROPE,
options: LIST OF TajoEntry
];
TajoSystem: TYPE ~ REF TajoSystemRec;
TajoSystemRec: TYPE;  --Opaque
DuplicateName: ERROR;
CreateTajoSystem: PROC [menus: LIST OF TajoMenu] RETURNS [ts: TajoSystem];
! DuplicateName => A title used twice
Gets the menu system started
Select: PROC [ts: TajoSystem, title: ROPENIL] RETURNS [action: REF];
If title=NIL, will use last selected menu.
On return, action will be NIL if user aborted, otherwise will contain the ref associated with the selection.
N.B. CallUpMenu is unable to return a ref, which is a ROPE, whose value is equal to a TajoMenu.title.
END.