DIRECTORY Rope USING [ROPE], TextNode USING [Node]; NodeProps: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE = Rope.ROPE; Node: TYPE = TextNode.Node; RefBool: PROC [BOOL] RETURNS [REF BOOL]; PutProp: PROC [n: Node, name: ATOM, value: REF]; GetProp: PROC [n: Node, name: ATOM] RETURNS [REF]; RemProp: PROC [n: Node, name: ATOM]; MapPropsAction: TYPE = PROC [name: ATOM, value: REF] RETURNS [quit: BOOL _ FALSE]; MapProps: PROC [n: Node, action: MapPropsAction, formatFlag, commentFlag: BOOL _ TRUE] RETURNS [quit: BOOL]; ReadSpecsProc: TYPE = PROC [name: ATOM, specs: ROPE] RETURNS [value: REF]; WriteSpecsProc: TYPE = PROC [name: ATOM, value: REF] RETURNS [specs: ROPE]; CopyInfoProc: TYPE = PROC [name: ATOM, value: REF] RETURNS [new: REF]; Register: PROC [name: ATOM, reader: ReadSpecsProc, writer: WriteSpecsProc, copier: CopyInfoProc]; NullRead: ReadSpecsProc; -- returns NIL always NullWrite: WriteSpecsProc; -- returns NIL always NullCopy: CopyInfoProc; -- returns NIL always DoSpecs: ReadSpecsProc; GetSpecs: WriteSpecsProc; CopyInfo: CopyInfoProc; DeclarePropertyAttribute: PROC [name: ATOM, attribute: ATOM]; Is: PROC [name: ATOM, attribute: ATOM] RETURNS [BOOL]; GetPropertyAttributes: PROC [name: ATOM] RETURNS [LIST OF ATOM]; SetPropertyAttributes: PROC [name: ATOM, attributes: LIST OF ATOM]; END. ώNodeProps.mesa Copyright Σ 1985, 1986 by Xerox Corporation. All rights reserved. written by Paxton. January 1981 last written by Paxton. December 28, 1982 11:11 am Rick Beach, March 27, 1985 10:45:41 am PST Michael Plass, May 9, 1986 10:29:27 am PDT Doug Wyatt, September 3, 1986 10:29:54 am PDT Put, Get, Map properties on a node Returns a shared REF to the given BOOL; convenient for boolean property values. NIL is a valid value. Use RemProp to remove property. (Although GetProp will not distinguish between property value NIL and no property present, it is useful to be able to have NIL values to avoid creating garbage. Setting to NIL doesn't release the property record, so don't need to reallocate when next set to a non-NIL value. apply the action to each name & value pair for the node returns true if&when an action returns true if commentFlag is false, skips Comment property; ditto for formatFlag hack to accelerate Inherit and PutFile operations Read, Write, Copy Props registers these procs for this property name they will be called by DoSpecs, GetSpecs, and CopyInfo used when reading files calls the registered reader for this property name returns specs if no reader is registered used when writing files calls the registered writer for this property name if no writer is registered, returns value if it is a rope, NIL otherwise used when copying nodes calls the registered copier for this property name if no copier is registered, returns old value Property Attributes This section deals with attributes of property names. Attributes are just tags associated with the property names that modify the way the properties are treated by Tioga. The most important attribute is $Visible, which says whether or not the value of the property can affect the appearance of the formatted document; if such a property's value is changed (at the TextEdit level or above), the node and all of its children will be repainted. The attributes are associated with the code that is currently loaded and registered, not with documents. Refer to NodePropsImpl for a list of meaningful attributes. Associates an attribute with a property name. Tests whether the named property and a given attribute. For completeness only; list is read-only. For completeness only; list is read-only. Κr˜codešœ™KšœB™BKšœ ™ Kšœ2™2K™*J™*K™-—K˜šΟk ˜ Kšœœœ˜Kšœ œ˜—K˜KšΠbl œœ ˜šœ˜K˜Kšœœœ˜Kšœœ˜—head™"š Οnœœœœœœ˜(Kšœœœ)™OK˜—K˜šŸœœœ œ˜0KšœΛ™ΛK˜—š Ÿœœœœœ˜2K˜—šŸœœœ˜$K˜—šœœœœ œœœœ˜RK˜—š Ÿœœ=œœœœ˜mKšœ7™7Kšœ+™+šœE™EKšœ1™1—K™——šœ™š œœœœ œœ œ˜JK˜—š œœœœ œœ œ˜KK˜—š œœœœ œœœ˜FK˜—šŸœœœG˜aKšœ,™,Kšœ7™7K˜—K˜šŸœΟc˜.K˜—šŸ œ ˜0K˜—šŸœ ˜-K˜—K˜šŸœ˜Kšœ™Kšœ2™2Kšœ(™(K˜—šŸœ˜Kšœ™Kšœ2™2KšœH™HK˜—šŸœ˜Kšœ™Kšœ2™2Kšœ-™-K˜——™K™βK™šŸœœœ œ˜=Kšœ-™-K˜—š Ÿœœœ œœœ˜6K™7K˜—šŸœœœœœœœ˜@K™)K™—š Ÿœœœœœœ˜CK™)K™——K˜Kšœ˜—…—0