// MenuDefs.d
get "Streams.d"
get "AltoFileSys.d"
external// procedures from Menu.bcpl
[
ScanMenu
ShowMenu
CreateMenuDisplayStream
MenuSize
DeleteFromMenu
WaitUntilPressed
WaitUntilReleased
]
externalMenuData// static from Menu.bcpl
external// procedures from MenuWindow.bcpl
[
SelectWindow
MoveWindow
ChangeWindow
]
external// procedures from MenuBox.bcpl
[
CreateBox
CursorInside
OutlineBox
FlipBox
NearestBox
FindDCB
ConvertToRelative
WriteBox
]
external// procedures from MenuBoxUtils.asm
[
write
erase
select
]
structure MENU[length word;box↑1,256word]
structure BOX [
dcbword
[
flagbit 2
bitsbit 14
]
=outlineword
xoriginword
yoriginword
xcornerword
ycornerword
[
sensitivebit
ljustifiedbit
joffsetbit 14
]
=controlflagsword
]
manifest lBOX=(size BOX)/16
structure DATA [
menu word
stringlist word
menuDCB word
]
manifest MaxLength=129