X Version 11 (Release 6.1)

XmuNewCvtStringToWidget(X3xmu)


XmuNewCvtStringToWidget -- convert string to immediate child widget

Synopsis

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.

num_args
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 procedure:
static XtConvertArgRec parentCvtArg[] = {
  {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.parent),
   sizeof(Widget)}
};

XtSetTypeConverter(XtRString, XtRWidget, XmuNewCvtStringToWidget, parentCvtArg, XtNumber(parentCvtArg), XtCacheNone, NULL);

References

XmuCvtFunctionToCallback(X3xmu), XmuCvtStringToBackingStore(X3xmu), XmuCvtStringToColorCursor(X3xmu), XmuCvtStringToCursor(X3xmu), XmuCvtStringToGravity(X3xmu), XmuCvtStringToJustify(X3xmu), XmuCvtStringToLong(X3xmu), XmuCvtStringToOrientation(X3xmu), XmuCvtStringToShapeStyle(X3xmu), XmuReshapeWidget(X3xmu), XmuCvtStringToWidget(X3xmu)
Xlib - C Language X Interface


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004