XmuNewCvtStringToWidget(Xmu) 6 January 1993 XmuNewCvtStringToWidget(Xmu)
X Version 11 (Release 5)
Name
XmuNewCvtStringToWidget - convert string to immediate child widget
Syntax
cc . . . -lXmu
#include <X11/Xmu/Converters.h>
Boolean XmuNewCvtStringToWidget(dpy, args, num_args, fromVal, toVal, data)
Display *dpy;
XrmValuePtr *args;
Cardinal *num_args;
XrmValuePtr fromVal;
XrmValuePtr toVal;
XtPointer *data;
Arguments
dpy The display to use for conversion warnings.
args This sole argument is the parent Widget.
numargs This argument must be a pointer to a Cardinal containing the
value 1.
fromVal Specifies the string to convert.
toVal Returns the converted value.
data This argument is ignored.
Description
This converter is identical in functionality to XmuCvtStringToWidget,
except that it is a new-style converter, allowing the specification of a
cache type at the time of registration. Most widgets will not cache the
conversion results, as the application may dynamically create and destroy
widgets, which would cause cached values to become illegal. To use this
converter, include the following in the widget's class initialize pro-
cedure:
static XtConvertArgRec parentCvtArg[] = {
{XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.parent),
sizeof(Widget)}
};
XtSetTypeConverter(XtRString, XtRWidget, XmuNewCvtStringToWidget,
parentCvtArg, XtNumber(parentCvtArg), XtCacheNone, NULL);
See also
XmuCvtFunctionToCallback(Xmu), XmuCvtStringToBackingStore(Xmu),
XmuCvtStringToColorCursor(Xmu), XmuCvtStringToCursor(Xmu),
XmuCvtStringToGravity(Xmu), XmuCvtStringToJustify(Xmu),
XmuCvtStringToLong(Xmu), XmuCvtStringToOrientation(Xmu),
XmuCvtStringToShapeStyle(Xmu), XmuReshapeWidget(Xmu),
XmuCvtStringToWidget(Xmu)
Xlib - C Language X Interface