<<>> <> <> <> DIRECTORY Prop USING [PropList], Rope USING [ROPE], Rosary USING [ROSARY], Char USING [CharSet, XCHAR]; Tioga: CEDAR DEFINITIONS ~ BEGIN <<>> ROPE: TYPE ~ Rope.ROPE; ROSARY: TYPE ~ Rosary.ROSARY; XCHAR: TYPE ~ Char.XCHAR; CharSet: TYPE ~ Char.CharSet; PropList: TYPE ~ Prop.PropList; <<>> Node: TYPE ~ REF NodeRep; NodeRep: TYPE ~ PACKED RECORD [ parent: Node ¬ NIL, -- points to parent, if any next: Node ¬ NIL, -- points to next sibling, if any child: Node ¬ NIL, -- points to first child, if any rope: ROPE ¬ NIL, runs: ROSARY--OF CharLooksItem-- ¬ NIL, charSets: ROSARY--OF CharSetsItem-- ¬ NIL, charProps: ROSARY--OF CharPropsItem-- ¬ NIL, nodeProps: PropList, -- node properties (except $Format and $Comment) format: ATOM ¬ NIL, -- value of $Format property comment: BOOL ¬ FALSE, -- value of $Comment property hasStyleDef: BOOL ¬ FALSE, -- true if node has $StyleDef prop (accelerator) hasPrefix: BOOL ¬ FALSE, -- true if node has $Prefix prop (accelerator) hasPostfix: BOOL ¬ FALSE, -- true if node has $Postfix prop (accelerator) hasArtwork: BOOL ¬ FALSE, -- true if node has $Artwork prop (accelerator) hasActive: BOOL ¬ FALSE, -- true if node has $Active prop (accelerator) deleted: BOOL ¬ FALSE, -- true if has been deleted or is root pending delete dirty: BOOL ¬ FALSE, -- true if has been edited (contents, or children moved, inserted, ...) new: BOOL ¬ FALSE -- true if created during this editing session (i.e., not from file) ]; <> <> <> <> <> <> <> <> <> <> <> <<>> <<>> Look: TYPE ~ CHAR['a..'a+31]; -- 32 bits; indexed from "a" Bit: TYPE ~ BOOL ¬ FALSE; Looks: TYPE ~ PACKED ARRAY Look OF Bit; noLooks: Looks ~ ALL[FALSE]; allLooks: Looks ~ ALL[TRUE]; Runs: TYPE ~ ROSARY; <<>> <<>> CharSetsItem: TYPE ~ REF CharSet; CharLooksItem: TYPE ~ REF Looks; CharPropsItem: TYPE ~ PropList; <<>> <<>> Location: TYPE ~ RECORD [node: Node, where: INT]; <= length of text means at end>> <> <> NodeItself: INT ~ -1; <<>> nullLocation: Location ~ [node: NIL, where: NodeItself]; <<>> Span: TYPE ~ RECORD [start, end: Location ¬ nullLocation]; <> <> <> <> <> <> <<>> nullSpan: Span ~ [nullLocation, nullLocation]; <<>> CapChange: TYPE ~ {allCaps, allLower, initCaps, firstCap}; Place: TYPE ~ {before, after, sibling, child}; Order: TYPE ~ {before, same, after, disjoint}; <<>> <<>> Event: TYPE ~ REF EventRep; EventRep: TYPE; <<>> <<>> END.