XmuCvtStringToWidget(X3xmu) X Version 11 (Release 6.1)


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


30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.