-- TEditBitmapCache.mesa; Edited by McGregor on  4-Dec-81  9:45:28

DIRECTORY
  GraphicsExtra USING [BitmapRef, NewBitmap],
  TextNode USING [Location];

TEditBitmapCache: DEFINITIONS IMPORTS GraphicsExtra = BEGIN

Bitmap: TYPE = REF BitmapRec;
BitmapRec: TYPE = RECORD [
	bits: GraphicsExtra.BitmapRef,
	chars: INTEGER ← 0,
	leftIndent: INTEGER ← 0
	];

Fetch: PROC [key: TextNode.Location] RETURNS [Bitmap] ;

AddCacheEntry: PROC [key: TextNode.Location, bitmap: Bitmap] ;

FlushCacheEntry: PROC [key: TextNode.Location] ;

FlushOldCacheRange: PROC [key: TextNode.Location] ;

AllocateCachedBitmap: PROC [width, height: INTEGER] RETURNS [bitmap: Bitmap] = INLINE
	{ bitmap ← NEW[TEditBitmapCache.BitmapRec ←
		[bits: GraphicsExtra.NewBitmap[width, height]]] };

END.