<> <> <> <<>> DIRECTORY InternalExpr USING [EXPR], Imager USING [Context, Color]; MathDisplay: CEDAR DEFINITIONS ~ BEGIN <<>> <> EXPR: TYPE ~ InternalExpr.EXPR; <<>> <> <<>> BOXTREE: TYPE ~ REF BoxTreeRep; BoxTreeRep: TYPE ; -- use implementation type Selection: TYPE ~ RECORD[expr: EXPR, color: Imager.Color]; <<>> <> Format: PUBLIC PROC[expr: EXPR] RETURNS [BOXTREE]; <> Paint: PUBLIC PROC [box: BOXTREE, context: Imager.Context, selections: LIST OF Selection]; <> <> <<>> Selectable: PROC[expr: EXPR] RETURNS[BOOL]; <> <<>> SelectableParent: PROC[expr: EXPR] RETURNS[EXPR]; <> << SIGNALS noSelection if no selectable parent exists.>> <<>> SelectableChild: PROC[expr: EXPR] RETURNS[EXPR]; <> << SIGNALS noSelection if no selectable child exists.>> SelectableSibling: PROC[expr: EXPR] RETURNS[EXPR]; <> << SIGNALS noSelection if no selectable sibling exists.>> <<>> Replace: PROC[expr, old, new: EXPR] RETURNS[EXPR]; <> <> << Note that new is used (not a copy).>> <> <<>> unable: ERROR[reason: ATOM]; noSelection: ERROR; END.