For more info, see http://www.pconline.com/~erc/xprog.htm
See also: Widget FAQ
The Intrinsics widget sets contains only a few basic widget classes which perform no useful function on their own. These are meant to be the base points from which more useful widget sets are created.
The Widgets provided by Xt are as follows:
Note that none of these widgets actually do anything; they're all intended to be subclassed by other widget sets.
The Athena Widget set provides a simple selection of basic user interaction elements. It was originally written as a test bed for the Xt toolkit.
The advantage to the Athena Widget is that it's free, almost every X windows system has it and anybody can write code for it. The disadvantages are that it's somewhat limited, and ugly as sin. As a result, there have been many secondary implementations of the Athena Widget set in an attempt to improve the look-and-feel of the tools.
The widgets provided by Athena are as follows:
Here is a sample appliction showing most Athena widgets:

Note that this sample application includes three widgets classes
written by me: Radio,Checkbox and Gauge.
By request: the source code to the sampler program is available here.
Written by Kaleb Keithley, the Athena-3d widget set is intended as a plug-in replacement for the standard Xaw widget set. It adds a 3-d look to most widgets, while preserving their standard (ugly) interactions.
The Athena 3d widget set introduces a new widget class, ThreeD which is subclassed from the Simple class and from which most other Athena 3d widgets are subclassed. This should be transparent to all applications that use the Athena widget set. Applications will simply run with the 3-d look.
On the down side, non-Athena widgets which are derived from Athena widgets will be broken, both at the binary and at the source code level.
Here is a sample appliction showing most Athena widgets:
The Athena 3d widget set introduces the following new widget classes:
The new resources introduced by the ThreeD class are as follows:
| Name | Class | Type | Default |
|---|---|---|---|
| shadowWidth | ShadowWidth | Dimension | 2 |
| topShadowPixel | TopShadowPixel | Pixel | dynamic |
| bottomShadowPixel | BottomShadowPixel | Pixel | dynamic |
| topShadowContrast | TopShadowContrast | Int | 20 |
| bottomShadowContrast | BottomShadowContrast | Int | 40 |
| userData | UserData | XtPointer | NULL |
| beNiceToColormap | BeNiceToColormap | Boolean | False |
The beNiceToColormap flag is the most important. You need to set this to False in order to obtain a decent 3-d look. Without it, Xaw3d will try to give a 3-d appearance with 1-bit patterns, which don't look very good.
The Athena widget source code was intended to be built from within the X11 source hierarchy, and the Xaw3d widget source follows this model. The installation instructions that come with the source tell you to unpack the source code under the "xc" directory within the source tree. If you don't have an X11 source tree, the instructions offer no help.
I have found that Xaw3d can compile correctly if it can find the header files. If you have installed the header files as described above, then it should be sufficient to type "make Makefile" or "xmkmf" and then "make".
If you have not (or could not) install the Xaw3d header files as
shown above, it may still be possible to compile Xaw3d. First,
edit the Imakefile (or Makefile) and uncomment the line that looks
like EXTRA_INCLUDES = -I.. Next, make the following
symlinks:
Bugs: On some systems, lex and yacc are
replaced by other programs and are not found by make. If this is the
case, edit Imakefile or Makefile and replace occurances of
yacc and lex with $(YACC) and
$(LEX) respectively.
The Xaw-Xpm Widget set extends the capabilities of the Xaw-3d widget set by integrating it with the Xpm pixmap manipulation library. Xaw-Xpm allows arbitrary images to be used as the background for your widgets. It also improves the look-and-feel of Xaw3d somewhat.
XawXpm is by far the most beautiful of the Athena clones.
Here is my sample appliction showing using the XawXpm library:
Here it is again, with some bitmap resources specified:
Issues: The XawXpm widget set seems to have some binary incompatibilities; xxgdb refuses to run with it (otherwise, this would be my default Athena library.) There are some misspellings of resource names in the header files, leading to warning messages when you compile some applications.
Custom widgets subclassed from Xaw3d seem to run unchanged under XawXpm, even inheriting the pixmap backgrounds.
Written by Eddie Hiu-Fung Lau, this widget set approximates the look and feel of windows 95.
Differences between Xaw3d and Xaw95 are primarily minor changes in appearance to make widgets look more like Windows '95:
Custom widgets subclassed from Xaw3d seem to run unchanged under Xaw95.
Differences between Xaw3d and neXtaw are as follows:
The Xraw Widget set is Vladimir Romanovski's re-write of Xaw. It does a very good job of looking like the Motif widget set when resources are set properly.
Issues: The Xraw widget set chooses some poor defaults for resources, leading to a larger application footprint and a clumsier appearance. Some things seem to be broken (e.g. scrollbars in a viewport widget), although it's possible that this can be fixed by using the right resource values.
Here is a sample application provided with Xraw source code:
Custom widgets subclassed from Xaw3d will not compile, much less run, under Xraw, due to some changes made in the base classes.
The XawM Widget set is my own effort. It is based on Xaw3d and makes a few changes required to give Athena the "modern" look-and-feel. It borrows a few features from neXtaw and other widgets sets as required to obtain a modern look and feel, although the actual source code is entirely based on Xaw3d.
Of special interest is the addition of keyboard traversal. I may also add pixmap handling because some modern applications like to have color images, and because it will help encourage people to port to it.
No attempt will be made to add new functionality to the existing widget set. This library is intended to be compatible with the Athena widget set.
Yet Another Athena clone. Like the others, it adds a more pleasing "3d" appearance to the widgets. In addition, it adds the ability to use color pixmaps for widget glyphs. This requires that the Xpm library be available.
The most significant feature of Xaw+ is the addition of pop-up help text (also known as spot help.)
For some reason not clear to me, Xaw+ only draws the 3-d border around Command widgets when those widgets have the keyboard focus or are in the "set" state. As seen in the snapshot below, only the Repeater button and one of the radio buttons are displayed with any kind of border. This may be fixable by setting the correct resources, but the out-of-the-box default is no border.
This version is based on the original Xaw widget set and not the Xaw3d widget set. Whereas Xaw3d introduced the Threed class after the Simple class, Xaw+ introduces the Add3dExt class before the Simple class. For this reason, widgets which were subclassed from either the Xaw or Xaw3d widget set will not compile with the Xaw+ widget class.
The Xaw+ widget set does not come with Imakefiles. The included Makefiles are for 486 linux only, although with a little work I was able to make it compile under Solaris as well. Source code is not completely portable.
Xaw+ does not include MultiText widgets. This may be a problem to applications that used them.
Xaw+ adds the following new widgets and features:
XawM is still in development, but is already at least as functional as Xaw3d and seems fully compatible. Go ahead and try it, I need beta testers.
Xaw-Xpm is very pretty, but consumes excessive colormap entries on an 8-bit system. It is also somewhat over-glitzy. Finally, it contains errors in the class definition strings in the header files.
Xaw95 is nearly identical to Xaw3d and can probably be safely used anywhere.
neXtaw is also nearly identical to Xaw3d, but includes more 3-d effects as well as background pixmaps. This may be the most functional of all of the 3-d widget sets.
Xraw and Xaw+ are neither binary nor source code compatible with any widgets that may be subclassed from them. Xaw+ is not portable to non-linux/x86 systems. Xaw+ is fairly new, however, and these problems may be addressed in the not-too-distant future.
Sample application:
Availability:
EZWGL is a very large and powerful X toolkit. Not an
intrinsics library, despite its having been filed in
the /contrib/widgets/ directory at ftp.x.org.
Too many features to list here. Widgets include 3-d canvas, buttons, checkbuttons, radio buttons, text entry, list boxes, file selector, frame, icon, labels, list tree, list box, menus, sliders, scrollbars, notebook [tabs], option entry [combo box], text with attributes, workarea [icon area]
Extensively documented, with examples and screen shots.
Total package comes to about 11 meg.
For an example of LessTif in use, see my Xdraw page.
AKA the EuroBridge Widget set. Aimed at multi-media applications. Includes:
Of special interest is the LiteClue widget. Every
programmer should have this widget. Every application should
use it heavily. The LiteClue is a popup widget that monitors
Enter and Leave events in other widgets. When the cursor enters
a monitored widget and remains motionless for a specific amount
of time, a small window appears, displaying spot help for that
widget. You need this widget.
The Computer Generations widgets also include an HTML widget,
an N-ary Tree Widget, and a Tabs widget for Motif
IconLabel, written by Anthony Thyssen. This widget
is a Label widget that handles pixmaps properly, even on monochrome
displays.
Progress, written by Dick Porter. This widget
displays a progress meter. Options include: showPercent -- show
embedded percentage; showTime -- show elapsed and estimated time
remaining.
SciPlot
TextField
written by Robert W. McMullen. This
widget is a one-line edit field similar to Motif text field.
Abacus, written by David Albert Bagley (ported
from Sunview to XView to Motif to Xt.)
Availability:
ftp.x.org
Ghostview:
Written by Timothy O. Theisen
Display ghostview in a widget.
Availability:
Included in the
Siag Office source. I don't know where
else to get it.
Here are some widgets which I've written over the years. Most of
them were written in order to help write some larger application,
so they're of real practical value, and not just "gee lookit the
nifty widget".
To see a couple of examples of these widgets in use, see
these programs I'm working on:
Tabs, written by Edward Falk. This widget presents the
user with a series of tabs, similar to file index tabs. Widget is
subclassed from Xt Constraint and depends on no other code or libraries.
*NEW* -- compile with -DUSE_MOTIF for motif
compatibility.
Availability:
Frame, written by Edward Falk. This widget places
a decorative frame around another widget. Widget is subclassed
from Xt Constraint and depends on no other code or libraries.
Availability:
*NEW* -- compile with -DUSE_MOTIF for motif
compatibility.
Availability:
Also includes a couple of useful utility functions and keyboard
activation.
Availability:
Availability:
You are encouraged to write your own subclasses and/or generate your
own pixmaps for XpmButton. If you create any pretty ones, please send
them to me.
Availability:
Finally, the rulers may be grabbed with the mouse and used as scroll bars.
Availability:
Gauge, written by Edward Falk. This widget displays
a numeric value. Labels & Tic marks are optional. Labels may be
automatically numbered or pre-set strings. Gauge may optionally
be auto-scaled. Gauge may be selected, in which case the primary selection
is set to the Gauge's numeric value.
Availability:
Slider, written by Edward Falk. This widget
allows the user to enter a
a numeric value.
Slider input may optionally
be auto-scaled.
Availability:
Hdial, written by John L. Cwikla. This widget
shows an adjustable dial.
ImageView, written by John L. Cwikla. This widget
scales an image.
ListTree, written by Robert W. McMullen. This
widget displays a tree of character strings and bitmaps. Typically
used to display a directory tree.
ListTree web page..
written by Robert W. McMullen. This
widget plots scientific graphs. Compatible with Athena, Motif, Olit,
etc.
SciPlot web page..
TextField web page..
Version 1.01 available here.
Graph: written by Roland Zink. This widget lays out
children in a hierarchical directed graph.
(Click for larger view.)
XEarth:
Written by Kirk Lauritz and Martin Gall
Port of XEarth program to a widget. Widget manages its children
according to their geographic location on the Earth.
(Click for larger view.)
Tabs
Frame
Gridbox
Gridbox, written by Edward Falk. A constraint widget
inspired by the Java GridBagLayout class. Each child widget position
in the parent is specified by grid x,y coordinates, and dimension in grid
cells. In addition, children have weights associated with them which
control how extra space is allocated if the parent is resized.
Scrollbar2
Scrollbar2, written by Edward Falk. Subclassed from
the Athena Scrollbar2 widget. This is a very simple widget which
simply adds a new callback list to the existing Scrollbar widget.
The new callback lets the application find out when the user has
begun or completed a scroll interaction.
File Select
FileSelect, written by Edward Falk. This widget gets a
filename from the user. This widget is subclassed from
Gridbox (above).
It requires only Gridbox and Athena widgets, but
can be compiled to use Frame for a nicer look.
It is highly recommended
that it be used with one of the 3-d variants of Athena.
Button
Button, written by Edward Falk. This is a generic
push-button widget. Incomplete as is, it is intended to be subclassed.
Two sample subclasses are included: RockerSwitch which looks like a
a panel rocker switch, and XpmButton which accepts any arbitrary
X pixmap for display.
Ruler
Ruler, written by Edward Falk. This widget provides
rulers which are meant to be displayed alongside a drawing canvas.
Pointers in the rulers are used to display a value.
Gauge
Slider