PipalEdit.mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Louis Monier January 29, 1988 5:39:33 pm PST
Bertrand Serlet February 24, 1988 5:11:06 pm PST
DIRECTORY Cursors, Menus, Pipal, PipalPaint, PipalReal, ViewerClasses;
PipalEdit: 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
NotifyProc:
TYPE =
PROC [editor: Pipal.Object, queue: PipalPaint.Queue, viewer: ViewerClasses.Viewer, input:
LIST
OF
REF
ANY]
RETURNS [newEditor: Pipal.Object];
The viewer is provided only in order to do things like grabbing the input focus.
Painting should not be done using viewer, but enqueued using queue.
CreateBiscroller:
PROC [editor: Pipal.Object, tipTable: Pipal.
ROPE, notify: NotifyProc, buttons:
BOOL ←
FALSE];
EnqueueSetCursor: PROC [queue: PipalPaint.Queue, cursor: Cursors.CursorType];
Editor Making
The mutation method defines how to make an editor on a given mutant.
Editors are objects containing a mutant, and which answers at least
editMethod: Pipal.Method;
EditProc:
TYPE =
PROC [mutant: Pipal.Object]
RETURNS [editor: Pipal.Object ←
NIL];
HasEditProc:
PROC [object: Pipal.Object]
RETURNS [
BOOL];
Edit: EditProc;
Invokes EditProc. No editMethod method => crash and burn.
END.