// AIMenuDefs.d
//
// Modified by L. Stewart from Keith Knox’ package
// Last touched: October 7, 1979 11:10 PM

get "AltoDefs.d"
get "Streams.d"
get "AltoFileSys.d"
external // procedures from AIMenu.bcpl
[
ScanMenu
CursorInside
FlipBox
FindDCB
WriteBox
]
external // procedures from AIMenuInit.bcpl
[
CreateMenuDisplayStream
MenuSize
OutlineBox
ConvertToRelative
]

external // procedures from MenuBoxUtils.asm
[
write
erase
select
]

structure MENU:
[
length word
box↑1,256 word
]

structure BOX:
[
dcb word
[
flag bit 2
bits bit 14
]
=outline word
xorigin word
yorigin word
xcorner word
ycorner word
[
sensitive bit
ljustified bit
joffset bit 14
]
=controlflags word
]

structure DATA:
[
menu word
stringlist word
menuDCB word
]

manifest
[
lBOX=(size BOX)/16
MaxLength=129
]