Generating WML and Other Control Files

Control files

Your new widgets are now available to Builder Xcessory. Builder Xcessory uses the following control files to know what to do with the widgets:

  • Widget Meta Language (WML) file

    Describes the widget's position in the class hierarchy as well as all the resources used by the widget.

  • Catalog file
  • Pixmap Icon file
  • TCL files
  • Collection files

Refer to Chapter 8--Modifying the WML File and to Chapter 9--Creating Other Control Files for more detailed information about control files.

Builder Xcessory Object Packager

The catalog and WML files are the primary control files. The Builder Xcessory Object Packager is a tool designed to help you create and modify these files. For more detailed information about the Builder Xcessory Object Packager, refer to Chapter 7--Using the BX Object Packager. You can use the Builder Xcessory Object Packager on all systems. On most systems, the Object Packager can read the shared library containing your widgets. You can set the Object Packager to determine the resources for those widgets and write them out to the WML file. Refer to Chapter 8--Modifying the WML File for more detailed information.

On systems running SunOS 4, you must link the widget class library to the bx.o widget file, as described in "Building a new Builder Xcessory executable" .

Generating Files

To generate the files on systems running SunOS 4, use the following command:

% bx50 -load [-system] [-force]

Flags

The following table describes each flag:

 
Flag  Description 
-load Tells Builder Xcessory to generate the description files.

Note: You must use the -load option.

-system Tells Builder Xcessory to create the description files in the directory structure where Builder Xcessory is installed. If you do not specify the -system flag, the widget description files are created in ${HOME}/.builderXcessory.

Note: The -system flag is optional.

-force  Tells Builder Xcessory to generate all of the widget description information regardless of whether it already exists or not. You would typically use this option if the widget description files have become corrupted for some reason.

Note: The -force flag is optional.

 

In general, running bx50 -load multiple times is not a problem, because Builder Xcessory adds definitions only for those widgets that it does not find (unless the -force flag is specified).

When Builder Xcessory generates the WML file, it is located in either {BX}/xcessory/wml or ${HOME}/.builderXcessory/wml, and named local.wml.

Modifying WML Files

ICS has extended the base syntax for WML (Widget Meta-Language, described -1142 of the OSF/Motif Programmer's Reference for Release 1.2) to allow its use with Builder Xcessory. Refer to Chapter 8--Modifying the WML File for more detailed information.

Because not all widgets are written to be manipulated by an interface builder, you must test all resources added by the new widget to make sure they behave as expected. Much of a widget's behavior in Builder Xcessory is customizable through Builder Xcessory's extensions to WML. Test each resource, decide what to change about its behavior, and make the appropriate changes to the Builder Xcessory-produced WML file.

Documentation: