DIRECTORY Buttons USING [Create, Button, ButtonProc], Containers USING [ChildXBound, ChildYBound, Container, Create], Labels USING [Create, Label], Rope USING [ROPE], Rules USING [Create], TapeOps USING [DriveNumber], TapeToolInternal USING [Action, Enqueue, Parameters, PrompterSeq, TapeTool, TapeToolOp], VFonts USING [Font], ViewerClasses USING [Viewer, ViewerClassRec], ViewerTools USING [GetContents]; TapeToolInterfaceImplA: CEDAR PROGRAM IMPORTS Buttons, Containers, Labels, Rules, TapeToolInternal, ViewerTools EXPORTS TapeToolInternal = BEGIN OPEN Tool: TapeToolInternal; TapeTool: TYPE ~ Tool.TapeTool; PrompterSeq: TYPE ~ Tool.PrompterSeq; ROPE: TYPE ~ Rope.ROPE; ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- BuildOperations: PUBLIC PROC [tool: TapeTool] = BEGIN rule, prev: ViewerClasses.Viewer; height: INT _ 0; tool.ops _ Containers.Create[info: [ wx: 0, wy: tool.height, ww: 9999, -- arbitrary; Containers.ChildXBound overrides wh: 9999, -- arbitrary; Containers.ChildYBound overrides parent: tool.outer, border: FALSE, scrollable: FALSE ], paint: FALSE]; tool.OpenButton _ prev _ Buttons.Create[ info: [name: "Open", wx: tool.params.entryHSpace, wy: height, wh: tool.params.entryHeight, parent: tool.ops, border: TRUE ], proc: SelectOperation, fork: FALSE, clientData: tool, guarded: FALSE, font: tool.params.font, paint: FALSE ]; tool.CloseButton _ prev _ Buttons.Create[ info: [name: "Close", wx: prev.wx + prev.ww + tool.params.entryHSpace, wy: height, wh: tool.params.entryHeight, parent: tool.ops, border: TRUE ], proc: SelectOperation, fork: FALSE, clientData: tool, guarded: TRUE, font: tool.params.font, paint: FALSE ]; tool.RewindButton _ prev _ Buttons.Create[ info: [name: "Rewind", wx: prev.wx + prev.ww + tool.params.entryHSpace, wy: height, wh: tool.params.entryHeight, parent: tool.ops, border: TRUE ], fork: FALSE, proc: SelectOperation, clientData: tool, font: tool.params.font, paint: FALSE ]; tool.UnloadButton _ prev _ Buttons.Create[ info: [name: "Unload", wx: prev.wx + prev.ww + tool.params.entryHSpace, wy: height, wh: tool.params.entryHeight, parent: tool.ops, border: TRUE ], proc: SelectOperation, fork: FALSE, clientData: tool, guarded: TRUE, font: tool.params.font, paint: FALSE ]; tool.Statusbutton _ prev _ Buttons.Create[ info: [name: "Status", wx: prev.wx + prev.ww + tool.params.entryHSpace, wy: height, wh: tool.params.entryHeight, parent: tool.ops, border: TRUE ], fork: FALSE, proc: SelectOperation, clientData: tool, guarded: FALSE, font: tool.params.font, paint: FALSE ]; height _ height + tool.params.entryHeight + tool.params.entryVSpace; tool.ReadButton _ prev _ Buttons.Create[ info: [name: "Read", wx: tool.params.entryHSpace, wy: height, wh: tool.params.entryHeight, parent: tool.ops, border: TRUE ], proc: SelectOperation, fork: FALSE, clientData: tool, guarded: FALSE, font: tool.params.font, paint: FALSE ]; tool.WriteButton _ prev _ Buttons.Create[ info: [name: "Write", wx: prev.wx + prev.ww + tool.params.entryHSpace, wy: height, wh: tool.params.entryHeight, parent: tool.ops, border: TRUE ], proc: SelectOperation, fork: FALSE, clientData: tool, guarded: FALSE, font: tool.params.font, paint: FALSE ]; tool.FSF _ prev _ Buttons.Create[ info: [name: "Fwd File", wx: prev.wx + prev.ww + tool.params.entryHSpace, wy: height, wh: tool.params.entryHeight, parent: tool.ops, border: TRUE ], proc: SelectOperation, clientData: tool, guarded: FALSE, fork: FALSE, font: tool.params.font, paint: FALSE ]; tool.BSF _ prev _ Buttons.Create[ info: [name: "Back File", wx: prev.wx + prev.ww + tool.params.entryHSpace, wy: height, wh: tool.params.entryHeight, parent: tool.ops, border: TRUE ], proc: SelectOperation, clientData: tool, fork: FALSE, guarded: FALSE, font: tool.params.font, paint: FALSE ]; height _ height + tool.params.entryHeight + tool.params.entryVSpace; rule _ Rules.Create[info: [ wx: 0, wy: height, ww: 9999, -- arbitrary; Containers.ChildXBound overrides wh: 1, parent: tool.ops ]]; height _ height + tool.params.entryVSpace; tool.statusLabel _ Labels.Create[ info: [ name: "Rdy Onl Rwd WP BOT EOT FMK NRZI HE SE DL RDP ICL Hdw FP Cmd", wx: 30, wy: height + 2, parent: tool.ops, border: FALSE ], font: tool.params.fixedFont ]; height _ height + tool.params.entryHeight + tool.params.entryVSpace; tool.recordCountLabel _ Labels.Create[ info: [ name: "File number: 0 ", wx: 30, wy: height + 2, parent: tool.ops, border: FALSE ], font: tool.params.fixedFont ]; rule _ Rules.Create[ info: [ wx: 0, wy: tool.recordCountLabel.wy + tool.recordCountLabel.wh + 2, wh: 1, ww: 9999, parent: tool.ops ] ]; tool.height _ tool.height + tool.params.entryHeight + tool.params.entryVSpace + height + 2; Containers.ChildXBound[container: tool.outer, child: tool.ops]; Containers.ChildYBound[container: tool.outer, child: tool.ops]; END; SelectOperation: Buttons.ButtonProc = BEGIN tool: Tool.TapeTool _ NARROW[clientData]; viewer: Buttons.Button _ NARROW[parent]; op: Tool.Action; IF tool.AbortNow THEN BEGIN tool.AbortNow _ FALSE; RETURN; END; op.opConversions _ ViewerTools.GetContents[tool.conversionsViewer]; op.opBlockingRope _ ViewerTools.GetContents[tool.blockingViewer]; op.oplreclRope _ ViewerTools.GetContents[tool.lreclViewer]; op.opFiles _ ViewerTools.GetContents[tool.fileNameViewer]; op.opWDir _ ViewerTools.GetContents[tool.wdViewer]; op.localOp _ tool.params.localDisk; op.tiogaRead _ tool.tiogaReadValue; op.padBlock _ tool.fillBlock; op.serverName _ ViewerTools.GetContents[tool.serverNameViewer]; op.driveNumberRope _ ViewerTools.GetContents[tool.driveNumberViewer]; op.density _ tool.density; op.op _ SELECT viewer FROM tool.OpenButton => Open, tool.CloseButton => Close, tool.RewindButton => Rewind, tool.UnloadButton => Unload, tool.Statusbutton => Status, tool.ReadButton => Read, tool.WriteButton => Write, tool.FSF => FSF, tool.BSF => BSF, ENDCASE => ERROR; Tool.Enqueue[tool: tool, q: tool.opsQueue, a: op]; END; END. àTapeToolInterfaceImplA.mesa Copyright c 1984 by Xerox Corp. All rights reserved. Last edited by Tim Diebert: March 19, 1986 3:36:11 pm PST Last Edited by: McCreight, February 25, 1985 5:48:20 pm PST Tool Construction Ê¥˜šœ™Jšœ Ïmœ*™5J™9J™;—J˜šÏk ˜ Jšœžœ˜+Jšœ žœ/˜?Jšœžœ˜Jšœžœžœ˜Jšœžœ ˜Jšœžœ˜JšœžœB˜XJšœžœ˜Jšœžœ˜-Jšœ žœ˜ J˜—šÏbœžœž˜%Jšžœžœ8˜IJšžœž˜ J˜Jšžœ˜J˜Jšœ žœ˜Jšœ žœ˜%Jšžœžœžœ˜J˜JšÏcœ œ œ œ œ œ œ ˜'Jšœ™Jš œ œ œ œ œ œ œ ˜'J˜šÐbnœž œž˜5Jšœ!˜!Jšœžœ˜šœ$˜$Jšœ˜Jšœ˜Jšœ  .˜8Jšœ  .˜8Jšœ˜Jšœžœ˜Jšœ ž˜Jšœ žœ˜—šœ(˜(˜Jšœ˜Jšœ ˜ Jšœ˜J˜Jšœž˜ J˜—Jšœ˜Jšœžœ˜ Jšœ˜Jšœ žœ˜Jšœ˜Jšœž˜ J˜—šœ)˜)˜Jšœ0˜0Jšœ ˜ Jšœ˜J˜Jšœž˜ J˜—Jšœ˜Jšœžœ˜ Jšœ˜Jšœ žœ˜Jšœ˜Jšœž˜ J˜—šœ*˜*˜Jšœ0˜0Jšœ ˜ Jšœ˜J˜Jšœž˜ J˜—Jšœžœ˜ Jšœ˜Jšœ˜Jšœ˜Jšœž˜ J˜—šœ*˜*˜Jšœ0˜0Jšœ ˜ Jšœ˜J˜Jšœž˜ J˜—Jšœ˜Jšœžœ˜ Jšœ˜Jšœ žœ˜Jšœ˜Jšœž˜ J˜—šœ*˜*˜Jšœ0˜0Jšœ ˜ Jšœ˜J˜Jšœž˜ J˜—Jšœžœ˜ Jšœ˜Jšœ˜Jšœ žœ˜Jšœ˜Jšœž˜ J˜—JšœD˜Dšœ(˜(˜Jšœ˜Jšœ ˜ Jšœ˜J˜Jšœž˜ J˜—Jšœ˜Jšœžœ˜ Jšœ˜Jšœ žœ˜Jšœ˜Jšœž˜ J˜—šœ)˜)˜Jšœ0˜0Jšœ ˜ Jšœ˜J˜Jšœž˜ J˜—Jšœ˜Jšœžœ˜ Jšœ˜Jšœ žœ˜Jšœ˜Jšœž˜ J˜—šœ!˜!˜Jšœ0˜0Jšœ ˜ Jšœ˜J˜Jšœž˜ J˜—Jšœ˜Jšœ˜Jšœ žœ˜Jšœžœ˜ Jšœ˜Jšœž˜ J˜—šœ!˜!˜Jšœ0˜0Jšœ ˜ Jšœ˜J˜Jšœž˜ J˜—Jšœ˜Jšœ˜Jšœžœ˜ Jšœ žœ˜Jšœ˜Jšœž˜ J˜—JšœD˜D˜J˜Jšœ ˜ Jšœ  .˜9J˜Jšœ˜Jšœ˜—Jšœ*˜*˜!šœ˜JšœD˜DJšœ˜Jšœ˜J˜Jšœž˜ J˜—Jšœ˜J˜—JšœD˜D˜&šœ˜Jšœb˜bJšœ˜Jšœ˜J˜Jšœž˜ J˜—Jšœ˜J˜—šœ˜˜Jšœ˜Jšœ<˜