Labels.mesa; Edited by McGregor on June 2, 1982 2:51 pm
Last Edited by: Maxwell, December 17, 1982 10:08 am
DIRECTORY
Rope USING [ROPE],
VFonts USING [defaultFont, Font],
ViewerOps USING [DestroyViewer],
ViewerClasses USING [Viewer, ViewerRec];
Labels: CEDAR DEFINITIONS IMPORTS VFonts, ViewerOps = BEGIN OPEN ViewerClasses;
Label: TYPE = Viewer;
Create: PROC [info: ViewerRec ← [], font: VFonts.Font ← VFonts.defaultFont, paint: BOOLTRUE]
RETURNS [label: Label] ;
Pass the label contents in info.name. Default info.ww, info.wh to get an aesthetic value based on label size.
Destroy: PROC [label: Label] = INLINE {ViewerOps.DestroyViewer[label]};
Set: PROC [label: Label, value: Rope.ROPE, paint: BOOLTRUE] = INLINE
{label.class.set[label, value, paint]};
SetDisplayStyle: PROC [label: Label, style: ATOM, paint: BOOLTRUE] = INLINE
{label.class.set[label, style, paint, $DisplayStyle]} ;
Recognised display styles are:
$BlackOnWhite - black letters on white background (default)
$WhiteOnBlack - white letters on black background
$BlackOnGrey - black letters on grey background
END.