FILE: [Indigo]<Cedar>Top>ViewRec.DF=>ViewRecInsides.Mesa
last edited by Spreitzer December 12, 1983 4:59 pm
Last Edited by: Maxwell, November 16, 1982 3:29 pm
DIRECTORY
AMBridge, AMTypes, Buttons, Menus, Labels, Rope, ViewerClasses, ViewRec;
ViewRecInsides: CEDAR DEFINITIONS =
BEGIN
NotAnAggregate: ERROR;
ROPE: TYPE = Rope.ROPE;
TypedVariable: TYPE = AMTypes.TypedVariable;
Type: TYPE = AMTypes.Type;
Viewer: TYPE = ViewerClasses.Viewer;
Int: TYPE = ViewRec.Int;
RecordViewer: TYPE = ViewRec.RecordViewer;
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;
ButtonClick: TYPE = ViewRec.ButtonClick;
Id: TYPE = ViewRec.Id;
RList: TYPE = LIST OF Recognizer;
DataList: TYPE = LIST OF Data;
Data: TYPE = REF DataRec;
DataRec: TYPE = RECORD [
v: Viewer ← NIL,
wdir: ROPENIL,
asRV: RecordViewer ← NIL,
rvParent: Data ← NIL,
edParent: EltData ← NIL,
eltsContainer, argContainer, feedBack, label, rule1, rule2: Viewer ← NIL,
otherStuff: LIST OF Viewer ← NIL,
loneLabel: BOOLEANFALSE,
toButt: ButtonClick ← [],
argPlace: INTEGER ← 0,
curProc: ProcData ← NIL,
runCount: INTEGER ← 0,
runningProcs: LIST OF ProcData ← NIL,
first, last: EltData ← NIL,
exclusiveProcs: BOOLEANFALSE,
holdOff, highlightSelectedProc: BOOLEANFALSE,
relayoutable, mayInitiateRelayout: BOOLEANFALSE,
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: Data,
prev, next: EltData ← NIL,
update: UpdateProc ← NIL,
destroyed: BOOLEANFALSE,
opened: BOOLEANFALSE,
variable: BOOLEANTRUE,
sampleable: BOOLEANTRUE, --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: ROPENIL,
notifyRequests: NotifyList ← NIL,
details: SELECT et: EltType FROM
Proc => [
argret, rule, doitButton: Viewer,
argRV, retRV: Data,
hasDom, hasRet: BOOLEAN,
domainInst, retInst: TypedVariable,
proc: TypedVariable,
stateLabel: Labels.Label ← NIL,
gregState: GregState ← Other,
running, argsShown: BOOLEANFALSE,
runningProcess: PROCESS,
userAbort: CARDINAL ← 0],
Simple => [
nameButton: Buttons.Button,
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;
NameStyles: TYPE = RECORD [quiescent, opened, invariant,
running, beingShown: ATOM];
nowhere: INTEGER = 1000;
nameStyles: NameStyles;
roots: DataList;
befores: ARRAY Reductions OF RList;
afterAlls: RList;
classRecers: ARRAY AMTypes.Class OF RList;
ecHandlerProp, gtHandlerProp: ATOM;
ProcButtonProc, InnerProcButtonProc, NVButtonProc: Menus.ClickProc;
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: BOOLEANTRUE];
SetRope: PROC [sd: SimpleData, to: ROPE, paint: BOOLEANTRUE];
RVToData: PROC [RecordViewer] RETURNS [Data];
SampleData: PROC [d: Data];
END.