ViewRecInsides.Mesa
Last Edited by: Maxwell, November 16, 1982 3:29 pm
Mike Spreitzer August 26, 1986 1:05:03 pm PDT
DIRECTORY AMBridge, AMTypes, Labels, PopUpButtons, Rope, ViewerClasses, ViewRec;
ViewRecInsides: CEDAR DEFINITIONS =
BEGIN OPEN PUB: PopUpButtons;
NotAnAggregate: ERROR;
ROPE: TYPE = Rope.ROPE;
TypedVariable: TYPE = AMTypes.TypedVariable;
Type: TYPE = AMTypes.Type;
Viewer: TYPE = ViewerClasses.Viewer;
Int: TYPE = ViewRec.Int;
EltHandle: TYPE = ViewRec.EltHandle;
OtherStuffProc: TYPE = ViewRec.OtherStuffProc;
CreateOptions: TYPE = ViewRec.CreateOptions;
Recognizer: TYPE = ViewRec.Recognizer;
Reductions: TYPE = ViewRec.Reductions;
Handler: TYPE = ViewRec.Handler;
SimpleHandler: TYPE = ViewRec.SimpleHandler;
ComplexHandler: TYPE = ViewRec.ComplexHandler;
Updater: TYPE = ViewRec.Updater;
AddPlace: TYPE = ViewRec.AddPlace;
Closure: TYPE = ViewRec.Closure;
Id: TYPE = ViewRec.Id;
RList: TYPE = LIST OF Recognizer;
DataList: TYPE = LIST OF RecordViewer;
RecordViewer: TYPE = REF RecordViewerPrivate;
RecordViewerPrivate:
TYPE =
RECORD [
v: Viewer ← NIL,
wDir: ROPE ← NIL,
rvParent: RecordViewer ← NIL,
edParent: EltData ← NIL,
eltsContainer, argContainer, feedBack, label, rule1, rule2: Viewer ← NIL,
otherStuff: LIST OF Viewer ← NIL,
loneLabel: BOOLEAN ← FALSE,
toButt: Closure ← [],
argPlace: INTEGER ← 0,
curProc: ProcData ← NIL,
runCount: INTEGER ← 0,
runningProcs: LIST OF ProcData ← NIL,
first, last: EltData ← NIL,
exclusiveProcs: BOOLEAN ← FALSE,
holdOff, highlightSelectedProc: BOOLEAN ← FALSE,
relayoutable, mayInitiateRelayout: BOOLEAN ← FALSE,
initializing: BOOL ← TRUE,
curWW: INTEGER ← 0,
hSep, vSep, nvSep, hPad, targetWidth, outerScrollDiffX, eltsScrollDiffX, prepsDiffX, argretScrollDiffX, maxEltsHeight, maxArgretHeight, minFeedBackWidth, feedBackHeight: INTEGER ← 0];
EltData: TYPE = REF EltDataRec;
EltDataRec:
TYPE =
RECORD [
name: ROPE,
parent: RecordViewer,
prev, next: EltData ← NIL,
update: UpdateProc ← NIL,
destroyed: BOOLEAN ← FALSE,
opened: BOOLEAN ← FALSE,
variable: BOOLEAN ← TRUE,
sampleable: BOOLEAN ← TRUE, --can disable automatic sampling
container: Viewer, --the one in main body
ToRope: ToRopeProc ← NIL, --only non-NIL for Simple
AssignRope: AssignRopeProc ← NIL, --only non-NIL for Simple
var: TypedVariable, --unless a Proc
old: TypedVariable, --unless a Proc or NOT sampleable
typeDoc: ROPE ← NIL,
notifyRequests: NotifyList ← NIL,
details:
SELECT et: EltType
FROM
Proc => [
argret, rule, doitButton: Viewer,
argRV, retRV: RecordViewer,
hasDom, hasRet: BOOLEAN,
domainInst, retInst: TypedVariable,
proc: TypedVariable,
stateLabel: Labels.Label ← NIL,
gregState: GregState ← Other,
running, argsShown: BOOLEAN ← FALSE,
runningProcess: PROCESS,
userAbort: CARDINAL ← 0],
Simple => [
nameButton: Viewer,
valueText: Viewer,
handler: SimpleHandler,
handlerData: REF ANY,
wideAsTV: TypedVariable,
targType: Type,
askW: INTEGER],
Complex => [
handlerData, clientData: REF ANY,
handler: ComplexHandler],
ENDCASE
];
EltType: TYPE = {Proc, Simple, Complex};
GregState: TYPE = {Dispatched, DispatchedAndEdited, Returned, Aborted, Other};
ToRopeProc: TYPE = PROC [ed: EltData] RETURNS [asRope: ROPE];
AssignRopeProc:
TYPE =
PROC [ed: EltData, asRope:
ROPE]
RETURNS [success: BOOLEAN];
ProcData: TYPE = REF EltDataRec[Proc];
SimpleData: TYPE = REF EltDataRec[Simple];
ComplexData: TYPE = REF EltDataRec[Complex];
UpdateProc: TYPE = PROC [ed: EltData, always: BOOLEAN];
BindingList: TYPE = ViewRec.BindingList;
Binding: TYPE = ViewRec.Binding;
NotifyList: TYPE = ViewRec.NotifyList;
nowhere: INTEGER = 1000;
roots: DataList;
befores: ARRAY Reductions OF RList;
afterAlls: RList;
classRecers: ARRAY AMTypes.Class OF RList;
ecHandlerProp, gtHandlerProp: ATOM;
CallPD: PROC [data: REF ANY];
ImmProcButtonClass, PrepProcButtonClass, HoldProcButtonClass, InnerProcButtonClass, NVButtonClass: PUB.Class;
ProcUpdate, UpdateNV, UpdateComplex: UpdateProc;
SimpleToRope: ToRopeProc;
SimpleAssignRope: AssignRopeProc;
DestroyEltViewer: ViewerClasses.DestroyProc;
OKProc: PROC [pt: Type, argSpecs, retSpecs: BindingList, createOptions: CreateOptions] RETURNS [ok, hasDom, hasRange: BOOLEAN];
Recognize: PROC [t: Type, specials: RList, onlyRecognize: BOOLEAN, specs: BindingList, createOptions: CreateOptions] RETURNS [recognized: BOOLEAN, handler, handlerData: REF ANY];
MemberStuff: PROC [tt, et: Type] RETURNS [biggest, listr: ROPE];
SelectBindings:
PROC [bl: BindingList, name:
ROPE, pos:
INT]
RETURNS [sublist, altSublist: BindingList, val: TypedVariable, found, visible, editable, dontAssign: BOOLEAN, notifies: NotifyList, recers: RList];
BindingListAppend:
PROC [a, b: BindingList]
RETURNS [c: BindingList];
ShowState: PROC [ed: EltData, paint: BOOLEAN ← TRUE];
SetRope: PROC [sd: SimpleData, to: ROPE, paint: BOOLEAN ← TRUE];
SampleData: PROC [d: RecordViewer];
END.