CDViewerBackdoor.mesa (a ChipNDale module)
Copyright © 1987 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, March 3, 1987 3:16:32 pm PST
Last edited by: Christian Jacobi, April 1, 1987 7:22:54 pm PST
DIRECTORY
AMTypes,
CD,
CDVPrivate,
ViewerClasses;
CDViewerBackdoor: CEDAR DEFINITIONS =
BEGIN
Non public ChipNDale interface to implement further behaviour for viewers.
Set and Get procs
Independent implementation of different op atoms for usage of ViewerOps.GetViewer or ViewerOps.SetViewer to be used on ChipNDale viewers.
Manual registration of op atoms is required to avoid collisions.
See ChipNDale's documentation for the appropriate file.
-- To be used by the implementation of any particular op feature.
InstallGetProc: PROC [op: ATOM, proc: ViewerClasses.GetProc];
InstallSetProc: PROC [op: ATOM, proc: ViewerClasses.SetProc];
-- To be used by the implementation of ChipNDale's viewer class only.
CallGetProc: PRIVATE ViewerClasses.GetProc;
CallSetProc: PRIVATE ViewerClasses.SetProc;
More drawing behaviours
Independent implementation of further behaviour of the viewer PaintProc.
Manual registration of keys is requested.
See ChipNDale's documentation for the appropriate file.
FurtherPaintProc: TYPE = PROC [me: CDVPrivate.VRef, key: REF];
InstallFurtherPaint: PROC [
keyReferentType: AMTypes.Type ← AMTypes.nullType,
--default means check value only
keyValue: REF NIL,
--default means check type only; you can not install a proc for NIL
proc: FurtherPaintProc
];
-- All errors and signals from proc will be catched.
-- Sometimes calls proc with; sometimes without locks, depending on key.
-- It is ok to call the viewers-PaintProc recursively, but please
-- do not cause wedges, there is no protection.
-- May or may not check if keyValue is of type REF keyReferentType, if both non NIL
-- Never use CODE[CDDraw.Comm] as keyReferentType; CDDraw.Comm is specially
-- handled, as on CallFurther its ref field is used as key.
CallFurtherPaint: PRIVATE PROC [me: CDVPrivate.VRef, key: REF];
-- Catches all errors and signals!
-- Called by the viewer paintproc of ChipNDale-design viewers only.
More TIP notifier behaviour
Independent implementation of further behaviour of the viewer NotifyProc.
Manual registration of keys is requested.
See ChipNDale's documentation for the appropriate file.
FurtherNotifyProc: TYPE = PROC [me: CDVPrivate.VRef, mode: REF];
InstallFurtherNotify: PROC [mode: REF, proc: FurtherNotifyProc];
--Registers a proc to be called from the tip table (Supposed the tip Notify proc
-- supports this package)
--Most proc's are used only to install the procedure to be used for subsequent cursoring
-- (they set the viewers (VPrivatePerDesign) fields usedCursor and outlineProcLC)
CallFurtherNotify: PRIVATE PROC [me: CDVPrivate.VRef, mode: REF←NIL];
--To be called by the viewers Notify proc only; its call should be caused by
-- a tip table entry; Except with NIL mode: called from anywhere.
--The registered (ImplementACursor) FurtherNotifyProc will be called;
--and typically installs the procedure to be used for subsequent cursoring.
-- Convention: The mode NIL is used to remove the current cursoring proc
END.