<<>> <> <> <> <<>> <> <> DIRECTORY Buttons USING [Button, ButtonProc], EditSpan USING [Place], Imager USING [Font], Menus USING [MenuEntry, MenuProc], Rope USING [ROPE], TiogaButtons USING [TiogaButtonProc, TiogaButton], TiogaOps USING [Ref], ViewerClasses USING [ClickProc, MouseButton, Viewer, ViewerRec]; TBQueue: CEDAR DEFINITIONS = BEGIN Queue: TYPE = REF QueueObj; QueueObj: TYPE; ROPE: TYPE = Rope.ROPE; Create: PROC [pushModel: BOOL ¬ TRUE] RETURNS [Queue]; <> <> <> <> <> <> <> CreateTiogaButton: PROC [ q: Queue, viewer: ViewerClasses.Viewer, rope: ROPE ¬ NIL, format: ROPE ¬ NIL, looks: ROPE ¬ NIL, proc: TiogaButtons.TiogaButtonProc, clientData: REF ANY ¬ NIL, fork: BOOL ¬ TRUE, paint: BOOL ¬ TRUE, immediate: BOOL ¬ FALSE ] RETURNS [TiogaButtons.TiogaButton]; <> <> CreateTiogaButtonFromNode: PROC [ q: Queue, node: TiogaOps.Ref, start: INT ¬ 0, end: INT ¬ INT.LAST, proc: TiogaButtons.TiogaButtonProc ¬ NIL, clientData: REF ANY ¬ NIL, fork: BOOL ¬ TRUE, immediate: BOOL ¬ FALSE ] RETURNS [TiogaButtons.TiogaButton]; <<... creates a button from the node and the offsets provided. If the start and end offsets are defaulted then the button refers to the node itself.>> <> <<>> AppendToTiogaButton: PROC [ q: Queue, button: TiogaButtons.TiogaButton, rope: ROPE ¬ NIL, looks: ROPE ¬ NIL, proc: TiogaButtons.TiogaButtonProc ¬ NIL, clientData: REF ANY ¬ NIL, fork: BOOL ¬ TRUE, immediate: BOOL ¬ FALSE ] RETURNS [TiogaButtons.TiogaButton]; <<... appends the formatted rope to an existing button and creates a new button for the appended text.>> <> <> CreateTiogaButtonAtNode: PROC [ q: TBQueue.Queue, viewer: ViewerClasses.Viewer, oldButton: TiogaButtons.TiogaButton ¬ NIL, where: EditSpan.Place ¬ before, rope: Rope.ROPE ¬ NIL, format: Rope.ROPE ¬ NIL, looks: Rope.ROPE ¬ NIL, proc: TiogaButtons.TiogaButtonProc, clientData: REF ANY ¬ NIL, fork: BOOL ¬ TRUE, paint: BOOL ¬ TRUE, immediate: BOOL ¬ FALSE ] RETURNS [TiogaButtons.TiogaButton]; <> <> CreateMenuEntry: PROC [ q: Queue, name: Rope.ROPE, proc: Menus.MenuProc, clientData: REF ¬ NIL, documentation: REF ¬ NIL, guarded: BOOL ¬ FALSE, immediate: BOOL ¬ FALSE ] RETURNS [Menus.MenuEntry]; <> CreateButton: PROC [ q: Queue, info: ViewerClasses.ViewerRec ¬ [], proc: Buttons.ButtonProc, clientData: REF ¬ NIL, font: Imager.Font ¬ NIL, documentation: REF ¬ NIL, guarded: BOOL ¬ FALSE, paint: BOOL ¬ TRUE, immediate: BOOL ¬ FALSE ] RETURNS [Buttons.Button]; <> QueueClientAction: PROC [q: Queue, proc: PROC [REF], data: REF, immediate: BOOL ¬ FALSE]; <> <<>> Action: TYPE = RECORD [ SELECT type: * FROM client => [ proc: PROC [REF], data: REF ], tbUser => [ proc: TiogaButtons.TiogaButtonProc, button: TiogaButtons.TiogaButton, clientData: REF, mouseButton: ViewerClasses.MouseButton, shift, control: BOOL ], mbUser => [ proc: ViewerClasses.ClickProc, parent: ViewerClasses.Viewer, clientData: REF, mouseButton: ViewerClasses.MouseButton, shift, control: BOOL ] ENDCASE ]; DequeueAction: PROC [q: Queue] RETURNS [Action]; <> <> Flush: PROC [q: Queue, abort: BOOL ¬ FALSE]; <> FlushWithCallback: PROC [q: Queue, proc: PROC [Action] ¬ NIL, abort: BOOL ¬ FALSE]; <> END.