NodeStyleObsolete.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Written by Bill Paxton, January 1981
Last changed by Bill Paxton, December 1, 1982 8:37 am
Michael Plass, March 14, 1985 4:47:24 pm PST
Beach, March 20, 1985 6:12:04 pm PST
Doug Wyatt, April 14, 1985 4:39:56 pm PST
DIRECTORY
NodeStyle USING [Ref],
TextNode USING [Ref],
TJaM USING [CommandProc];
NodeStyleObsolete: CEDAR DEFINITIONS
= BEGIN
Ref: TYPE = NodeStyle.Ref;
Object: TYPE = REF;
Style free variables
These are used for style extensions that need free variables similar to node level or node comment property. Once the name is registered, style rules may use the name to get access to the value for the current node. The registered eval proc's are called to get the current value whenever the style for the node is computed.
RegisterStyleFreeVar: PROC [name: ATOM,
eval: PROC [node: TextNode.Ref] RETURNS [REAL]
];
The first REAL valued free variable is very efficiently implemented. After that, free var's start costing more. Use them to check out new ideas, then get the variable "blessed" and incorporated in the system in a more effiecient manner.
RegisterStyleFreeObjVar: PROC [name: ATOM,
eval: PROC [node: TextNode.Ref] RETURNS [Object]
];
UnregisterStyleFreeVar: PROC [name: ATOM];
EvalFreeVars: PROC [style: Ref, node: TextNode.Ref];
GetFreeVarOp: TJaM.CommandProc;
GetFreeVarObjOp: TJaM.CommandProc;
Special Parameter Extensions
DefineSpecial: PROC [name: ATOM, initialValue: REAL ← 0.0];
GetSpecial: PROC [s:Ref, name: ATOM] RETURNS [REAL];
GetSpecialI: PROC [s:Ref, name: ATOM] RETURNS [INTEGER];
nonNumeric: ERROR; -- raised if call GetSpecial or GetSpecialI for nonnumeric variable
DefineSpecialObj: PROC [name: ATOM, initialValue: Object];
GetSpecialObj: PROC [s:Ref, name: ATOM] RETURNS [Object];
END.