Tycho uses its own library of mega-widgets. Tycho's widget library includes list and file browsers, font and color selection, alert boxes, an HTML displayer message window (for help messages), and so on. With most of these classes, we aim not to provide a complete ``use-as-is'' widget, but a foundation for customizing by inheritance and composition. For example, one of the key classes in the dialog box hierarchy is called Query: it contains a button box and an uncommitted frame for labeled entry widgets. A suite of methods add entry fields, check-buttons, option menus, and so on, to this frame. Many of the dialog classes - including the search dialog shown in figure 1 - inherit from this class and configure these fields in the constructor. This kind of extensibility is one of the great strengths of the object-oriented approach.
Throughout Tycho's development, we have faced the decision on whether to use existing widgets or to develop our own. The most suitable library [incr widgets], or Iwidgets , a library of widgets written in [incr Tcl] that includes labeled widgets, scrolled canvas and text widgets, dialog boxes, a tabbed notebook, button and radio boxes, and so on. Other libraries, such as Tix and BLT, clashed with our ``no-binaries'' policy.
Tycho does not currently use any of the Iwidgets classes. We are not at all opposed to Iwidgets, and believe them to be a very useful set of widgets. In particular, we have used many ideas from Iwidgets and freely acknowledge our debt to the Iwidgets authors. In the future, widgets like the tabbed notebook may well be used within Tycho where we feel it is appropriate. When we began work on Tycho, however, Iwidgets was also early in development, and we found we had problems with many of them that were most easily fixed by writing our own. For example, moving the focus ring in the Iwidgets button box made the whole window adjust itself - visually, a very disconcerting effect. The Tycho button box widget does not do this.
Part of the reason that the Tycho widgets avoid some of the problems the Iwidgets authors faced is that they are somewhat more dedicated to our needs within the Tycho environment. We have not tried to deal with all possible uses, nor to provide all possible widgets. Instead, we have been able to choose what we felt was an adequate design where it was needed. Tycho widgets generally have far fewer configuration options than Iwidgets and more specific functionality. Iwidgets, for example, provides a scrolled canvas - the equivalent functionality in Tycho is a complete view with support for menus, printing, graphical selection, and so on.
There are secondary considerations that have worked against adopting Iwidgets. Tycho widgets benefit from our automatic documentation system, which includes executable Tcl examples embedded in HTML windows. Tycho widgets also appear on the Tycho class diagram, and are thus more visible to a Tycho developer.