
The following command compiles the showuid program:
cc −o showuid showuid.c −lMrm −lXm −lXt −lX11
To display a UID file, use the following command:
showuid −root form hello_world.uid
The command−line options tell the command to open a description file named hello_ world.uid and create the widget
hierarchy rooted at the widget named form. Mrm searches for the UID files specified on the command line using the
UIDPATH environment variable if it is set, or the default path described in Chapter 22. It is easy to run the command
on a file in the current directory, since the current directory is included in the default search path. Remember that you
can also specify an absolute path to a UID file.
We recommend that you use the showuid program for trying out our examples as well as experimenting on your own.
In addition, the program is an excellent starting point for your own Mrm programs. The basic Mrm framework is
already in place. You only need to add the callbacks that implement your application's functionality and provide an
array of UID files, instead of taking them from the command line.
25.2 Defining and Creating Widgets
As you know, the main purpose of a UIL module is to define the widgets of a user interface. We mentioned earlier
that widget definitions always occur in an object section of a UIL module, which begins with the keyword object
followed by one or more widget definitions. The complete ...