-- VMenus.mesa
-- Russ Atkinson, September 13, 1982 1:18 pm

-- this is a simple vertical menus package for the CedarViewers world

DIRECTORY
Buttons USING [ButtonProc],
Rope USING [ROPE],
ViewerClasses USING [Viewer];

VMenus: CEDAR DEFINITIONS
= BEGIN OPEN Rope;

Viewer: TYPE = ViewerClasses.Viewer;
ViewerList: TYPE = LIST OF Viewer;

VButtonList: TYPE = LIST OF VButtonRec;
VButtonRec: TYPE = RECORD
[proc: Buttons.ButtonProc ← NIL,
name: ROPENIL,
fork: BOOLEANTRUE,
data: REFNIL
];

Create: PROC
[name: ROPE, buttons: VButtonList ← NIL,
parent: Viewer ← NIL, x,y: INTEGER ← 0]
RETURNS [ViewerList];
-- returns the list of viewers that make up our vertical menu
-- if parent = NIL, a container will be created
-- otherwise a label is placed at the head of the list
-- x and y may default without harm (I think)

GetDimensions: PROC
[list: ViewerList] RETURNS [xmin,ymin,xmax,ymax: INTEGER];
-- returns the dimensions of the vertical menu given by the list
-- dimensions include border dots

END.