DIRECTORY Rope USING [ROPE], Tioga USING [Node]; NodeProps: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE = Rope.ROPE; PutProp: PROC [n: Tioga.Node, name: ATOM, value: REF]; GetProp: PROC [n: Tioga.Node, name: ATOM] RETURNS [REF]; RemProp: PROC [n: Tioga.Node, name: ATOM] ~ INLINE { PutProp[n, name, NIL] }; MapPropsAction: TYPE = PROC [name: ATOM, value: REF] RETURNS [quit: BOOL ¬ FALSE]; MapProps: PROC [n: Tioga.Node, action: MapPropsAction, formatFlag, commentFlag: BOOL ¬ TRUE] RETURNS [quit: BOOL]; nameFormat: ATOM; -- $Format nameComment: ATOM; -- $Comment nameCharSets: ATOM; -- $CharSets nameCharProps: ATOM; -- $CharProps nameStyleDef: ATOM; -- $StyleDef namePrefix: ATOM; -- $Prefix namePostfix: ATOM; -- $Postfix nameArtwork: ATOM; -- $Artwork nameActive: ATOM; -- $Active AtomFromValue: PROC [REF] RETURNS [ATOM]; ValueFromAtom: PROC [ATOM] RETURNS [REF]; BoolFromValue: PROC [REF] RETURNS [BOOL]; ValueFromBool: PROC [BOOL] RETURNS [REF]; 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. h NodeProps.mesa Copyright Σ 1985, 1986, 1991 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, October 16, 1991 10:53 am PDT Get, Put, Map properties on a node 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 associatiated 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. Κ4–(cedarcode) style•NewlineDelimiter ™codešœ™Kšœ Οeœ=™HKšœ ™ Kšœ2™2K™*J™*K™)—K˜šΟk ˜ Kšœžœžœ˜Kšœžœ˜—K˜šΟn œžœž œž˜$K˜Kšžœžœžœ˜—head™"šŸœžœžœ žœ˜6K˜—š Ÿœžœžœžœžœ˜8K˜—šŸœžœžœ˜)Kšœžœžœ˜#K˜—šœžœžœžœ žœžœžœžœ˜RK˜—š ŸœžœCžœžœžœžœ˜sKšœ7™7Kšœ+™+šœE™EKšœ1™1—K˜—Kšœ žœΟc ˜Kšœ žœ  ˜Kšœžœ  ˜ Kšœžœ  ˜"Kšœžœ  ˜ Kšœ žœ  ˜Kšœ žœ  ˜Kšœ žœ  ˜šœ žœ  ˜K˜—Kš Ÿ œžœžœžœžœ˜)Kš Ÿ œžœžœžœžœ˜)Kš Ÿ œžœžœžœžœ˜)Kš Ÿ œžœžœžœžœ˜)K˜—šœ™Kš œžœžœžœ žœžœ žœ˜JK˜Kš œžœžœžœ žœžœ žœ˜KK˜Kš œžœžœžœ žœžœžœ˜FK˜šŸœžœžœG˜aKšœ,™,Kšœ7™7K˜—KšŸœ ˜.K˜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šžœ˜—…—β~