The Amulet User Interface Development Environment
(video abstract)

Brad A. Myers,
Richard G. McDaniel, Robert C. Miller, Alan Ferrency, Ellen Borison, Andrew Faulring, Andy Mickish, Patrick Doane, and Alex Klimovitski

Human Computer Interaction Institute
School of Computer Science
Carnegie Mellon University
Pittsburgh, PA 15213-3891
(412) 268-5150
amulet@cs.cmu.edu
http://www.cs.cmu.edu/~amulet

Keywords: Toolkit, User Interface Development Environment, User Interface Management System, Application Framework.


Paper to appear in:
Adjunct Proceedings CHI'97: Human Factors in Computing Systems

Introduction

The Amulet research project is developing a new user interface development environment [2] which incorporates a number of design and implementation innovations including new models for objects, constraints, animation, output, input, commands, and undo. Amulet has an open architecture, so that user interface researchers can replace and extend components. Amulet, which stands for Automatic Manufacture of Usable and Learnable Editors and Toolkits, is implemented in C++, and runs on X/11, Windows NT, Windows 95, and the Macintosh.

An important research objective of the Amulet project is to provide high-level support for creating the insides of application programs, a task which is left to the programmer by conventional toolkits. Amulet provides automatic refresh, interactive behaviors, selection handles, and many built-in editing commands that operate on application-specific graphics.

In addition to incorporating research innovations into Amulet itself, we want to make Amulet useful for others. This will help demonstrate that the innovations in Amulet are sound and useful, and will hopefully facilitate technology transfer. In order of priority, we want to make Amulet useful to user interface researchers, students, and general developers. Over 30 research projects, 8 classes, and 7 commercial products, from all over the world, are already using Amulet. We therefore must provide a high level of robustness, documentation and performance.



Figure 1. An example circuit design program supporting full editing operations, gestures, animation, and load and save that takes only 850 lines of code in Amulet.


GEM: Interface To Window Managers

Amulet is divided into a number of layers. The Gem layer provides a portable interface to the various window managers. Code written using Gem will port to different windowing systems without change. The typical Amulet user will never use the Gem interface, however, because the higher-level layers of Amulet provide an easier way to access to the same functionality.

ORE: Object And Constraint System

Amulet implements a prototype-instance object system on top of C++. The advantage of the prototype-instance object system is that it is very dynamic and flexible. In a prototype-instance object system, there is no distinction between classes and instances: every object can be used as a prototype for other objects. An object can have an arbitrary number of attributes, called "slots," and objects can dynamically add and remove slots at any time. Slots of the prototype are dynamically inherited by instances, so that changes to the prototype's slots will be seen by all instances which do not override the slots. Slots containing methods are treated exactly the same as slots containing data, so an instance can have unique methods, if desired.

Amulet integrates constraint solving with the object system, so instead of being restricted to "normal" values like numbers or strings, any slot can contain an expression that computes its value. When slots change that are referenced by the constraint, the expression is automatically re-evaluated. Constraint expressions can contain arbitrary C++ code, and can be used for any type of value, including positions, colors, fonts, visibility, etc.

An important research area in user interface software is creating new kinds of constraint solvers. Therefore, Amulet's architecture allows multiple solvers to coexist. Currently, Amulet supports a one-way solver that is similar to spreadsheet formulas, a multi-output, multi-way solver, and an animation constraint solver.

The novel animation constraint solver [4] makes it very easy to add animations to an interface, often with just a few lines of code. When an animation constraint is attached to a slot, it detects changes to the value of the slot, immediately removes the new value, resets the old value, and causes the slot to take on a series of values interpolated between the original and new values.

OPAL: Output Model

Opal, the graphical object layer of Amulet, provides a structured graphics model that automatically handles refresh. Instances of the built-in graphical object prototypes, like rectangles, lines, strings, circles, polygons, etc., can be added to a window, and Amulet will automatically redraw the appropriate parts of the window when the objects' properties change. Opal also automatically handles object layout for data that can be displayed as lists or tables.

Interactors: Input Model

Programming interactive behaviors has traditionally been the hardest part of user interface software, especially since most toolkits and window managers only provide a stream of raw input events for each window which the programmer must interpret and manage. Garnet introduced the "Interactor" model for handling input [1] which is refined in Amulet. Each Interactor object type implements a particular kind of interactive behavior, such as moving an object with the mouse, or selecting one of a set of objects. Currently, Amulet contains only five types (select, move/grow, new points, text edit, and gesture), which are sufficiently parameterized so that they cover the most common behaviors found in direct manipulation interfaces. Unlike widgets, an Interactor does not include graphics. To make a graphical object respond to input, the programmer simply attaches an instance of the appropriate type of Interactor to the graphics. Interactors can work across multiple windows, and support drag-and-drop. The gesture interactor supports freehand gestures, such as drawing an A-shape to get an AND gate. The gesture recognizers can be created by example using the Agate tool provided with Amulet.

Command Objects

Rather than using a "call-back procedure" as found in other toolkits, Amulet allocates a command object and calls its "Do" method [3]. Amulet's commands also handle undo, enabling and graying out the command, and help. Command objects for move, create, change-property, become-selected, cut, copy, paste, duplicate, quit, to-front, to-back, group, ungroup, undo, redo, and drag-and-drop, are supplied in a library and can often be used by applications without change. Amulet's commands also support various undo mechanisms. Currently, Amulet supplies three different undo mechanisms: single undo like the Macintosh, multiple undo, and a novel form of undo and repeat, where any previous command, including scrolling and selections, can be selectively undone, repeated, or repeated on a new selection [3].

Widgets

Amulet contains a full set of widgets implemented entirely using the lower levels of Amulet. These widgets can take on the look-and-feel of Motif, Windows 95, or the Macintosh. In addition, Amulet supplies widgets, such as graphical selection handles, for the insides of application windows, which are not provided by other toolkits.

Conclusion

Amulet is in the public domain, and is available free of charge by anonymous FTP (from ftp.cs.cmu.edu, get /usr0/anon/project/amulet/amulet2/README) or using the world-wide-web (http://www.cs.cmu.edu/~amulet). Many projects all over the world are using Amulet for a wide variety of applications. In the future, we will be concentrating on providing a set of interactive tools so that most parts of an interface can be created by direct manipulation, as well as adding support for technologies like speech and 3D. The goal is to provide significant productivity gains in user interface development while still providing innovative capabilities to end users.

References

1. Myers, B.A., "A New Model for Handling Input." ACM Transactions on Information Systems, 1990. 8(3): pp. 289-320.

2. Myers, B.A., et al., The Amulet V2.0 Reference Manual . Carnegie Mellon University Computer Science Department Report, Number, Feb, 1996. System available from http://www.cs.cmu.edu/~amulet.

3. Myers, B.A. and Kosbie, D. "Reusable Hierarchical Command Objects," in Proceedings CHI'96: Human Factors in Computing Systems. 1996. Vancouver, BC, Canada. pp. 260-267.

4. Myers, B.A., et al. "Easily Adding Animations to Interfaces Using Constraints," in Proceedings UIST'96: ACM SIGGRAPH Symposium on User Interface Software and Technology. 1996. Seattle, WA. pp. 119-128.