There is an effort under way at the University of Lowell in Massachusetts to develop C++ wrappers for the Open Software Foundation’s Motif graphical user interface. However, re-modelling the X Window XT intrinsics toolkit – on which Motif and other X Window-based interface styles are built – for C++, still will not enable developers to […]
There is an effort under way at the University of Lowell in Massachusetts to develop C++ wrappers for the Open Software Foundation’s Motif graphical user interface. However, re-modelling the X Window XT intrinsics toolkit – on which Motif and other X Window-based interface styles are built – for C++, still will not enable developers to take advantage of native object-oriented languages, says Dave Sternlicht of the X Consortium, because of X’s limitations. Sternlicht and others hope that a new paradigm, now under development will bring object functionality to X. It may do the same for other windowing schemas too. Mark Linton, formerly a professor at Stanford University, and now principal researcher at Silicon Graphics Inc, has come up with a completely new toolkit that can be applied to X Window. It’s been developed in C++ and is known as Interviews, though it will probably come to the market as Fresco. Sternlicht hopes it could be included in X Window as soon as the end of the year, bundled with X11 Release 6.0, which is due around that time.
Tens of thousands of run-time objects
However, Fresco must first get past the X Consortium board – a high hurdle, according to Sternlicht. The difference between Fresco and other toolkits like X Window’s XT intrinsics is that being object-oriented, it uses a small amount of memory, says Sternlicht. Fresco enables developers to create applications that use tens of thousands of run-time objects: you’d have big problems if you wanted to do that with conventional X Window widgets or XT intrinsics, he says. Fresco incorporates a general management facility called Doc, which is structured like a word processor and includes a range of editing features. Every character written in a program formulated in Doc has an associated run-time C++ object. Doc files and objects interact dynamically. The base class in Fresco’s class hierarchy is a gliff. Gliffs have notions of geometry, and can allocate and request space. There are other sub-classes for graphical user interface components such as push buttons and scroll bars. XT intrinsics makes no distinction between physical information and logical information – sentences and pages are physical occurrences, paragraphs are logical – while Fresco enables the designer to use resources that are independent of the application. In Fresco, components are linked in a separate hierarchy – a style hierarchy – a logical tree-type model which is derived from the physical layout of the program. Fresco also has a model view controller – an idea borrowed from the object-oriented Smalltalk language which doesn’t occur in XT intrinsics but is found in other technologies such as the Andrew toolkit. It operates on notions of an observer (views) and the observable (data). With XT intrinsics – indeed all of the X environment – each widget is effectively a separate window. Fresco has a single window. Gliffs – known as gadgets at this level – occupy areas of the window, which makes a big difference, according to Sternlicht. Importantly, the Fresco toolkit can pull down different user interface components at run time and is able to take on Open Look, Motif or other look-and-feel styles. Fresco has borrowed concepts from Adobe Systems Inc PostScript and the Canute text layout system, and includes PostScript-like structured graphics. A Fresco canvas on to which gliffs can be painted will enable developers to create things like two-dimensional geometric figures: like X it has some difficulty with three dimensions at the moment. Fresco is really aimed at the next generation of object applications, which will actually use large numbers of objects. Although it is fairly complicated now, it will be simplified over time and will offer a migration route up from things such as XT Intrinsics. It is likely that by the time of its release in X11.6 – if that eventually happens – Fresco components could be incorporated into XT toolkits – it should be possible to have a gliff in an XT widget, for example. Linton has developed Fresco with portability in mind and has already t
ested a version that runs under Microsoft Corp Windows NT, which is apparently his main target for technology. – William Fellows