Blob Blame History Raw
'\" t
...\" CvtSt.sgm /main/9 1996/09/08 20:37:28 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 "XmConvertStringToUnits" "library call"
.SH "NAME"
\fBXmConvertStringToUnits\fP \(em A function that converts a string specification to a unit value
.iX "XmConvertStringToUnits"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/Xm\&.h>
\fBint \fBXmConvertStringToUnits\fP\fR(
\fBScreen *\fBscreen\fR\fR,
\fBString \fBspec\fR\fR,
\fBint \fBorientation\fR\fR,
\fBint \fBto_type\fR\fR,
\fBXtEnum *\fBparse_error\fR\fR);
.fi
.SH "DESCRIPTION"
.PP
\fBXmConvertStringToUnits\fP 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\&.
.IP "\fIscreen\fP" 10
Specifies the screen whose resolution is to be used for the computation\&.
.IP "\fIspec\fP" 10
Specifies the string, in \fI<floating value><unit>\fP format, to be
converted\&.
.IP "\fIorientation\fP" 10
Specifies whether the converter uses the horizontal or vertical screen
resolution when performing the conversion\&. The \fIorientation\fP
parameter can have values of \fBXmHORIZONTAL\fP or \fBXmVERTICAL\fP\&.
.IP "\fIto_type\fP" 10
Converts the value to the unit type specified\&.
Refer to the \fBXmNunitType\fP resource of the
\fBXmGadget\fP, \fBXmManager\fP, or \fBXmPrimitive\fP reference page\&.
This parameter can have one of
the following values:
.RS
.IP "\fBXmPIXELS\fP" 10
The returned value will be the number of pixels\&.
.IP "\fBXmMILLIMETERS\fP" 10
The returned value will be the number of millimeters\&.
.IP "\fBXm100TH_MILLIMETERS\fP" 10
The returned values will be the number of 1/100 millimeters\&.
.IP "\fBXmCENTIMETERS\fP" 10
The returned values will be the number of centimeters\&.
.IP "\fBXmINCHES\fP" 10
The returned values will be the number of inches\&.
.IP "\fBXm1000TH_INCHES\fP" 10
The returned values will be the number of 1/100 inches\&.
.IP "\fBXmPOINTS\fP" 10
The returned values will be the number of points\&.
A point is a text processing unit
defined as 1/72 of an inch\&.
.IP "\fBXm100TH_POINTS\fP" 10
The returned values will be the number of 1/100 points\&.
.IP "\fBXmFONT_UNITS\fP" 10
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 \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\&.
.RE
.IP "\fIparse_error\fP" 10
Specifies if a parsing error occurred\&. This is set to a value of True
indicates that an error occurred, a value of False to indicate no error\&.
.SH "RETURN"
.PP
Returns the converted value\&.
If a NULL screen, incorrect \fIorientation\fP,
or incorrect \fIunit_type\fP
is supplied as parameter data, or if a parsing error occurred, 0
(zero) is returned\&.
.SH "RELATED"
.PP
\fBXmConvertUnits\fP(3), \fBXmSetFontUnits\fP(3), and \fBXmScreen\fP(3)\&.
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:21