Parent document is top of "Motif FAQ (Part 8 of 9)"
Previous document is "278) TOPIC: CREATING WIDGETS"
Next document is "280) How can I achieve binary compatibility using the"

279) What are some good references for creating widgets (subclassing

widgets)?

[Last modified: Feb 95]

Answer:  Ken Sall (ksall@cen.com) writes:

If you have Motif 2.0, see the new document provided by OSF called "OSF/Motif
Widget Writer's Guide" in the directory:  doc/widgetGuide/Output/draft/ps.

If you have Motif 1.*, try these references (details in the BOOKS topic):

    Asente, Paul J., and Swick, Ralph R.,
    X Window System Toolkit, The Complete Programmer's Guide and Specification.

    Nye, Adrian & O'Reilly, Tim,
    X Toolkit Intrinsics Programming Manual.Motif Edition, Volume 4M

    Flanagan, David, Editor,
    X Toolkit Intrinsics Reference Manual, Volume 5


Alex Fridman (alex@genlogic.com) writes:

For graphical widgets, you may try the Generic Logic Toolkit (GLG Widgets). It
allows custom graphical widgets (such as Graphs and Controls) to be created
interactively from the supplied templates using the GLG 3D Graphical Editor. A
Demo is available by ftp from:

   ftp://ftp.netcom.com/pub/glg/

David Suller of Generic Logic, Inc. adds:

When used in an application, a GLG Widget may be animated with real-time data
via the resource mechanism or used as a graphical server receiving and
displaying data from several local or remote processes using the built-in
Inter-Client Communication Server.

David Suller                  phone:  (617)254-4153
Generic Logic, Inc.           FAX:    (617) 254-2746
P.O. Box 35606                email:  glg@genlogic.com
Brighton, MA 02135-0006       ftp:    ftp.netcom.com:/pub/glg/


joe shelby (jshelby@autometric.com) writes:

Alastair Gourlay (alastair.gourlay@eng.sun.com), a member of the technical
staff at Sun Microsystems and a former member of the Motif Development group
at OSF, has written 2 articles for _The X Resource_, published by O'Reilly and
Associates.

The first, "Writing Motif Widgets : A Pragmatic Approach" can be found in
Issue 6.  It covers writing a XmPrimitive-derived widget, deriving from that
widget, and writing a XmManager-derived widget.  Also included are brief
summaries of several _Xm private functions for widget writers, how to use the
Motif 1.2 Representation Type functions, and adding the widgets to Mrm/Uil.

The second, "The One-Minute Manager : Custom Motif Layout Widgets Made Easy"
can be found in Issue 10.  It expands and greatly simplifies creating
composite widgets for Motif.  Gourlay has created and released a new widget,
the XmpGeometry widget that handles all of the geometry management issues for
you and provides convenience functions for determiningparent and child
widgets' perfered sizes.  All the programmer has to do to derive from this
widget is create the new resources and constraints and implement 2 new class
methods to override the XmpGeometry's methods.  Included with the XmpGeometry
class are 3 example derived widgets.

The code for these widgets is available at

ftp://ftp.uu.net/published/oreilly/xresource/issue6/Subclassing.tar.Z
ftp://ftp.uu.net/published/oreilly/xresource/issue10/OneMinuteManagers.tar.Z

Donald L. McMinds and Joseph P. Whitty have written a book, _Writing Your Own
OSF/Motif Widgets_, published by Prentice Hall for Hewlett-Packard
Professional Books.  Both authors work at HP's Workstation Systems Division,
and have been involved with Motif developement since its beginnings.  The book
(which is mostly code with explanations) gives details on writing
XmPrimitive-derived, XmManager-derived, and XmGadget-derived widgets, with one
example widget for each.  In addition, the book provides "man-pages" for
several _Xm private functions for programmer convenience.

The code for these widgets is available at

        ftp://hpcvaal.cv.hp.com/readonly/book_files/wr_widgets.tar.Z

Parent document is top of "Motif FAQ (Part 8 of 9)"
Previous document is "278) TOPIC: CREATING WIDGETS"
Next document is "280) How can I achieve binary compatibility using the"