Solaris Common Desktop Environment: Motif Transition Guide

Solaris Motif Control Widgets

The Solaris Motif control widgets are designed to ease porting OPEN LOOK applications to the Solaris CDE desktop by providing equivalent functionality in Solaris Motif. These widgets are not considered to be part of Solaris Motif, but rather an extension to Solaris Motif. The libDtWidget library contains widgets and functions that are used to provide common functionality across all CDE applications. The widgets provided include:

Table 3-1 CDE Control Widgets

Widget Name 

Description 

DtSpinBox

TextField widget with additional controls for incrementing and decrementing numeric values, or browsing through and selecting from a list of text strings. Can be read-only. DtSpinBox is functionally similar to the OPEN LOOK numeric text field.

DtComboBox

Combination of TextField and pop-up list widgets that provides a list of valid choices for the TextField. Can be read-only.

DtMenuButton

Command widget that provides the menu cascading functionality of an XmCascadeButton widget outside of a menu bar, or a menu pane. DtMenuButton is functionally equivalent to the OPEN LOOK menu button.

Examples of each type of widget follow:

The DtComboBox custom widget calls the Selection Callback of the Combo Box widget, instead of the List widget, when the browseSelectCallback or the defaultActionCallback is triggered for the List widget of a Combo Box.

This action may cause failure for applications that rely on the List widget Selection callback to be called when the List widget's browseSelectCallback or defaultActionCallback is triggered.


Note -

The Solaris CDE software supports all Motif 1.2 widgets.


Compatibility with Motif 2.1

The APIs of the DtSpinBox and DtComboBox widgets are similar to the Motif 2.1 release of XmSpinBox and XmComboBox widgets. The APIs are designed so an application can easily switch to the Motif 2.1 version of these widgets. The main thing you need to do to switch is to change the Dt names for the class, types, and creation routines to Xm.

This information is supplied in case you choose to port your application to Motif 2.1 but this is not a recommendation that you do so.


Note -

The Solaris CDE software does not guarantee strict API or binary compatibility between its widgets and the Motif 2.1 widgets.


Library and Header Files

The library libDtWidget provides access to the DtSpinBox, DtComboBox, and DtMenuButton widgets. The libDtWidget header files for these widgets are:

Demo Programs

You can find the Solaris Motif control widgets demos in /usr/dt/examples/dtwidget. Read the README file for detailed information on the demos.

Related Documentation

For more information on Solaris Motif control widgets, see the relevant man pages and Solaris Common Desktop Environment: Programmer's Guide.