Labels.mesa; Written by S. McGregor
Last Edited by: McGregor, July 21, 1983 10:58 am
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:
BOOL ←
TRUE]
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:
BOOL ←
TRUE] =
INLINE
{label.class.set[label, value, paint]};
Get:
PROC [label: Label]
RETURNS [value: Rope.
ROPE] =
INLINE
{RETURN[label.name]};
SetDisplayStyle:
PROC [label: Label, style:
ATOM, paint:
BOOL ←
TRUE] =
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.