Blob Blame History Raw
'\" t
...\" CvtUn.sgm /main/9 1996/09/08 20:38:03 rws $
.de P!
.fl
\!!1 setgray
.fl
\\&.\"
.fl
\!!0 setgray
.fl			\" force out current output buffer
\!!save /psv exch def currentpoint translate 0 0 moveto
\!!/showpage{}def
.fl			\" prolog
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
\!!psv restore
.
.de pF
.ie     \\*(f1 .ds f1 \\n(.f
.el .ie \\*(f2 .ds f2 \\n(.f
.el .ie \\*(f3 .ds f3 \\n(.f
.el .ie \\*(f4 .ds f4 \\n(.f
.el .tm ? font overflow
.ft \\$1
..
.de fP
.ie     !\\*(f4 \{\
.	ft \\*(f4
.	ds f4\"
'	br \}
.el .ie !\\*(f3 \{\
.	ft \\*(f3
.	ds f3\"
'	br \}
.el .ie !\\*(f2 \{\
.	ft \\*(f2
.	ds f2\"
'	br \}
.el .ie !\\*(f1 \{\
.	ft \\*(f1
.	ds f1\"
'	br \}
.el .tm ? font underflow
..
.ds f1\"
.ds f2\"
.ds f3\"
.ds f4\"
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
.TH "XmConvertUnits" "library call"
.SH "NAME"
\fBXmConvertUnits\fP \(em A function that converts a value in one unit type to another unit type
.iX "XmConvertUnits"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/Xm\&.h>
\fBint \fBXmConvertUnits\fP\fR(
\fBWidget \fBwidget\fR\fR,
\fBint \fBorientation\fR\fR,
\fBint \fBfrom_unit_type\fR\fR,
\fBint \fBfrom_value\fR\fR,
\fBint \fBto_unit_type\fR\fR);
.fi
.SH "DESCRIPTION"
.PP
\fBXmConvertUnits\fP converts the value and returns it as the return value from
the function\&.
For resources of type, dimension, or position, you can specify units
using the syntax described in the \fBXmNunitType\fP resource of the
\fBXmPrimitive\fP reference page\&.
.IP "\fIwidget\fP" 10
Specifies the widget for which the data is to be converted\&.
.IP "\fIorientation\fP" 10
Specifies whether the converter uses the horizontal or vertical screen
resolution when performing the conversions\&. The \fIorientation\fP
parameter can have values of
\fBXmHORIZONTAL\fP or \fBXmVERTICAL\fP\&.
.IP "\fIfrom_unit_type\fP" 10
Specifies the current unit type of the supplied value
.IP "\fIfrom_value\fP" 10
Specifies the value to be converted
.IP "\fIto_unit_type\fP" 10
Converts the value to the unit type specified
.PP
The parameters \fIfrom_unit_type\fP and \fIto_unit_type\fP can have the
following values:
.IP "\fBXmPIXELS\fP" 10
All values provided to the widget are treated as
pixel values\&. This
is the default for the resource\&.
.IP "\fBXmMILLIMETERS\fP" 10
All values provided to the widget are treated as millimeter
values\&.
.IP "\fBXm100TH_MILLIMETERS\fP" 10
All values provided to the widget are
treated as 1/100 of a millimeter\&.
.IP "\fBXmCENTIMETERS\fP" 10
All values provided to the widget are treated as centimeter
values\&.
.IP "\fBXmINCHES\fP" 10
All values provided to the widget are treated as inch
values\&.
.IP "\fBXm1000TH_INCHES\fP" 10
All values provided to the widget are treated
as 1/1000 of an inch\&.
.IP "\fBXmPOINTS\fP" 10
All values provided to the widget are treated as point
values\&. A point is a unit used in text processing
applications and is defined as 1/72 of an inch\&.
.IP "\fBXm100TH_POINTS\fP" 10
All values provided to the widget are treated as
1/100 of a point\&.
A point is a unit typically used in text processing applications and
is defined as 1/72 of an inch\&.
.IP "\fBXmFONT_UNITS\fP" 10
All values provided to the widget are treated as normal font
units\&. A font unit has horizontal and vertical components\&.
These are the values of the XmScreen resources \fBXmNhorizontalFontUnit\fP
and \fBXmNverticalFontUnit\fP\&.
.IP "\fBXm100TH_FONT_UNITS\fP" 10
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 \fBXmNhorizontalFontUnit\fP
and \fBXmNverticalFontUnit\fP\&.
.SH "RETURN"
.PP
Returns the converted value\&.
If a NULL widget, incorrect \fIorientation\fP, or incorrect \fIunit_type\fP
is supplied as parameter data, 0 (zero) is returned\&.
.SH "RELATED"
.PP
\fBXmPrimitive\fP,
\fBXmSetFontUnits\fP(3),
and
\fBXmScreen\fP(3)\&.
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:21