MenuDefs
MStone and Tiberi October 31, 1979 11:00 PM
Tiberi November 2, 1979 3:32 PM
Last Edited by: Stone, July 7, 1985 4:28:02 pm PDT
DIRECTORY
Rope USING [ROPE],
PointDefs: FROM "PointDefs",
StyleDefs: FROM "StyleDefs",
Imager USING [Context],
ObjectDefs: FROM "ObjectDefs";
MenuDefs: CEDAR DEFINITIONS =
BEGIN OPEN ObjectDefs;
MenuHandle: TYPE = REF menu Object;
MenuItem: TYPE = RECORD
[
link: MenuItemHandle,
menu: MenuHandle,
selected, inverted: BOOLEAN,
tl,br: PointDefs.ScrPt,
string: Rope.ROPE,
proc: MenuProc
];
MenuItemHandle: TYPE = REF MenuItem;
MenuProc: TYPE = PROCEDURE [item: MenuItemHandle];
CreateMenu: PROCEDURE [orientation: MenuOrientation, tl: PointDefs.ScrPt, title: Rope.ROPE] RETURNS [menu: MenuHandle];
AddMenuItem: PROCEDURE [menu: MenuHandle, string: Rope.ROPE, proc: MenuProc] RETURNS [MenuItemHandle];
ForAllMenus: PROCEDURE [proc: PROCEDURE [menu: MenuHandle]];
ForAllMenuItems: PROCEDURE [menu: MenuHandle, proc: MenuProc];
OverWhichItem: PROCEDURE [pt: PointDefs.ScrPt] RETURNS [item: MenuItemHandle];
IsOverItem: PROCEDURE [pt: PointDefs.ScrPt, item: MenuItemHandle]
RETURNS [BOOLEAN];
ShowMenu, HideMenu: PROCEDURE [menu: MenuHandle];
BugItem: MenuProc;
PlotMenu: PROCEDURE [menu: MenuHandle, dc: Imager.Context];
Select, SelectOnly, Deselect, HighlightMenuItem, ClearMenuItem: MenuProc;
access to parts:
IsSelected: PROCEDURE [item: MenuItemHandle] RETURNS [BOOLEAN];
MenuString: PROCEDURE [item: MenuItemHandle] RETURNS [Rope.ROPE];
SetMenuString: PROCEDURE [item: MenuItemHandle, string: Rope.ROPE];
WhichMenu: PROCEDURE[item: MenuItemHandle] RETURNS [menu: MenuHandle];
MenuStyle: PROCEDURE RETURNS [StyleDefs.StyleHandle];
InitMenuStyle: PUBLIC PROCEDURE[];
END.