Editing diagrams conveniently requires edit operations and automatic layout tailored to the type of diagram. This necessitates a syntax-directed editor for diagrams, called diagram editor. We describe the basics of a generator for interactive diagram editors that offers a number of significant advantages over previous approaches. The foundation is a new incremental algorithm for constraint evaluation. Constraints can be specified not only by equations, as in earlier work, but also by linear inequalities. This opens the door to integrating automatic diagram layout with user-defined modifications. Furthermore, the algorithm ensures that layout adjustments initiated by user action are confined to the smallest possible part of the diagram around the point of modification, thus realizing a principle of minimal change.
展开▼