GGRefreshExtras.mesa
Copyright © 1991 by Xerox Corporation. All rights reserved.
Bier, September 23, 1991 11:00 pm PDT
Contents: Experimental routines to be added eventually to GGRefresh.mesa.
DIRECTORY
GGCoreTypes, GGInterfaceTypes, Imager;
GGRefreshExtras: CEDAR DEFINITIONS = BEGIN
PaintInParent: PROC [ggData: GGData, paintAction: ATOM];
Called by GGWindowImpl.RestoreScreenAndInvariants whenever scene update should be done. Computes a bounding box and then requests the parent to paint it.
RegisterPaintProc: PROC [ggData: GGData, paintProc: PaintProc, clientData: REFNIL];
Associate the given PaintProc and clientData with this GGData. This routine will be called by GGWindow.RestoreScreenAndInvariants
RepaintArea: PROC [screen: Imager.Context, ggData: GGData, whatHasChanged: ATOM, bounds: BoundBoxObj ← infiniteRect];
Like GGRefresh.ActionAreaPaint, but paints all of the area described by bounds, even if some of this area doesn't need to be painted. If bounds.infinite, repaint the whole action area. If bounds.null then repaint just what needs to be repainted.
infiniteRect: BoundBoxObj = [0,0,0,0,FALSE,TRUE];
nullRect: BoundBoxObj = [0,0,0,0,TRUE,FALSE];
BoundBoxObj: TYPE = GGCoreTypes.BoundBoxObj;
GGData: TYPE = GGInterfaceTypes.GGData;
PaintProc: TYPE = PROC [ggData: GGData, request: REFNIL, bounds: BoundBoxObj ← infiniteRect, clientData: REFNIL];
The PaintProc will have to call these routines in MMM:
ParentPaintRequestProc: TYPE = PROC [parent: Editor, child: Editor, request: REFNIL, bounds: BoundRect ← BoxTypes.infiniteRect];
ParentPaintNotifyProc: TYPE = PROC [parent: Editor, requestor: Editor];
For example:
paintRequest ← NEW[PaintRequestObj ← [$PaintScene, self, NIL, noAction, otherLocn]];
MMMProtocol.ParentPaintRequest[self.parent, self, paintRequest,
Boxes.Intersection[userStatePrivate.dragBounds, self.bounds]];
where MMMProtocol.ParentPaintRequest calls parent.class.paintNotify after putting the request in child.paintRequests.
The PaintProc will have to call this routine in Gargoyle:
ViewerOps.PaintViewer[ viewer: ggData.controls.actionArea, hint: client,
whatChanged: ggData, clearClient: FALSE];
END.