#include <Xm/XmP.h>void XmResolvePartOffsets (widget_class, offset) WidgetClass widget_class; XmOffsetPtr * offset;
XmPartResource resources[] = { { BarNxyz, BarCXyz, XmRBoolean, sizeof(Boolean), XmPartOffset(Bar,xyz), XmRImmediate, (XtPointer)False } };
#define BarIndex (XmBulletinBIndex + 1)
XmField(w, offset, Label , text, char *) XmPartOffset(Label , text)Therefore, you must not have any spaces after the part (Label) argument, as illustrated here:
XmField(w, offset, Label, text, char *)You can define macros for each field to make this easier. Assume an integer field xyz:
#define BarXyz(w) (*(int *)(((char *) w) + \ offset[BarIndex] + XtOffset(BarPart,xyz)))
The parameters for XmResolvePartOffsets are defined below: