TIPUser.mesa
Copyright Ó 1985, 1986, 1987, 1991, 1992 by Xerox Corporation. All rights reserved.
Last Edited by McGregor, October 21, 1982 10:16 am
Last Edited by: Maxwell, January 3, 1983 11:01 am
Bier, November 30, 1988 5:07:34 pm PST
Doug Wyatt, January 19, 1987 11:48:08 pm PST
Willie-s, October 11, 1991 10:47 am PDT
Christian Jacobi, February 20, 1992 11:48 am PST
Minimal view on the tip mechanism useful for average clients installing tip tables.
DIRECTORY
Rope USING [ROPE],
ScreenCoordsTypes USING [TIPScreenCoords, TIPScreenCoordsRec],
TIPTypes USING [TIPTable];
TIPUser: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
TIPTable: TYPE ~ TIPTypes.TIPTable;
TIPScreenCoords: TYPE ~ ScreenCoordsTypes.TIPScreenCoords;
TIPScreenCoordsRec: TYPE ~ ScreenCoordsTypes.TIPScreenCoordsRec;
TIPScreenCoords are used to pass the hardware cursor information. [0,0] is lower left.
TIPTime: TYPE = REF TIPTimeObj;
TIPTimeObj: TYPE = CARD32;
InstantiateNewTIPTable: PROC [file: ROPE ¬ NIL] RETURNS [table: TIPTable];
TIP tables are user-editable and normally live in the file system. Clients may instantiate new tables with this routine. An error in reading in a new table can produce the continuable InvalidTable signal.
TransparentTIPTable: PROC [] RETURNS [table: TIPTable];
InvalidTable: SIGNAL [errorMsg: ROPE];
Predicates
Advanced clients of tip can declare user-defined predicates for tip tables.
We recommend using the separate module because we plan to simplify TIPUser.
TIPPredicate: TYPE ~ PROC [] RETURNS [BOOL];
RegisterTIPPredicate: PROC [key: ATOM, p: TIPPredicate];
A user-defined predicate may be included in the enables list of a TIPTable via this association mechanism.
END.