The tsol_lbuild_create() routine accepts any widget, a callback function, and a null-terminated series of name and value pairs. The name represents an operation. The routine returns a variable of type ModLabelData.
The following describes the information accepted by the tsol_lbuild_create() routine:
Widget – Label Builder can build the dialog box from any widget.
Callback function – The callback function activates when the OK button is clicked. This callback function provides application-specific behavior.
Name and value pairs – The name (left) side of the pair specifies an extended operation (see Extended Label Builder Operations) and the value (right) side specifies the value. In some cases, the value is an enumerated constant. In other cases, you provide a value. The pairs can be specified in any order, but every operation you specify requires a valid value.
The return value is a data structure that contains information about the dialog box that was just created. The information comes from the tsol_lbuild_create() input parameters and user activities during execution. Label Builder provides default values for some fields where no values have been specified.
Use the tsol_lbuild_get() routine and the tsol_lbuild_set() routine to programmatically access and change the information in these name and value pairs. The data structure is described in ModLabelData Structure.
The following shows a sample call to the tsol_lbuild_create() routine:
data= tsol_lbuild_create(form, callback_function, LBUILD_MODE, LBUILD_MODE_SL, LBUILD_TITLE, "Building a Label", LBUILD_VALUE_SL, sl_label, LBUILD_VIEW, LBUILD_VIEW_EXTERNAL, LBUILD_X, 200, LBUILD_Y, 200, LBUILD_USERFIELD “/export/home/zelda”, LBUILD_SHOW, FALSE, NULL);