MODULE*************************************************************************** Convenience Procedures ***************************************************************************; IMPORT BooleanProp, BooleanPropPrivate, Color, ColorProp, ColorPropPrivate, GO, GOPrivate; REVEAL T = GO.T BRANDED OBJECT OVERRIDES needsTransparency := NeedsTransparency; END; PROCEDURE LightGO NeedsTransparency (<* UNUSED *> self : T; <* UNUSED *> t : REAL) : BOOLEAN = BEGIN RETURN FALSE; END NeedsTransparency;
PROCEDURESetColour (o : GO.T; v : Color.T) = BEGIN o.setProp (Colour.bind (ColorProp.NewConst (v))); END SetColour; PROCEDURESetSwitch (o : GO.T; v : BOOLEAN) = BEGIN o.setProp (Switch.bind (BooleanProp.NewConst (v))); END SetSwitch; BEGIN Colour := NEW (ColorProp.Name).init (Color.White); Switch := NEW (BooleanProp.Name).init (TRUE); END LightGO.