david@jpl-devvax.JPL.NASA.GOV (David E. Smyth) (10/20/90)
Version 1.04 of the Widget Creation Library is now available ----------------------------------------------------------- Widget Creation Library, Motif Resource Interpreter, Athena Resource Interpreter: An Easier Way to Develop Applications using Motif and Athena Widgets. Window-based applications are notoriously difficult to program. When the Macintosh was introduced in early 1984, Bill Gates projected that 50% of Microsoft revenues would come from Mac application by October 1984. In reality, the first Mac applications were only beginning to be shipped by that date. When Steve Jobs left Apple and developed the NeXT computer, the window environment was specifically designed to support a WYSIWYG interface builder. NextStep and the NeXT IB were the results of this effort. The X developers at MIT and DEC also needed an easy way to develop windowed applications. Instead of developing a WYSIWYG tool like NeXT, they developed a toolkit where interfaces were specified using C code, and could be significantly modified via `resource files' using a minimum number of attribute specifications. They provided an instance attribute inheritance mechanism to propogate attributes throughout an interface. This allows such simple specification as the following to alter every font in an interface: *font: 9x15 The toolkit is called the Xt Intrinsics. The windows, buttons, menus, scrollbars, etc., are called Widgets. The Athena Widgets are one set of user interface objects built upon the Xt Intrinsics. Motif is another set of widgets. As time went on, developers of widget-based applications found the resource files to be more and more useful. For the fourth release of the X11 window system, many of the example programs evolved to the point that only the raw behavior of the applications were specified in C, with most of the look and feel being specified using resource files. At the fourth annual X Technical Conference, several people pointed out that resource files could be used to specify everything about a widget based user interface, except the actual "tree" of widgets, their types, and bindings of behaviors to the user interface widgets. Could the resource mechanism be enhanced to allow these to be specified as well? Martin Brunecky at Auto-Trol in Denver Colorado took up the challenge, and posted a simple set of routines which he called WsXc, for "Window System: Xrm Creation." Xrm stands for X Resource Manager, which is a heirarchical database for keeping arbitrary named data related to X window interfaces. The Xt Intrinsics use Xrm for widget resources. The basic idea of WsXc is to search the Xrm database, starting at the root, and pull out resources which describe the widget heirarchy and bindings to callback functions. Over the next several months, WsXc was repackaged as Mri (Motif Resource Interpreter), and then Ari (Athena Resource Interpreter), and finally generalized into the Widget Creation Library. The result provides several significant benefits to the developer and the user: o Rapid Prototyping: Arbitrarily complex widget interfaces may be specified, and many common behaviors (pop-up, change attributes, exit) can be specified for the interface. o Prototyping Environment is the Development Environment is the Delivery Environment: There is no specific breaking point between prototyping, developing, and tuning a delivered program. o Minimum Specifications: The Xrm and Xt Intrinsics instance attribute inheritance mechanism is fully utilized, so a minimum number of specifications can describe a complete user interface. o Extensible: Adding new widget types and callback routines is trivial. o Widget Set Independent: The C code which provides the behavior of the application can frequently be written in a widget set independent manner. This allows an application to be written which supports multiple look-and-feel definitions: Motif, OpenLook, and Athena interfaces can all be front-ends to the same underlying application. o The user can make any change to the interface: Deeply nested menus can be substituted for dialog boxes, or vice versa. Any label or image can be altered, which supports inter- nationalization. The Widget Creation Library Distribution ---------------------------------------- The distribution now consists of the tar file with all the source and examples, and two postscript documents. The Wcl.ps.Z document is sort of a user's guide, along with some discussion on how to use Wcl in the context of a software life cycle. The WclSlides.ps.Z is a set of view graphs or slides which present the same information, but it also has several examples with some discussion. The distribution is available in several ways. The preferred approach it for you to get the compressed tar file using anonymous ftp from either of these ftp servers: devvax.jpl.nasa.gov (128.149.1.143) pub/Wc1_04.tar.Z expo.lcs.mit.edu (18.30.0.212) contrib/Wc1_04.tar.Z If you have never used ftp, this is how it is done: # ftp devvax.jpl.nasa.gov Name: anonymous Password: <anything non-null> ftp> binary ftp> cd pub ftp> get Wc1_04.tar.Z ftp> get Wcl.ps.Z ftp> get WclSlides.ps.Z ftp> quit # uncompress *.Z # lpr Wcl.ps WclSlides.ps # tar xvf Wc1_04.tar Using ftp to get the distribution from expo is similar, except that you cd into contrib, not pub. If you do not have ftp, I will can you the 11 shar files through email. Also, I can send the compressed tar file uuencoded. This is the least reliable way, since the uuencoded file is 246547 bytes long, which will cause some mailers to barf. If you really don't know if you want the whole distribution, I can send you a shar file which contains just the README files. If you send me mail asking for the shar files, the uuencoded file, or the README shar file, my mail back to you may bounce. If you don't hear anything for a couple of days, try again... The distribution includes the following README files: 0thREADME Fixes and enhancements to this version 1stREADME Intro, credits, and build instructions 2ndREADME Minimimum information to use Wc from an application 3rdREADME Wc Resources 4thREADME Standard Callbacks 5thREADME Standard Actions 6thREADME Wc Widget Creation, Widget Registration, Callback Registration, and Action Registration Functions 7thREADME Writing Callback Functions ------------------------------------------------------------------------- David Smyth david@jpl-devvax.jpl.nasa.gov Senior Software Engineer, seismo!cit-vax!jpl-devvax!david X and Object Guru. (818)393-0983 Jet Propulsion Lab, M/S 230-103, 4800 Oak Grove Drive, Pasadena, CA 91109 --------------------------- Quote of the Day: --------------------------- "A Guru is not one who simply knows all the answers. Rather, a Guru is like one who walks among the mountains, and by wandering around abit, can see the horizon through long narrow canyons." -------------------------------------------------------------------------