HP OpenVMS Systems Documentation

Content starts here
Common Desktop Environment: Programmer's Overview

Appendix A
Common Desktop Environment Motif

The Common Desktop Environment Motif Toolkit consists of the Motif 1.2.3 widget library with enhancements to existing functionality and bug fixes, as well as some new features. Motif 1.2.3 is a patch of Motif 1.2. The look and feel and APIs for Motif 1.2 and Motif 1.2.3 are the same.

In addition, it provides control widgets for graphical user interface objects not found in Motif 1.2.3. For more information on these widgets, see "Common Desktop Environment Motif Control Widgets" and the CDE Programmer's Guide.

Common Desktop Environment Motif adds functionality to the Motif 1.2.3 release while maintaining backward binary compatibility. It is source and binary compatible with Motif 1.2 applications. Existing Motif 1.2 applications will compile using Common Desktop Environment Motif. Existing Motif 1.2 binaries will run without modification using Common Desktop Environment Motif.

Features Added to Motif

The Common Desktop Environment added the following features to
Motif 1.2.3 to support desktop applications:

  • Complete localization of toolkit error messages

  • XmGetPixmap() and XmGetPixmapByDepth() use the environment variable XMICONSEARCHPATH or XMICONBMSEARCHPATH as the icon search path. If neither of these variables is set, then they use XBLANGPATH, which is the Motif 1.2 behavior. See the Common Desktop Environment Motif man page for more information.

Enhancements to Existing Motif Functionality

The Common Desktop Environment Xm library contains minor enhancements to Motif usability to enable better interoperability with OPEN LOOK and Microsoft Windows. The usability enhancements include:

  • Optionally allowing mouse button 2 on a three-button mouse to be used to extend the current selection. This is equivalent to the OPEN LOOK Adjust function.

  • Allowing Tab to be used to move through a group of PushButton widgets and gadgets, ArrowButton widget and gadgets, and DrawnButton widgets.

  • Allowing mouse button 3 to activate a CascadeButton menu.

  • Providing three new resources (pathMode, fileFilterStyle, and dirTextLabelString) for the XmFileSelectionBox widget, which give it an improved look and feel.

  • Enabling interoperability with Microsoft Windows and OPEN LOOK through multiple virtual key bindings.

  • Providing visual enhancements to the standard Motif look (see the next section, "Visual Enhancements").

Each of the preceding enhancements can be controlled by a resource: either a widget resource (for XmFileSelectionBox) or an application-wide resource (all other cases). The default values for this resource provide behavior and APIs that are identical to that of Motif 1.2. For information on these enhancements and resources, see the XmDisplay(3x) and XmFileSelectionBox(3x) man pages.

Visual Enhancements

The Common Desktop Environment changed the Motif 1.2.3 look in the following ways:

  • RadioBox fill color was changed to show state more clearly

  • RadioBox shape was changed from diamond to circular

  • A check glyph was added to the CheckBox to show state more clearly

  • CascadeButtons and menu items were changed to have an etched-in border when active

  • Thumb was removed from the read-only Scale to distinguish it from the Scale

  • Default shadow thickness was changed to 1 pixel

  • Default highlight thickness was changed to 1 pixel

  • Default PushButton visual that highlights the button inside its default shadow.

For information on these enhancements, see the XmDisplay(3), XmPushButton(3), XmPushButtonGadget(3), XmToggleButton(3), XmToggleButtonGadget(3), and XmScale(3) man pages.

Motif Libraries

Use the Common Desktop Environment Motif and X11R5 libraries to develop a Common Desktop Environment Motif-compliant application for the X Window System. The Common Desktop Environment Motif libraries are the Motif 1.2.3 libraries with bug fixes and enhancements.

Motif Library (libXm)

The Common Desktop Environment provides all the Motif 1.2.3 header files.

Motif UIL library (libUil)

The Motif User Interface Language (UIL) is a specification language for describing the initial state of a Motif application's user interface. The Common Desktop Environment version is essentially unchanged from the Motif version.

Include the UilDef.h header file (found in the uil directory) to access UIL.

Motif Resource Manager Library (libMrm)

The Motif resource manager (MRM) is responsible for creating widgets based on definitions contained in User Interface Definition (UID) files created by the UIL compiler. MRM interprets the output of the UIL compiler and generates the appropriate argument lists for widget creation functions. Use libMrm to access the Motif resource manager. The Common Desktop Environment version is essentially unchanged from the Motif version.

Include the Mrm/MrmPublic.h header files to access libMrm in your application.

Demo Programs

You can find Motif 1.2 demos in /usr/dt/examples/motif. These demos do not include any of the Common Desktop Environment Motif enhancements or widgets.

Related Documentation
For more information on Motif, consult the Motif books listed in "Related Books." For more information on the enhancements to Motif 1.2.3, see the relevant man pages.