XmConvertUnits(3X)

XmConvertUnits - A function that converts a value in one unit type to another unit type

As shipped in IRIX 6.5.30. Added in IRIX 6.5.19.

     NAME
          XmConvertUnits - A function that converts a value in one
          unit type to another unit type

     SYNOPSIS
          #include <Xm/Xm.h>

          int XmConvertUnits (widget, orientation, from_unit_type,
                    from_value, to_unit_type)
               Widget    widget;
               int       orientation;
               int       from_unit_type;
               int       from_value;
               int       to_unit_type;

     DESCRIPTION
          XmConvertUnits converts the value and returns it as the
          return value from the function.

          widget
               Specifies the widget for which the data is to be
               converted

          orientation
               Specifies whether the converter uses the horizontal or
               vertical screen resolution when performing the
               conversions.  orientation can have values of
               XmHORIZONTAL or XmVERTICAL.

          from_unit_type
               Specifies the current unit type of the supplied value

          from_value
               Specifies the value to be converted

          to_unit_type
               Converts the value to the unit type specified

          The parameters from_unit_type and to_unit_type can have the
          following values:

          o    XmPIXELS - all values provided to the widget are
               treated as normal pixel values.  This is the default
               for the resource.

          o    Xm100TH_MILLIMETERS - all values provided to the widget
               are treated as 1/100 millimeter.

          o    Xm1000TH_INCHES - all values provided to the widget are
               treated as 1/1000 inch.

          o    Xm100TH_POINTS - all values provided to the widget are
               treated as 1/100 point.  A point is a unit typically
               used in text processing applications and is defined as
               1/72 inch.

          o    Xm100TH_FONT_UNITS - all values provided to the widget
               are treated as 1/100 of a font unit.  A font unit has
               horizontal and vertical components.  These are the
               values of the XmScreen resources XmNhorizontalFontUnit
               and XmNverticalFontUnit.

     RETURN VALUE
          Returns the converted value.  If a NULL widget, incorrect
          orientation, or incorrect unit_type is supplied as parameter
          data, 0 is returned.

     RELATED INFORMATION
          XmSetFontUnits(3X) and XmScreen(3X).