The kforms library is part of CLUI Services; note, however, that CLUI services is a private service -- it is not meant for direct use by applications, and is not documented in the Programming Services Manuals. The public routines in kforms are used by the kcodegen, kclui, and xvforms libraries; some are are automatically generated in the source code of Khoros programs.
The function of the kforms library (libkvf.a) is to translate a UIS file into an internal data structure called a form tree which can be used by programs to deal with either their command line or graphical user interface. Using the kforms library, form trees can be created from UIS files, the attributes of CLUI arguments (or GUI selections) represented in the form tree can be queried or changed, and UIS files can be written out according to the current form tree configuration. Form trees can be modified according to a command line string, and a command line strings can be constructed from the form trees.
The kcodegen library, which handles the GUI and CLUI counterparts of Khoros programs as specified in their *.pane files, utilizes the kforms library to create and maintain the form trees which represent those user interfaces. In this way, it is able to do the work necessary for printing program usages, interactive prompting, command line checking, and so on; the same form tree is used to generate the code and documentation for the program when ghostwriter is run. Similarly, the kforms library supplies the kcodegen library with form trees representing the GUI's of xvroutines as specified in their *.form files, so that the appropriate code can be generated when conductor is run.
The xvforms library is the most extensive user of kforms library; internally, a graphical user interface is also represented as a form tree. The form tree for a graphical user interface differs from that for a command line user interface in that all the fields representing the visual objects that comprise the GUI are no longer NULL. Thus, the kforms library does all the "non-X-windows-display-related" work associated with the GUI, while the xvforms library does all the creation and maintanance of the visual objects associated with a GUI.
Cantata also uses the kforms library heavily, to translate glyphs into their corresponding command line program executions and vice versa. Guise uses the kforms and xvforms libraries together in the creation and manipulation of graphical user interfaces.
$BOOTSTRAP/objects/library/kforms/src
$BOOTSTRAP/include/kforms/kforms.h
#include <bootstrap.h>