Changing Enumeration Information

Enumeration set definitions register the named constants used in Builder Xcessory to specify some resource values. Typically these are integer values in some finite range. For example, under the EnumerationSet section of the WML file you might make the following definition.

!
! UIL Enumeration Sets
!
EnumerationSet
ArrowDirection : integer
{
XmARROW_UP;
XmARROW_DOWN;
XmARROW_LEFT;
XmARROW_RIGHT;
};

where XmARROW_UP, XmARROW_DOWN, XmARROW_LEFT, and XmARROW_RIGHT correspond to enums or #defines in C code.

In the resource section of the WML file, you can define a resource:

Resource
XmNarrowDirection : Argument
{
Type = integer;
EnumerationSet = ArrowDirection;
};

For more information see the "Enumeration Set Definitions" in the OSF/Motif Programmer's Reference.

Builder Xcessory supports the following syntax:

<identifier>:"<double quoted string>" = <integer>

For example:

EnumerationSet
ArrowDirection : integer
{
XmARROW_UP:"ARROW_UP"=0;
XmARROW_DOWN:"ARROW_DOWN"=1;
XmARROW_LEFT:"ARROW_LEFT"=2;
XmARROW_RIGHT:"ARROW_RIGHT"=3;
};

If you omit the =<integer> from an EnumerationSet entry, Builder Xcessory assumes its value to be one greater than the preceding value. The initial value is assumed to be zero.

Documentation: