- set a named widget resource to
a named value.
void XmtSetValue(Widget w, String resource,
void XmtSetTypedValue(Widget w, String
resource, String type, String value)
- The widget that is to have its resource set.
- The name of the resource to set.
- For XmtSetTypedValue() only, the representation type of the
- The value of the resource, as a string. These functions will automatically
convert the string to its appropriate form.
are procedures designed for
use in resource files with the Xmt String-to-Callback converter. They allow
you to set a named widget resource to a value specified as a string.
takes a widget, the name of a resource, and the value of
the resource, expressed as a string. It queries the widget to determine the
type of the named resource, converts the specified string value to that type,
and then calls XtSetValues()
to set the resource on the widget.
is a similar function, except that it takes a widget,
resource name, resource type, and then the resource value expressed as a
string. This version of the function is necessary for those resources, such as
resource of the XmText widget (in Motif 1.1), that are
implemented within subparts of the widget, rather than as part of the main
resource list for the widget. For these resources, the type must be specified
explicitly because Xmt cannot determine the resource type by examining the
widget's internal resource list.
, the resource type is a ``representation type''
such as XtRString
. The values of these symbolic
constants are the strings ``String'' and ``Int''. In general, there is no good
way to know when you need to use XmtSetTypedValue()
. Your widget documentation might tell you, or you might
see a warning message when you call XmtSetValue()
Chapter 10, Callbacks in Resource Files