X Version 11 (Release 6.1)

XmuCvtStringToWidget(X3xmu)


XmuCvtStringToWidget -- convert string to immediate child widget

Synopsis

cc . . . -lXmu

#include <X11/Xmu/Converters.h>

void XmuCvtStringToWidget(args, num_args, fromVal,toVal) XrmValuePtr args; Cardinal *num_args; XrmValuePtr fromVal; XrmValuePtr toVal;

Arguments


args
This sole argument is the parent Widget.

num_args
This argument must be 1.

fromVal
Specifies the string to convert.

toVal
Returns the converted value.

Description

The XmuCvtStringToWidget function converts a string to an immediate child widget of the parent widget passed as an argument.

Note that this converter only works for child widgets that have already been created; there is no lazy evaluation. The string is first compared against the names of the normal and popup children, and if a match is found the corresponding child is returned. If no match is found, the string is compared against the classes of the normal and popup children, and if a match is found the corresponding child is returned. The case of the string is significant. To use this converter, include the following in your widget's ClassInitialize procedure:

   static XtConvertArgRec parentCvtArg[] = {
     {XtBaseOffset,
     (XtPointer)XtOffset(Widget, core.parent),
     sizeof(Widget)},
   };
   XtAddConverter(XtRString, XtRWidget, XmuCvtStringToWidget,
   		 parentCvtArg, XtNumber(parentCvtArg));

References

XmuCvtFunctionToCallback(X3xmu), XmuCvtStringToBackingStore(X3xmu), XmuCvtStringToShapeStyle(X3xmu), XmuReshapeWidget(X3xmu)
Xlib - C Language X Interface


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