File: DBIcons.mesa
Implemented By: DBIconsImpl
Last edited by
Teitelman on July 18, 1984 8:58:29 am PDT
Donahue, September 5, 1984 7:58:08 am PDT
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];
Close: PROC[];
Close the database connection. When the next interrogation or update operation occurs, the database will be reopened (and the cache flushed, if necessary).
IconDB: READONLY Rope.ROPE;
readOnly: READONLY BOOLEAN;
RegisterIcon: PROC [iconName: Rope.ROPE, fileName: Rope.ROPE, index: CARDINAL];
IsRegistered: PROC[iconName: Rope.ROPENIL, fileName: Rope.ROPENIL, index: CARDINALLAST[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
GetIconNameForEntity: PROC [eName, domain: Rope.ROPE, segment: DB.Segment] RETURNS [name: Rope.ROPE];
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.ROPENIL];
WriteCatalogue: PROC[ file: Rope.ROPE ];
ReadCatalogue: PROC[ file: Rope.ROPE, errlog: IO.STREAMNIL ];
Failed: ERROR [why: Failure, reason: Rope.ROPE];
Failure: TYPE = {badSegment, noSuchIcon, fileNotFound, invalidIndex};
END.