File: XmConvertUnits.3

package info (click to toggle)
motif 2.3.8-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 36,432 kB
  • sloc: ansic: 452,643; sh: 4,611; makefile: 2,030; yacc: 1,604; lex: 352; cpp: 348
file content (137 lines) | stat: -rw-r--r-- 3,988 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
'\" 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