Specifications

Athena Widget Set libXaw 1.0.7
3.7.5. Setting Float Resources
The shown and topOfThumb resources are of type float.These resources can be difficult to get
into an argument list. The reason is that C performs an automatic cast of the float value to an
integer value, usually truncating the important information. The following code fragment is one
portable method of getting a float into an argument list.
top = 0.5;
if (sizeof(float) > sizeof(XtArgVal)) {
/*
*Ifafloat is larger than an XtArgVal then pass this
*resource value by reference.
*/
XtSetArg(args[0], XtNshown, &top);
}
else {
/*
*Convince C not to perform an automatic conversion, which
*would truncate 0.5 to 0.
*/
XtArgVal * l_top = (XtArgVal *) ⊤
XtSetArg(args[0], XtNshown, *l_top);
}
3.8. Simple Widget
Application Header file <Xaw/Simple.h>
Class Header file <Xaw/SimpleP.h>
Class simpleWidgetClass
Class Name Simple
Superclass Core
The Simple widget is not very useful by itself, as it has no semantics of its own. It main purpose
is to be used as a common superclass for the other simple Athena widgets. This widget adds six
resources to the resource list provided by the Core widget and its superclasses.
3.8.1. Resources
When creating a Simple widget instance, the following resources are retrievedfrom the argument
list or from the resource database:
Name Class Type Notes Default Value
accelerators Accelerators AcceleratorTable NULL
ancestorSensitive AncestorSensitive Boolean D True
background Background Pixel XtDefaultBackground
backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap
borderColor BorderColor Pixel XtDefaultForeground
borderPixmap Pixmap Pixmap XtUnspecifiedPixmap
borderWidth BorderWidth Dimension 1
colormap Colormap Colormap Parent’sColormap
cursor Cursor Cursor None
cursorName Cursor String NULL
46