DIRECTORY CedarProcess, Commander, Controls, Draw2d, G2dBasic, Imager, Rope, ViewerClasses; G2dImplicitTool: CEDAR DEFINITIONS ~ BEGIN CommandProc: TYPE ~ Commander.CommandProc; ForkableProc: TYPE ~ CedarProcess.ForkableProc; Process: TYPE ~ CedarProcess.Process; ButtonList: TYPE ~ Controls.ButtonList; Control: TYPE ~ Controls.Control; ControlList: TYPE ~ Controls.ControlList; OuterData: TYPE ~ Controls.OuterData; Typescript: TYPE ~ Controls.Typescript; DrawProc: TYPE ~ Draw2d.DrawProc; Zip: TYPE ~ Draw2d.Zip; Pair: TYPE ~ G2dBasic.Pair; PairSequence: TYPE ~ G2dBasic.PairSequence; ROPE: TYPE ~ Rope.ROPE; Viewer: TYPE ~ ViewerClasses.Viewer; ValueProc: TYPE ~ PROC [point: Pair, clientData: REF ANY ¬ NIL] RETURNS [value: REAL ¬ 0.0]; StartProc: TYPE ~ PROC [clientData: REF ANY ¬ NIL, frame, nFrames: NAT ¬ 0]; Tool: TYPE ~ REF ToolRep; ToolRep: TYPE ~ RECORD [ graphics: Viewer ¬ NIL, -- the graphics viewer outerData: OuterData ¬ NIL, -- for buttons, controls typescript: Typescript ¬ NIL, -- user typescript buttons: ButtonList ¬ NIL, -- buttons ipStrokeWidth: REAL ¬ 0.0, process: Process ¬ NIL, -- current, forked process scale: Control ¬ NIL, -- display scale moveX: Control ¬ NIL, -- x translation moveY: Control ¬ NIL, -- y translation threshold: REAL ¬ 0.0, -- f'= f-threshold size: REAL ¬ 0.02, -- size of tracking square curve: PairSequence ¬ NIL, -- the curve startProc: StartProc ¬ NIL, -- to find start point valueProc: ValueProc ¬ NIL, -- to evaluate space zip: Zip ¬ NIL, -- draw accelerator displayClient: BOOL ¬ TRUE, -- shown client draw or not currentFrame: NAT ¬ 0, -- current frame of animation firstFrame: NAT ¬ 0, -- first frame of animation lastFrame: NAT ¬ 0, -- last frame of animation saveIP: ROPE ¬ NIL, animateIP: ROPE ¬ NIL, clientDraw: DrawProc ¬ NIL, -- client supplied drawProc clientData: REF ANY ¬ NIL -- client data ]; MakeTool: PROC [ name: ROPE, -- name of the tool valueProc: ValueProc, -- to evaluate implicit function extraButtons: ButtonList ¬ NIL, -- in addition to the standard set extraControls: ControlList ¬ NIL, -- in addition to the standard set clientData: REF ANY ¬ NIL, -- data for the client clientDraw: DrawProc ¬ NIL, -- to draw the client's object startProc: StartProc ¬ NIL, -- to initialize client, if necessary scale: REAL ¬ 1.0, -- initial display scale move: Pair ¬ [0.0, 0.0], -- initial display translation toolSettings: ToolRep ¬ []] -- initial tool settings RETURNS [Tool]; ToolBusy: PROC [tool: Tool] RETURNS [BOOL]; MaybeFork: PROC [tool: Tool, proc: ForkableProc] RETURNS [forked: BOOL]; Stop: PROC [tool: Tool, reason: ROPE ¬ NIL, waitTilAborted: BOOL ¬ FALSE]; Repaint: PROC [tool: Tool, whatChanged: REF ANY ¬ NIL]; Register: PROC [ name: ROPE, -- name of option command: CommandProc, -- proc to be called doc: ROPE]; -- documentation of option ToolOptions: PROC RETURNS [toolOptions: ROPE]; ExecuteOption: CommandProc; END. 6 G2dImplicitTool.mesa Copyright Σ 1985, 1992 by Xerox Corporation. All rights reserved. Bloomenthal, August 25, 1992 2:08 pm PDT Imported Types Local Types Return the value at point (> 0 inside, < 0 outside surface). Book-keeping: Camera: Sampling: The Curve: Surface Evaluation Procedures: Display: Animation: Client Support: Implicit Design Tool Creation Return a tool for manipulation/polygonization of a 2d implicit function. See ImplicitDesign tool in ImplicitSurfacesDoc. Tool Control Return true if the tool is currently busy with a forked process. Fork the forkable proc if the tool isn't busy; tool is passed to proc as data. This will halt any implicit tool operation and print the reason in the typescript. Repaint the graphics viewer associated with the tool. Registration and Dispatching Register a command proc with Implicit Design. Subsequently, it may be invoked from the commander by "ImplicitDesign2d " Return a rope listing the registered ImplicitDesign options. Execute the named option; may return [$Failure, "No such option."]. Κ²–"cedarcode" style•NewlineDelimiter ™™Jšœ Οeœ6™BJ™(J˜JšΟk œS˜\J˜—šΠblœžœž ˜"J˜—Jšœž˜headšΟl™Jšœ žœ˜+Jšœžœ˜1Jšœ žœ˜)Jšœžœ˜*Jšœ žœ˜%Jšœžœ˜,Jšœ žœ˜(Jšœžœ˜*Jšœ žœ˜$Jšœžœ˜Jšœžœ˜ Jšœžœ˜-Jšžœžœžœ˜Jšœ žœ˜(—š  ™ š œ žœžœžœžœžœ˜AJšœžœžœ˜$J™DJ™—š œ žœžœžœžœžœžœ˜OJ˜—Jšœžœžœ ˜šœ žœžœ˜™ JšœžœΟc˜6Jšœžœ‘˜:Jšœžœ‘˜6Jšœžœ‘ ˜,Jšœžœ˜Jšœžœ‘˜:—™Jšœžœ‘˜/Jšœ žœ žœ‘˜.Jšœ žœ žœ‘˜.—™ Jšœžœ ‘Πcs‘ ˜1Jšœ žœ‘˜7—™ Jšœžœ‘ ˜-—™Jšœžœ‘˜:Jšœžœ‘˜7—™ Jšœžœ‘˜-Jšœžœžœ‘˜=—™ Jšœžœ ‘˜