TIPTables.mesa; Last Edited by McGregor, August 23, 1982 2:13 pm
Last Edited by: Maxwell, December 17, 1982 9:52 am
DIRECTORY
Interminal USING [KeyName, MousePosition, updown],
Intime USING [EventTime, MsTicks];
TIPTables: CEDAR DEFINITIONS
SHARES Intime = BEGIN
TIPScreenCoords are used to pass the hardware cursor information. [0,0] is lower left.
TIPScreenCoords: TYPE = REF TIPScreenCoordsRec;
TIPScreenCoordsRec: TYPE = Interminal.MousePosition;
TIPTime: TYPE = REF Intime.EventTime;
TIPTable: TYPE = REF TIPTableRec;
TIPTableRec: TYPE = RECORD [
mouseTicks: Intime.MsTicks ← 50,
opaque : BOOLEANTRUE,
link : TIPTable ← NIL,
ignore : IgnoreBits ← IgnoreEverything,
variants: SELECT flavor: * FROM
small => [all: TIPChoiceSeries],
fast => [mouse : TIPChoice,
keyDown,
keyUp : ARRAY Interminal.KeyName OF TIPChoice,
time : TIPChoice],
ENDCASE
];
IgnoreBits: TYPE = MACHINE DEPENDENT RECORD [
up, down, move: BOOLEAN,
unused: [0..8192)
];
IgnoreEverything: IgnoreBits = [TRUE, TRUE, TRUE, 0];
TIPChoiceSeries: TYPE = LIST OF TIPChoice;
TIPChoice: TYPE = LIST OF TIPTerm ← NIL;
TIPTerm: TYPE = RECORD [
variants: SELECT flavor: * FROM
keyTrigger  => [keyState: TIPKeyState],
mouseTrigger => NULL,
timeTrigger  => [flavor: TimeoutFlavor, mSecs: Intime.MsTicks],
keyEnable  => [keyState: TIPKeyState],
key2Enable  => [keyState1, keyState2: TIPKeyState], -- true if either
keyEnableList => [lst: LIST OF TIPKeyState], -- true if any
predEnable  => [predicate: ATOM],
char    => [ch: REF CHARACTER],
coords    => [xy: TIPScreenCoords],
time    => [time: TIPTime],
nested   => [statement : TIPChoiceSeries],
result    => [list: TIPResults],
ENDCASE
];
TIPResults: TYPE = LIST OF REF ANYNIL;
actually LIST OF ATOM, REF INT, REF TEXT, or stdChar, or stdCoords, or stdTime;
TimeoutFlavor: TYPE = {gt, lt};
TIPActionFlavor: TYPE = {key, mouse, time};
TIPEnablesFlavor: TYPE = {key, pred};
TIPKeyState: TYPE = RECORD [
key : Interminal.KeyName,
state: Interminal.updown ← down
];
END.