Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmConvertStringToUnits(3)  Library Functions Manual  XmConvertStringToUnits(3)

NAME
       XmConvertStringToUnits  -- A function that converts a string specifica-
       tion to a unit value

SYNOPSIS
       #include	<Xm/Xm.h>
       int XmConvertStringToUnits(
       Screen *screen,
       String spec,
       int orientation,
       int to_type,
       XtEnum *parse_error);

DESCRIPTION
       XmConvertStringToUnits converts a string	specification  value  and  re-
       turns  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.

       screen	 Specifies  the	 screen	whose resolution is to be used for the
		 computation.

       spec	 Specifies the string, in _floating value__unit_ format, to be
		 converted.

       orientation
		 Specifies whether the converter uses the horizontal or	verti-
		 cal screen resolution when  performing	 the  conversion.  The
		 orientation  parameter	 can  have  values  of XmHORIZONTAL or
		 XmVERTICAL.

       to_type	 Converts the value to the unit	type specified.	 Refer to  the
		 XmNunitType  resource of the XmGadget,	XmManager, or XmPrimi-
		 tive reference	page.  This parameter can have one of the fol-
		 lowing	values:

		 XmPIXELS  The returned	value will be the number of pixels.

		 XmMILLIMETERS
			   The	returned  value	will be	the number of millime-
			   ters.

		 Xm100TH_MILLIMETERS
			   The returned	values will be	the  number  of	 1/100
			   millimeters.

		 XmCENTIMETERS
			   The	returned values	will be	the number of centime-
			   ters.

		 XmINCHES  The returned	values will be the number of inches.

		 Xm1000TH_INCHES
			   The returned	values will be	the  number  of	 1/100
			   inches.

		 XmPOINTS  The	returned  values will be the number of points.
			   A point is a	text processing	unit defined  as  1/72
			   of an inch.

		 Xm100TH_POINTS
			   The	returned  values  will	be the number of 1/100
			   points.

		 XmFONT_UNITS
			   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  XmNhorizontalFontUnit  and  XmNvertical-
			   FontUnit.

		 Xm100TH_FONT_UNITS
			   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  XmNhorizontalFontUnit and
			   XmNverticalFontUnit.

       parse_error
		 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.

RETURN
       Returns the converted value.  If	a NULL screen, incorrect  orientation,
       or  incorrect  unit_type	is supplied as parameter data, or if a parsing
       error occurred, 0 (zero)	is returned.

RELATED
       XmConvertUnits(3), XmSetFontUnits(3), and XmScreen(3).

						     XmConvertStringToUnits(3)

NAME | SYNOPSIS | DESCRIPTION | RETURN | RELATED

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=XmConvertStringToUnits&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help