
Output of pixmaps flagup letters wingdogs xlogo64 calculator tie_fighter
To optimize the use of space by the RowColumn widget, the number of rows and columns is set to the square root of
the number of images. For example, if there are nine pixmaps to load, there should be a 3x3 grid of images. Since the
number of files to be loaded corresponds to the number of arguments in argv, argc is passed to int_sqrt() to
get the integer square root of its value. This value tells us the number of columns to specify for the XmNnumColumns
resource of the RowColumn.
The bitmap files are read using XmGetPixmap(), which is a function that creates a pixmap from the specified file.
This file must be in X11 bitmap format. Since the function needs foreground and background colors for the pixmap,
we use the colors of the RowColumn. If the specified file cannot be found or if it does not contain a bitmap, the
function returns the constant XmUNSPECIFIED_PIXMAP. XmUNSPECIFIED_PIXMAP is not 0 or NULL. Many
people have a tendency to test for these values upon return of functions that return opaque objects. The literal value is
2. If this error condition is returned, the program skips the file and goes on to the next one. For more detailed
information on XmGetPixmap() and other supporting functions, see Section #spixmaps in Chapter 3, Overview of
the Motif Toolkit.
12.1.4 Label Sensitivity
A Label can be made inactive ...