PipalEditor.mesa 
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Louis Monier January 29, 1988 5:39:33 pm PST
Bertrand Serlet February 15, 1988 10:15:52 pm PST
DIRECTORY Menus, Pipal, PipalReal, ViewerClasses;
PipalEditor: CEDAR DEFINITIONS = BEGIN
Theory
Combines input events with mutants and keeps the screen refreshed.
Readonly Viewers Creation
CreateViewer: PROC [object: Pipal.Object] RETURNS [viewer: ViewerClasses.Viewer];
BiScroller Creation
Right now, there is no request queue, but that's the obvious extension!
OutputRequestType: TYPE = {clearAndRepaintArea, repaintAll, paintOutline, changeCursor, grabInputFocus, translate, scale};
OutputRequest: TYPE = RECORD [
type: OutputRequestType,
data: REFNIL
type = clearAndRepaintArea => area to be repainted;
type = paintOutline  => object to be repainted;
type IN {translate, scale} => new transformation to be repainted;
type = changeCursor  => REF CursorType;
];
A view record contains all the information specific to a view (i.e. a viewer). Ultimately, there should be one per split viewer.
View: TYPE = REF ViewRec;
ViewRec: TYPE = RECORD [
transformation: PipalReal.Transformation,
cursor: ViewerClasses.CursorType ← textPointer,
state: REFNIL
];
NotifyProc: TYPE = PROC [mutant: Pipal.Object, view: View, input: LIST OF REF ANY] RETURNS [requests: LIST OF OutputRequest ← NIL, new: Pipal.Object];
CreateBiscroller: PROC [mutant: Pipal.Object, tipTable: Pipal.ROPE, notify: NotifyProc, state: REFNIL, buttons: BOOLFALSE] RETURNS [view: View];
END.