<> <> <> <> <> <<>> DIRECTORY Cubic USING [Bezier], Vector2 USING [VEC], Imager USING [Context], Rope USING [ROPE]; Highlight: CEDAR DEFINITIONS = BEGIN VEC: TYPE ~ Vector2.VEC; <<>> <> Context: TYPE = REF Object; Object: TYPE = RECORD[data: REF Data, procs: REF Procs]; Procs: TYPE = RECORD[ showPt: PROC[ctx: Context, pt: VEC], -- inverts a small area around the given point showBezier: PROC[ctx: Context, bezier: Cubic.Bezier], showRope: PROC[ctx: Context, rope: Rope.ROPE], cleanUp: PROC[ctx: Context] ]; Data: TYPE = RECORD[ imager: Imager.Context _ NIL, lastRope: Rope.ROPE _ NIL, lastBezier: Cubic.Bezier _ [[-1,-1],[-1,-1],[-1,-1],[-1,-1]], lastPt: VEC _ [0,0], clientData: REF ]; ShowPt: PROC[ctx: Context, pt: VEC] = INLINE {ctx.procs.showPt[ctx,pt]}; <> ShowBezier: PROC[ctx: Context, bezier: Cubic.Bezier] = INLINE {ctx.procs.showBezier[ctx, bezier]}; <> ShowRope: PROC[ctx: Context, rope: Rope.ROPE]= INLINE {ctx.procs.showRope[ctx,rope]}; <> CleanUp: PROC[ctx: Context] = INLINE {ctx.procs.cleanUp[ctx]}; <> END.