AUUGN on the Web - Volume 16, Number 1:

Book Review: Motif Tools

by David Flanigan
O'Reilly & Associates
1994, 984 Pages + CD
ISBN 1-56592-055-9

Reviewed by
David J. Hughes
Bond University
< Bambi@Bond.edu.au >


The promotional material from O'Reilly & Assoc. for this book portrayed it as the single most valuable set of tools for Motif programmers and I'd say that they're not far from the truth! The material covered in Motif Tools has the potential to save vast amounts of time and effort during Motif based GUI design and development.

The book itself is a very detailed tutorial and reference manual for the motif tools library (libXmt) written by David Flanigan of Dovetail Systems. Xmt is a collection of 8 custom widgets, 260 convenience routines and a handful of resource converters that offer a new level of flexibility and productivity to the Motif coder. Using these tools it is a very simple task to whip up a prototype or even production GUI for an application before the ink has dried on the project spec. It is really that good.

The new widgets offered by Xmt have been designed to take the hard work out of Motif programming. Anyone that has spent hours mulling over pages of form attachments trying to get the desired layout of a dialog box will take great pleasure in using the XmtLayout widget. This widget offer the same type of flexibility and ease of use that people only expect from the Tk toolkit for Tcl. The Xmt chooser widget also takes the hard work out of radio boxes, check boxes and other related objects by offering a simple syntax for the creation of all the required elements rather than leaving the programmer to do all the work. The other new widgets strive for the same goal : make it easy and efficient.

One of the nicest features of Xmt from a productivity point of view is nothing new to the X programming world, although it is new to the Motif programmer. Via the addition of a few new resource converters, Xmt allows just about your entire GUI to be specified as application resources. This not only includes widget appearance and layout but also widget creation. It is possible to create a fully functioning GUI, including callbacks to dialog boxes and other UI elements, without writing a single line of C. The development cycle is incredibly fast as there is no compilation or linking involved. It's a matter of execute, edit, execute. This type of functionality has been available via the Widget Creation Library but to have it tied in with the other features of the Xmt library makes development a breeze.

Many of the features provided by Xmt are there just to increase the ease of use of Motif. One example of this is the implementation of a very simple yet incredibly useful font handling mechanism. The programmer may specify a list of fonts to be used within the application, either within the code or via the resource file, and associate a name with each font. From then on, font information can be included in labels and other text strings to be displayed in the GUI. For example, the programmer may decide to use a 48 point Times font for dialog headers. If that font is called HEAD in the applications font list, a label string of "@f[HEAD]This is a header" will force the desired font to be used for the string. Fonts can be mixed to any extent allowing things like "@f[HEAD] This is in a @f[BOLD]bold @f[HEAD] font" to generate the desired effect. It's a simple idea but saves so much time.

Motif Tools is quite a large and daunting book weighing in at close to a thousand pages although it is structured to offer both tutorial and reference sections for all the features of the library. After a couple of days using it you'll find that all you need is a few post-it notes marking important pages and you'll be pumping out Motif code faster than you thought possible without a code generator.

The book comes with a CD containing a copy of the library's source code and some example programs from the book. If you want to have a look at the library before buying the book you can grab the code via FTP from ftp://ftp.ora.com/pub/examples/xbook/Xmt/xmt200.tar.Z. The book comes in at about $110 retail so you probably should have a look at the library before rushing to the bookshop. If you're anything like me it'll only take a couple of hours before you're heading off to Dymocks.


[Previous
article] [Contents]

[Home
page]