Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xmconvertunits(3x) [osf1 man page]

XmConvertUnits(3X)														XmConvertUnits(3X)

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. Specifies the widget for which the data is to be converted Specifies whether the converter uses the horizontal or vertical screen resolution when performing the conversions. orientation can have values of XmHORIZONTAL or XmVERTICAL. Specifies the current unit type of the supplied value Specifies the value to be converted Converts the value to the unit type specified The parameters from_unit_type and to_unit_type can have the following values: XmPIXELS--all values provided to the widget are treated as normal pixel values. This is the default for the resource. Xm100TH_MILLIMETERS--all values provided to the widget are treated as 1/100 millimeter. Xm1000TH_INCHES--all values provided to the widget are treated as 1/1000 inch. 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. 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 compo- nents. 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. SEE ALSO
XmSetFontUnits(3X), XmScreen(3X) XmConvertUnits(3X)

Check Out this Related Man Page

XmConvertStringToUnits(library call)									      XmConvertStringToUnits(library call)

NAME
XmConvertStringToUnits -- A function that converts a string specification to a unit value SYNOPSIS
#include <Xm/Xm.h> int XmConvertStringToUnits( Screen *screen, String spec, int orientation, int to_type, XtEnum *parse_error); DESCRIPTION
XmConvertStringToUnits converts a string specification value and returns the converted value as the return value from the function. This function uses the specified screen's resolution to compute the number of units for the string specification. screen Specifies the screen whose resolution is to be used for the computation. spec Specifies the string, in <floating value><unit> format, to be converted. orientation Specifies whether the converter uses the horizontal or vertical screen resolution when performing the conversion. The orientation parameter can have values of XmHORIZONTAL or XmVERTICAL. to_type Converts the value to the unit type specified. Refer to the XmNunitType resource of the XmGadget, XmManager, or XmPrimitive ref- erence page. This parameter can have one of the following values: XmPIXELS The returned value will be the number of pixels. XmMILLIMETERS The returned value will be the number of millimeters. Xm100TH_MILLIMETERS The returned values will be the number of 1/100 millimeters. XmCENTIMETERS The returned values will be the number of centimeters. XmINCHES The returned values will be the number of inches. Xm1000TH_INCHES The returned values will be the number of 1/100 inches. XmPOINTS The returned values will be the number of points. A point is a text processing unit defined as 1/72 of an inch. Xm100TH_POINTS The returned values will be the number of 1/100 points. XmFONT_UNITS All values provided to the widget are treated as font units. A font unit has horizontal and vertical components. These are the values of the XmScreen resources XmNhorizontalFontUnit and XmNverticalFontUnit. 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 compo- nents. These are the values of the XmScreen resources XmNhorizontalFontUnit and XmNverticalFontUnit. parse_error Specifies if a parsing error occurred. This is set to a value of True indicates that an error occurred, a value of False to indi- cate no error. RETURN
Returns the converted value. If a NULL screen, incorrect orientation, or incorrect unit_type is supplied as parameter data, or if a pars- ing error occurred, 0 (zero) is returned. RELATED
XmConvertUnits(3), XmSetFontUnits(3), and XmScreen(3). XmConvertStringToUnits(library call)
Man Page