14 An Object-Oriented Architecture for Constraint-Based Graphical Editing Richard Helm, Tien Huynh, Kim Marriott, and John Vlissides Direct-manipulation graphics editors are useful tools for a wide variety of domains such as technical drawing, computer-aided design, application building, and music composition. Con- straints can be a powerful mechanism for specifying complex semantics declaratively in these domains. To date, few domain-specific graphics editors have provided constraint-based speci- fication and manipulation facilities. Part of the reason is that graphical editors are hard enough to develop without implementing a constraint system as well. Even though graphical editing frameworks can reduce the difficulty of constructing domain specific graphical editors, a fun- damental problem remains: there do not exist general constraint solving architecturBs that are efficient enough to support highly interactive editing, yet suitably flexible and extensible to adapt to different editing domains. Addressing this problem, we present an object-oriented architecture that integrates the graph- ical editing framework Unidraw with QOCA, a powerful new constraint solving toolkit. QOCA leverages recent advances in symbolic computation and geometry to support efficient incre- mental solving of simultaneous equations and inequations, while optimizing convex quadratic objective functions. QOCA also supports new kinds of constraint manipulation that have novel applications to graphical editing. QOCA exploits the implementation language to provide a convenient, object-oriented syntax for expressing constraints in the framework. The result is a generic and easily extended architecture for constraint-based, direct-manipulation graphical editing. 1 Introduction Constraints are a powerful formalism in graphical user interfaces, both as an aid in interface development and as an interaction paradigm. Constraints can specify spatial and semantic relationships declaratively between objects in a user interface, while an underlying constraint solver will ensure that interface meets the speci- fication. Previous work [Borning, 1981, Borning and Duisberg, 1986, Epstein and Lalonde, 1988 Maloney et at, 1989, Nelson, 1985, Jr. and Allan, 1990, Sutherland, 1963, Szekely and Myers, 1988] has established that constraint systems need at least the following capabilities to be effective in graphical user interfaces: C. Laffra et al. (eds.), Object-Oriented Programming for Graphics © EUROGRAPHICS The European Association for Computer Graphics 1995