<<>> <> <> <> DIRECTORY MathExpr USING [EXPR, AtomEXPR, CompoundEXPR, AtomClass, CompoundClass, MatrixClass], MathBox USING [BOX], MathTypes USING [Style], MathRules USING [Size], Rope USING [ROPE], Imager USING [Context, Color]; MathBoxTrees: CEDAR DEFINITIONS ~ BEGIN <> ROPE: TYPE ~ Rope.ROPE; <> <> <> <> <> <> <> BoxTree: TYPE ~ Object; BoxTreeData: TYPE ~ REF BoxTreeDataRep; -- external abstract type BoxTreeDataRep: TYPE; -- internal concrete rep <> Object: PROC[o: BoxTree] RETURNS[Object]; <> <> <<>> Pack: PROC[o: BoxTree, e: Environment] RETURNS[BoxTree]; <> <> <> <<>> PackAncestor: PROC[o: BoxTree, e: Environment] RETURNS[BoxTree]; <> <<>> Unpack: MathEnvironments.UnpackOp; <> <<>> EltToExpr: PROC[o: BoxTree] RETURNS[Expr]; <> <> <> <> DisplayOp: TYPE = MathObjects.BinaryToPairOp; -- PROC [e: Object, context: Environment] RETURNS [result: BoxTree, newContext: Environment]; <> <> <> <> <> <<1. Enclosing Object (e.g. Document, or other mathematical object) "style", e.g. type size and face, other "generic" formatting constraints>> <<2. "Page", i.e. "column", width to respect, assuming no scaling down, i.e. adherence to current type size.>> <<3. A Box to confine the display to, assuming no scaling down.>> <<4. A range, or a minimum and maximum values, for possible scaling. Thus if the generated display is significantly smaller than a given Box, the display may be scaled up.>> <<5. How much unpacking to do.>> <<6. Special formatting "rules" to apply, e.g. if the Object (or some subObject of it) satisfies some predicate (e.g. "matches some pattern"), then format it in some special way.>> <> <> <> <> <> <> <> <> <"] ] can quickly do the right thing.>> <] ]. >> << >> <> TreeForPoint: PROC[b: BoxTree, x, y: REAL] RETURNS[BoxTree]; <> <> <<>> END.