-- File: MBWindows.mesa
-- Contents: package implementing set of buttons in viewer when there are too many things to actually create buttons for all. Client passes procedures to go forward and backward through enumeration, and ScrollableButtonsImpl implements scrolling, calls client button proc on appropriate thing.
-- Last Edited by: Cattell, July 28, 1983 6:16 pm

DIRECTORY Buttons, MBQueue, ViewerClasses, Rope;

MBWindows: DEFINITIONS =

BEGIN

EnumProc: TYPE = PROC[ enum: REF ANY] RETURNS [ label: Rope.ROPE, thing: REF ANY];

CreateMBWindow: PROC[
getThingCount: PROC [enum: REF ANY] RETURNS[INT], -- total number of things in enum
enum: REF ANY, -- client object used to represent state of enumeration
next, prev: EnumProc,
buttonProc: Buttons.ButtonProc, -- called with the thing associated with button
info: ViewerClasses.ViewerRec← [], -- allows client to fill in ViewerRec fields
q: MBQueue.Queue← NIL] -- MBQueue under which to synchronize
RETURNS [viewer: ViewerClasses.Viewer];

END.