1XmConvertUnits(library call)                      XmConvertUnits(library call)
2
3
4

NAME

6       XmConvertUnits  —  A function that converts a value in one unit type to
7       another unit type
8

SYNOPSIS

10       #include <Xm/Xm.h>
11       int XmConvertUnits(
12       Widget widget,
13       int orientation,
14       int from_unit_type,
15       int from_value,
16       int to_unit_type);
17

DESCRIPTION

19       XmConvertUnits converts the value and returns it as  the  return  value
20       from  the function.  For resources of type, dimension, or position, you
21       can specify  units  using  the  syntax  described  in  the  XmNunitType
22       resource of the XmPrimitive reference page.
23
24       widget    Specifies the widget for which the data is to be converted.
25
26       orientation
27                 Specifies whether the converter uses the horizontal or verti‐
28                 cal screen resolution when performing  the  conversions.  The
29                 orientation  parameter  can  have  values  of XmHORIZONTAL or
30                 XmVERTICAL.
31
32       from_unit_type
33                 Specifies the current unit type of the supplied value
34
35       from_value
36                 Specifies the value to be converted
37
38       to_unit_type
39                 Converts the value to the unit type specified
40
41       The parameters from_unit_type and to_unit_type can have  the  following
42       values:
43
44       XmPIXELS  All  values  provided to the widget are treated as pixel val‐
45                 ues. This is the default for the resource.
46
47       XmMILLIMETERS
48                 All values provided to the widget are treated  as  millimeter
49                 values.
50
51       Xm100TH_MILLIMETERS
52                 All  values  provided to the widget are treated as 1/100 of a
53                 millimeter.
54
55       XmCENTIMETERS
56                 All values provided to the widget are treated  as  centimeter
57                 values.
58
59       XmINCHES  All values provided to the widget are treated as inch values.
60
61       Xm1000TH_INCHES
62                 All values provided to the widget are treated as 1/1000 of an
63                 inch.
64
65       XmPOINTS  All values provided to the widget are treated as  point  val‐
66                 ues.  A  point is a unit used in text processing applications
67                 and is defined as 1/72 of an inch.
68
69       Xm100TH_POINTS
70                 All values provided to the widget are treated as 1/100  of  a
71                 point.   A  point is a unit typically used in text processing
72                 applications and is defined as 1/72 of an inch.
73
74       XmFONT_UNITS
75                 All values provided to the widget are treated as normal  font
76                 units.  A  font  unit has horizontal and vertical components.
77                 These are the values of the XmScreen resources XmNhorizontal‐
78                 FontUnit and XmNverticalFontUnit.
79
80       Xm100TH_FONT_UNITS
81                 All  values  provided to the widget are treated as 1/100 of a
82                 font unit.  A font unit has horizontal  and  vertical  compo‐
83                 nents.   These  are the values of the XmScreen resources XmN‐
84                 horizontalFontUnit and XmNverticalFontUnit.
85

RETURN

87       Returns the converted value.  If a NULL widget, incorrect  orientation,
88       or  incorrect  unit_type  is  supplied  as  parameter data, 0 (zero) is
89       returned.
90
92       XmPrimitive, XmSetFontUnits(3), and XmScreen(3).
93
94
95
96                                                  XmConvertUnits(library call)
Impressum