Rules.mesa; Edited by McGregor on June 2, 1982 1:48 pm
Last Edited by: Maxwell, December 17, 1982 10:07 am
DIRECTORY
Graphics USING [Color, black],
ViewerOps USING [DestroyViewer],
ViewerClasses USING [Viewer, ViewerRec];
Rules: CEDAR DEFINITIONS IMPORTS ViewerOps = BEGIN OPEN ViewerClasses;
Rule: TYPE = Viewer;
A rule is a rectangle (viewer) of uniform color, good for simple graphics when creating tools.
Create: PROC [info: ViewerRec, color: Graphics.Color ← Graphics.black, paint: BOOLTRUE]
RETURNS [rule: Rule] ;
Destroy: PROC [rule: Rule] = INLINE {ViewerOps.DestroyViewer[rule]};
Set: PROC [rule: Rule, data: REF Graphics.Color, paint: BOOLTRUE] = INLINE
{rule.class.set[rule, data, paint]};
END.