DIRECTORY Containers USING [ChildXBound, Create], DFOperations USING [SModelAction], DFOperationsQueue USING [Enqueue, RequestRecord], DFToolInternal USING [AddOpToTable, DFTool, EnsureDFName, offScreenY, OpDefiner, Operation, OpsInteraction, OpSpecificProc, ViewerToRopeList], FileViewerOps USING [WaitUntilSaved], Rope USING [ROPE], ViewerOps USING [MoveViewer], ViewerTools USING [GetContents]; VerifyToolImpl: CEDAR PROGRAM IMPORTS Containers, DFOperationsQueue, DFToolInternal, FileViewerOps, ViewerOps, ViewerTools = BEGIN OPEN Ops: DFOperations, OpsQ: DFOperationsQueue, Tool: DFToolInternal; ROPE: TYPE = Rope.ROPE; VerifyData: TYPE = RECORD [ -- this is a placeholder for future options dummy: NAT _ 0 ]; VerifySpecific: Tool.OpSpecificProc = { SELECT action FROM $createOptions => { op: Tool.Operation = NARROW[param]; tool: Tool.DFTool = op.tool; data: REF VerifyData = NEW[VerifyData _ []]; op.options _ data; op.optionsContainer _ Containers.Create[info: [ wx: 0, wy: Tool.offScreenY, ww: 9999, -- arbitrary; Containers.ChildXBound overrides wh: 0, parent: tool.inner, border: FALSE, scrollable: FALSE ]]; Containers.ChildXBound[tool.inner, op.optionsContainer]; op.height _ op.height + tool.parameters.entryVSpace; ViewerOps.MoveViewer[ viewer: op.optionsContainer, x: op.optionsContainer.wx, y: op.optionsContainer.wy, w: op.optionsContainer.ww, h: op.height, paint: FALSE ]; }; $doOp => { op: Tool.Operation = NARROW[param]; tool: Tool.DFTool = op.tool; wDir: ROPE = ViewerTools.GetContents[tool.wDir]; data: REF VerifyData = NARROW[op.options]; FOR list: LIST OF ROPE _ Tool.ViewerToRopeList[tool.dfNames], list.rest UNTIL list = NIL DO short, long: ROPE; [short, long] _ Tool.EnsureDFName[list.first, wDir]; FileViewerOps.WaitUntilSaved[long, tool.feedback]; tool.opsQueue.Enqueue[NEW[OpsQ.RequestRecord _ [ dfFile: short, wDir: wDir, interact: Tool.OpsInteraction, log: tool.log, clientData: op, opSpecific: verify[] ]]]; ENDLOOP; }; ENDCASE; }; Tool.AddOpToTable[ NEW[Tool.OpDefiner _ ["Verify", $verify, $individual, VerifySpecific]]]; END. ΔVerifyToolImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. last edited by Levin on December 15, 1983 12:00 pm Doug Wyatt, March 6, 1985 12:57:55 pm PST Spreitzer, May 20, 1985 5:52:37 pm PDT -- ---- ---- ---- ---- ---- ---- ---- Verify-specific Code -- ---- ---- ---- ---- ---- ---- ---- Eventually, options creation will go here. -- ---- ---- ---- ---- ---- ---- ---- Initialization -- ---- ---- ---- ---- ---- ---- ---- ΚΟ˜codešœ™Kšœ Οmœ1™