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
Doug Wyatt, March 2, 1985 5:35:13 pm PST
Michael Plass, March 14, 1985 4:47:24 pm PST
Beach, March 17, 1985 11:32:10 am PST
DIRECTORY
NameSymbolTable USING [Name],
NodeStyle USING [Name, Ref],
TextNode USING [Ref],
TJaMBasic USING [Object];
NodeStyleObsolete: CEDAR DEFINITIONS
= BEGIN
Ref: TYPE = NodeStyle.Ref;
Name: TYPE = NodeStyle.Name;
Object: TYPE = TJaMBasic.Object;
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: Name,
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: Name,
eval: PROC [node: TextNode.Ref] RETURNS [Object]
];
RemoveNodeFromApplyAllCache: PROC [node: TextNode.Ref];
Whenever something happens to the node that might cause the value of the free variable eval proc to change, call this routine.
RemoveAllFromApplyAllCache: PROC;
Whenever something happens that might change values for free variable eval procs to change, call this routine.
UnregisterStyleFreeVar: PROC [name: Name];
EvalFreeVars: PROC [style: Ref, node: TextNode.Ref];
Special Parameter Extensions
DefineSpecial: PROC [name: Name, initialValue: REAL ← 0.0];
GetSpecial: PROC [s:Ref, name: Name] RETURNS [REAL];
GetSpecialI: PROC [s:Ref, name: Name] RETURNS [INTEGER];
nonNumeric: ERROR; -- raised if call GetSpecial or GetSpecialI for nonnumeric variable
DefineSpecialObj: PROC [name: Name, initialValue: TJaMBasic.Object];
GetSpecialObj: PROC [s:Ref, name: Name] RETURNS [Object];
END.