<> <> <<>> DIRECTORY Icons USING [DrawIconProc, IconFlavor, IconRef, IconRep, NewIcon], Imager USING [black, MaskRectangleI, SetColor, SetFont, SetXYI, ShowChar], ImagerFont USING [Find, Font, Scale], SurfaceIcons USING []; SurfaceIconsImpl: CEDAR PROGRAM IMPORTS Icons, Imager, ImagerFont EXPORTS SurfaceIcons ~ BEGIN SurfaceToolIcon: PUBLIC PROC[] RETURNS [icon: Icons.IconFlavor] ~ BEGIN iconRef: Icons.IconRef _ NEW[Icons.IconRep _ [ bits: ALL[0], label: TRUE, invertLabel: FALSE, lx: 4, ly: 4, lw: 56, lh: 56, proc: PaintSurfaceToolIcon]]; icon _ Icons.NewIcon[iconRef]; END; SurfaceViewerIcon: PUBLIC PROC[] RETURNS [icon: Icons.IconFlavor] ~ BEGIN iconRef: Icons.IconRef _ NEW[Icons.IconRep _ [ bits: ALL[0], label: TRUE, invertLabel: FALSE, lx: 4, ly: 4, lw: 56, lh: 56, proc: PaintSurfaceViewerIcon]]; icon _ Icons.NewIcon[iconRef]; END; PaintSurfaceToolIcon: Icons.DrawIconProc ~ BEGIN mathFont, textFont: ImagerFont.Font; <> <> Imager.SetColor[context, Imager.black]; Imager.MaskRectangleI[context, 50, 50, 10, 10]; <> Imager.SetXYI[context, 15, 40]; <> END; PaintSurfaceViewerIcon: Icons.DrawIconProc ~ BEGIN END; END.