File: DBIcons.mesa
Implemented By: DBIconsImpl
Last edited by
Teitelman on July 18, 1984 8:58:29 am PDT
Donahue, August 11, 1983 2:28 pm
Widom, June 18, 1984 8:55:28 am PDT
DIRECTORY
DB,
Icons USING [IconFlavor],
IO USING[STREAM],
Rope USING [ROPE];
DBIcons: CEDAR DEFINITIONS = BEGIN
EstablishIconDB: PROC [file: Rope.ROPE];
IconDB: READONLY Rope.ROPE;
readOnly: READONLY BOOLEAN;
RegisterIcon: PROC [iconName: Rope.ROPE, fileName: Rope.ROPE, index: CARDINAL];
IsRegistered: PROC[iconName: Rope.ROPE ← NIL, fileName: Rope.ROPE ← NIL, index: CARDINAL ← LAST[CARDINAL]] RETURNS[name: Rope.ROPE, file: Rope.ROPE, i: CARDINAL];
GetIcon: PROC [iconName: Rope.ROPE, default: Icons.IconFlavor ← unInit] RETURNS [Icons.IconFlavor];
GetIconForEntity:
PROC [eName, domain: Rope
.ROPE, segment:
DB.Segment]
RETURNS [Icons.IconFlavor];
If the icon has been registered by SetIcon, then return it. The default is the acorn icon
SetIcon:
PROC[e:
DB.Entity, iconFile: Rope.
ROPE, fileIndex:
CARDINAL];
sets an icon for an entity or a domain
InvalidateCache: PROC [iconName: Rope.ROPE ← NIL];
WriteCatalogue: PROC[ file: Rope.ROPE ];
ReadCatalogue: PROC[ file: Rope.ROPE, errlog: IO.STREAM ← NIL ];
Failed: ERROR [why: Failure, reason: Rope.ROPE];
Failure: TYPE = {badSegment, noSuchIcon, fileNotFound, invalidIndex};
END.