DIRECTORY CD; CDLayers: CEDAR DEFINITIONS = BEGIN Layer: TYPE = CD.Layer; Number: TYPE = CD.Number; Design: TYPE = CD.Design; CurrentLayer: PROC [design: Design] RETURNS [Layer]; LayerWidth: PROC [design: Design, layer: Layer] RETURNS [Number]; PlaceholderToAbstract: PROC [design: Design, layer: Layer] RETURNS [Layer]; AbstractToPaint: PROC [layer: Layer] RETURNS [Layer] = INLINE { RETURN [layerPaint[layer]]}; LayerKind: TYPE = {paint, abstract, placeholder}; layerKind: READONLY REF READONLY ARRAY Layer OF LayerKind; layerPaint: READONLY REF READONLY ARRAY Layer OF Layer; SetCurrentLayer: PROC [design: REF, layer: Layer]; SetLayerWidth: PROC [design: Design, layer: Layer, width: Number]; SetPlaceholderToAbstract: PROC [design: Design, placeholder, abstract: Layer]; RegisterNotifiers: PRIVATE PROC [layer: DesignNotifyProc_NIL, width: LayerNotifyProc_NIL, placeholder: LayerNotifyProc_NIL]; DesignNotifyProc: TYPE = PROC [design: Design]; LayerNotifyProc: TYPE = PROC [design: Design, layer: Layer]; MakeAbstract: PRIVATE PROC [abstract: Layer, represents: Layer_CD.highLightError]; MakePlaceholder: PRIVATE PROC [layer: Layer, defaultsTo: Layer_CD.highLightError]; END. zCDLayers.mesa (part of ChipNDale) Copyright c 1983, 1985 by Xerox Corporation. All rights reserved. by Christian Jacobi, August 11, 1983 11:32 am last edited by Christian Jacobi, September 19, 1985 3:12:15 am PDT This module serves to decouple low level querries for current layer and width from control panel modules, which resides on higher levels. But we do assume here that some control panel module will actually initialize the witdhs. --everybodys procedures --returns current layer for this design --returns current width for layer "layer" in this design --returns corresponding abstract or paint layer given an placeholder layer for this design --returns corresponding paint layer given an abstract layer --identity for paint layers --CD.highLightError for placeholder layers There are three different usages of layers placeholder: Not to be put into data structures, only help for interacton. Meaning may change over time and design as result of user interaction. abstract: Objects might have this layer, e.g. rectangles. Might represent a paint layer. Meaning is defined by technology. paint: Has a color... --procedures for control panel implementors --use technology for initializing defaults --NIL design for initializing defaults --NIL design for initializing defaults --These Notify Proc's are not monitored and might overpass each other. --For correct behavior on multiple processes, the values have to be querried inside. --Changes on other than per design basis may or may not be notifyed. --procedures for technology implementors --makes this layer an abstract layer --makes this layer an placeholder layer ΚΫ˜codešœ(™(Kšœ Οmœ7™BKšœ.™.KšœB™B—K˜šΟk ˜ Kšžœ˜—K˜KšΠblœžœž œ˜Kšž˜K˜KšœR™RKšœM™M™CK˜Kšœžœžœ˜Kšœžœžœ˜Kšœžœžœ˜K˜—K™K™K™šΟn œžœžœ ˜4Jšœ'™'K˜—š  œžœ žœ ˜AJšœ8™8K˜—š œžœ žœ ˜KJšœZ™ZK˜—š œžœžœ žœ˜?Jšœ;™;Jšœ™šœžœ&™*Jšžœ˜——K˜Kšœ žœ"˜1Kš œ žœžœžœžœžœ ˜;š œ žœžœžœžœžœ˜8šœ*™*šœ ™ Kšœ>™>KšœH™H—šœ ™ KšœQ™QKšœ!™!—šœ™Kšœ™——K˜—K™Kšœ+™+K˜š œžœ žœ˜2Kšœ*™*—š  œžœ/˜BKšœ&™&—š œžœ0˜NKšœ&™&—K˜š  œž œžœžœžœ˜|K˜Kšœžœžœ˜/Kšœžœžœ ˜