To change resource information, change the resource definition in the WML file. While reading the following sections, please refer to the OSF/Motif Programmer's Guide, Release 1.2.
The resource specification tells Builder Xcessory how to manipulate a resource for a widget or component. Resources are globally defined, but specific classes can override various resource attributes. In addition to the OSF/Motif Programmer's Reference resource directives, many new directives are also supported.
Note: In the discussions of grammar in the following sections, the construction "A | B | C" means "one of the values A, B, or C".
A resource is specified in the WML file as follows:
<resourcetype> can have one of the following values:
Argument Specifies a simple attribute of an object class. Builder Xcessory presents this resource in the Resource Editor list of any instance of any object class that uses the resource.
Constraint Specifies a constraint attribute of an object class. Builder Xcessory presents this resource in the Resource Editor list of any child of the object class that uses the resource.
Reason Defines an Xt-style callback.
VkReason Defines a ViewKit-style callback.
Additionally, the value SubResource is parsed by Builder Xcessory and the other tools, but is unused.
The name-value pairs for the Resource Attributes follow. The same values are also used for the Resources section in a Class definition, where they override, for a specific class, the general attributes of a resource; differences between the two are noted where they exist: (Attributes marked as Not Used are read by Builder Xcessory, but have no effect.)
Note: Values unused by Builder Xcessory are not guaranteed to be written to generated WML files.
The following sections define the Builder Xcessory resource directives listed in the previous table. Builder Xcessory does not use all attributes. In particular, some attributes are retained by Builder Xcessory only for backward compatibility. Also, Builder Xcessory may use some attributes marked Not Used in the OSF WML documentation.
Some values are used by Builder Xcessory to control how Builder Xcessory manipulates or displays the resource, while closely-related values are used by the code generator to emit code that manipulates the widgets or class components.
Specifies that the resource is displayed in Resource Editor when the view option is set to All Resources.
If unspecified, the value is True.
AllowEmptyValue = True | False;
Specifies that a "NULL" string is a valid value for the resource and should not be interpreted as resetting the value to its default value.
If unspecified, the value is False.
Unused. Maintained for backward compatibility.
Specifies that Builder Xcessory should always save the value of the resource to the save file.
If unspecified, the value is False.
AlwaysSetValues = True | False;
Builder Xcessory and Code Generator.
When setting the resource value internally and in generated code, Builder Xcessory never passes the value to the creation routine. Rather, the resource value is set after the object has been created.
If unspecified, the value is False.
Specifies that the resource can be specified in an application defaults file.
If unspecified, the value is True.
AugmentDefault = "DefaultValue";
Unused. Maintained for backward compatibility.
Unused. Maintained for backward compatibility.
CallbackFunc = "FunctionName";
Unused. Maintained for backward compatibility.
Specifies that the resource can be hard-coded in the generated source code.
If unspecified, the value is True.
Used only for Constraint resources. Specifies whether the resource should be set when an object is created.
If unspecified, the value is False.
A misnomer. Specifies that the resource is displayed in Resource Editor when the view option is set to Modified Resources.
If unspecified, the value is True.
Indicates the default value of the resource.
Unused. Maintained for backward compatibility.
Unused. Maintained for backward compatibility.
EnumerationSet = EnumerationSetName;
Defines the EnumerationSet to use as the set of values for this resource. For example, the XmForm constraint resource XmNbottomAttachment uses the enumeration set name "Attachment" as the set of all possible values.
If unspecified, Builder Xcessory uses a text field for the user to enter the resource value, not a One of Many editor.
Indicates that Builder Xcessory should hide this resource. This attribute is used only in a Class specification's Resources section. For example, the XmNautoUnmanage resource that all subclasses of XmBulletinBoard use is only used when the widget is a dialog variant (XmFormDialog versus XmForm). In the Resources section of XmForm, the XmNautoUnmanage resource is set to Exclude = True to hide the resource.
If unspecified, the value is False.
Specifies a string to print instead of allowing a resource value to be set. For example, the XmNchildren resource is not allowed to be set, so Excuse is set to Read Only.
If unspecified, the resource value can be set.
Specifies whether or not the resource can be exposed when creating class components in Builder Xcessory.
If unspecified, the value is True.
Unused. Maintained for backward compatibility.
FreeConvert = "MemoryFreeFunctionName";
Specifies the function to call in the generated code in order to free values for this resource that are converted from string values using an Xt-style converter.
Functions that can be used in this way are void functions taking a single argument of a pointer to the type to be freed.
If unspecified, converted values are not freed in generated code. In most cases, this is the desired behavior. However, some widgets copy certain resource values (such as the XmLabel with values of the XmNlabelString resource), so that memory allocated by the converter needs to be freed.
Unused. Maintained for backward compatibility.
Unused. Maintained for backward compatibility.
Unused. Maintained for backward compatibility.
Specifies that a given resource should not appear in the resource list of instances of a particular class.
If unspecified, the resource is listed where appropriate.
Unused. Maintained for backward compatibility.
InternalLiteral = "SymbolName";
Unused. Maintained for backward compatibility.
Tells Builder Xcessory not to free memory allocated when this resource is set internally.
If unspecified, Builder Xcessory frees the internally allocated memory.
Unused. Maintained for backward compatibility.
LangDir = "C" | "CXX" | "VK" | "JAVA" | "C_UIL";
Indicates the code generation language for which this resource can be used.
If unspecified, the resource is assumed to be available for all languages other than Java.
LastWordConvert = True | False;
Use the last "word" of the enumeration symbol name of the current value of this resource as the string value in an application defaults file. The last word begins at the last capitalized letter in the symbol name and continues to the end of the symbol name. This is very rarely used.
If unspecified, the value is False.
MethodName = "MethodNameString";
The name of the class method to use to set the value of this resource on an instance of a class object. The set method has no return value and takes one argument--the value to set.
If MethodName is unspecified, the code generator uses the TclAttributeScript of the object class to set values. If neither of those is set, the code generator uses XtSetValues on the widget or the top-level widget of a C++ component.
Tells Builder Xcessory to never set the resource value.
If unspecified, Builder Xcessory always tries to set the value on the object instance in question.
Indicates that Builder Xcessory should accept the value entered by the user as the value for the resource and not attempt to fetch the resource value from the object instance after setting it.
OverrideDefault = "DefaultValue";
Indicates that Builder Xcessory should not allow the user to set this resource value and to display the given DefaultValue as the resource value. This is only set on resource specifications in the Resources section of a Class specification.
Specifies that the resource is displayed in Resource Editor when the view option is set to Programmer Resources.
If unspecified, the value is False.
ReadInitialValue = True | False;
Unused. Maintained for backward compatibility.
Indicates that the resource cannot be set by the user. Its value is displayed by Builder Xcessory.
Indicates that Builder Xcessory must recreate the object instance whenever it sets this resource value. Essentially, this is used to indicate creation-time only resources.
RecreateParent = True | False;
Indicates that Builder Xcessory must recreate the object instance's parent whenever it sets this resource value.
Builder Xcessory and Code Generator.
Names a resource for which this resource acts as a counter.
Names a XmFontList resource that provides the font tags used by this XmString resource.
Unused. Maintained for backward compatibility.
SetRoutine = "SetEnabled" | "SetListResource" | "SetFormAttachment" | "SetFormOffsetPosition" | "SetRecomputeSize" | "SetSensitive" | "SetTearOffModel";
Tells Builder Xcessory to use one of several special routines to set this resource. Avoid using this attribute.
Specifies that the resource is displayed in Resource Editor when the view option is set to Simple Resources.
If unspecified, the value is False.
Specifies a tcl function that the code generator should call when generating source code to set this resource value.
ThrowAwayOnPaste = True | False;
Indicates that Builder Xcessory should not try to set this resource value when pasting an instance of an object class that originally set this resource value.
Builder Xcessory and Code Generator.
Matches the resource to a defined data type. Builder Xcessory uses this attribute to determine default attributes for the resource as well as to match the resource to an editor. This attribute is required.
TypeName = "ConverterTypeName";
Builder Xcessory and Code Generator.
This value is the to_type used by XtConvertAndStore. Builder Xcessory and the code generator use this when converting strings to actual resource values. For example, the basic widget resource XmNheight has a TypeName of "Dimension".
TypeSize = sizeofBoolean | sizeofChar | sizeofDouble | sizeofFloat | sizeofInt | sizeofLong | sizeofPointer | sizeofShort;
Indicates the size in bytes of the variable that holds the value of this resource. The actual size of the type is determined dynamically by Builder Xcessory, and can vary from platform to platform. It is important that this size be correct for each resource so that Builder Xcessory can allocate sufficient space to hold a resource value and also so that values can be correctly interpreted.
UnderScoreConvert = True | False;
Use the last "word" preceded by an underscore character (_) of the enumeration symbol name of the current value of this resource as the string value in an application defaults file. This is very rarely used.
If unspecified, the value is False.
If this resource value is changed, forces the Resource Editor to update all the displayed data.
The extended editor for this resource presents a list of all of the shells currently instantiated by Builder Xcessory.
The extended editor for this resource never lists the object instance for which this resource is being set.
The extended editor for this resource presents a list of all of the object instances currently instantiated by Builder Xcessory.
WlUseClasses = ClassName [ | ClassName... ];
The extended editor for this resource presents a list of all of the object instances of the given object classes currently instantiated by Builder Xcessory.
The extended editor for this resource presents a list of all of the grandchildren of the object instance for which this resource is being set.
The extended editor for this resource presents a list of all of the siblings of the object instance for which this resource is being set.