TajoMenus.mesa
Copyright © 1985, Xerox Corporation. All rights reserved.
Last edited by Eric Nickell, March 29, 1985 1:26:54 pm PST
TajoMenus:
CEDAR
DEFINITIONS =
BEGIN
ROPE: TYPE ~ Rope.ROPE;
TajoEntry:
TYPE ~
RECORD [
rope: ROPE,
action: REF ← NIL
];
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:
ROPE ←
NIL]
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.