<> <> <> <> DIRECTORY TSGlue, TSTypes; TSGraphic: CEDAR DEFINITIONS = BEGIN Dimn: TYPE = TSTypes.Dimn; nilDimn: Dimn = TSTypes.nilDimn; Paint: PaintProc = INLINE {self.paintProc[self, context, originX, originY, extent]}; Layout: LayoutProc = INLINE {extent _ self.layoutProc[self, maxX, maxY, suggestedX, suggestedY]}; Object: TYPE = REF ObjectRec; ObjectRec: TYPE = RECORD [ paintProc: PaintProc, -- procedure to call to draw the object layoutProc: LayoutProc, -- procedure that determines the extent of the object data: REF ANY -- data the procedures need ]; PaintProc: TYPE = PROCEDURE [ self: Object, context: REF ANY, -- a TSOutput.Handle originX, originY: Dimn, -- this is where to paint it extent: TSTypes.Dimensions ]; LayoutProc: TYPE = PROCEDURE [ self: Object, maxX, maxY: Dimn _ nilDimn, suggestedX, suggestedY: Dimn _ nilDimn ] RETURNS [extent: TSTypes.Dimensions]; END. Michael Plass, November 2, 1982 10:05 am. CEDARized. Michael Plass, December 8, 1982 3:15 pm. Changed LayoutProc to return dimensions instead of flexes.