VerifyToolImpl.mesa
last edited by Levin on December 15, 1983 12:00 pm
DIRECTORY
Containers USING [ChildXBound, Create],
DFOperations USING [SModelAction],
DFOperationsQueue USING [Enqueue, RequestRecord],
DFToolInternal USING [
AddOpToTable, DFTool, EnsureDFName, offScreenY, OpDefiner, Operation, OpsInteraction, OpSpecificProc, ViewerToRopeList],
Rope USING [ROPE],
ViewerOps USING [MoveViewer],
ViewerTools USING [GetContents];
VerifyToolImpl: CEDAR PROGRAM
IMPORTS Containers, DFOperationsQueue, DFToolInternal, ViewerOps, ViewerTools =
BEGIN
OPEN Ops: DFOperations, OpsQ: DFOperationsQueue, Tool: DFToolInternal;
ROPE: TYPE = Rope.ROPE;
---- ---- ---- ---- ---- ---- ---- ----
Verify-specific Code
---- ---- ---- ---- ---- ---- ---- ----
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];
Eventually, options creation will go here.
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
tool.opsQueue.Enqueue[NEW[OpsQ.RequestRecord ← [
dfFile: Tool.EnsureDFName[list.first],
wDir: wDir,
interact: Tool.OpsInteraction,
log: tool.log,
clientData: op,
opSpecific: verify[]
]]];
ENDLOOP;
};
ENDCASE;
};
---- ---- ---- ---- ---- ---- ---- ----
Initialization
---- ---- ---- ---- ---- ---- ---- ----
Tool.AddOpToTable[
NEW[Tool.OpDefiner ← ["Verify", $verify, $individual, VerifySpecific]]];
END.