Object Oriented Programming with C and OSF Motif Completely updated to cover Motif Release 1.2 and 2.0, this second edition shows how to design reusable user interface components based on Motif, and how C and Motif can be used together effectively....
|Title||:||[(Object Oriented Programming with C++ and OSF/Motif )] [Author: Douglas A. Young] [Jul-1995]|
|Publisher||:||Prentice Hall 1 Juli 1995|
|Number of Pages||:||577 Pages|
|File Size||:||864 KB|
|Status||:||Available For Download|
|Last checked||:||21 Minutes ago!|
[(Object Oriented Programming with C++ and OSF/Motif )] [Author: Douglas A. Young] [Jul-1995] Reviews
Merely shows how to encapsulate windows in a C++ class. Close to nothing about encapsulating widgets. Some inexperimented Ph.D. students tried to build a program on the library skeleton described in this book. It proved so confused that the program had to be rewritten from scratch - on more serious foundations.
We used the basis of this book to handle the user interface on a large planning program for NASA. I am sure we saved thousands of lines of code!
This is the first edition of this classic work. Douglas Young implemented a "light" C++ approach toward wrapping the Motif library. It's very effective, especially for 1992.This is the approach supported by the "X-Designer" toolkit sold by IST.However, the 1995 Second Edition implements a very nice, simple "template" for storing lists of Motif Widgets which simplifies the code dramatically. Still, if you need to support an early "legacy" C++/Motif application, this book's approach is still very good.
Douglas Young created an excellent "light" C++ wrapper approach toward the very complicated Motif GUI library. This 1995 Second Edition of the work includes a very nice "template" approach toward storing lists of Widgets.This is the approach supported by the X-Designer GUI designer made by IST, so having the reference work is highly useful.If you can't find this edition, the 1992 First Edition is also quite useful. Note the source files are still available at export.lcs.mit.edu/contrib/books
How to encapsulate a non object oriented gui library with C++ is shown here. X11/Motif can handle only callbacks for pointers to functions and not to methods. Besides a lot of instructive examples, the main issue of interest is to show how to make XT callbacks work for C++ methods. The trick is to give a "this" pointer as an extra agrument to the XtAddCallback function, concealed as an XtPointer (which is a void pointer). This still goes to a function, possibly a static function in a class, which then has to cast back the XtPointer and call the final method. The book is nicely made. Still, X11/Xt/Motif is a nightmare. If one has any choice, then the modern qt library is much much better. If one needs to use Motif, than books as this one are very helpful.
The book is very good, but don't expect for a tutorial on Motif and/or C++ for newcomers. Although it contains a tutorialchapter, most of the text covers the nuts and bolts of buildingan object oriented application framework. You must have someprevious knowledge on OO concepts to understand it. Have the Motif reference manual at hand too.