File: XmConvertStringToUnits.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 (129 lines) | stat: -rw-r--r-- 3,982 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
'\" 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