The User Interface Language (UIL) allows an application developer to separate the specification of particular widget hierarchies from the application source code. The application defines widgets and their characteristics in a text file, which the developer compiles into a User Interface Definition (UID) file in binary format. At run time the application, using Motif Resource Manager (MRM) routines, retrieves the widget descriptions from the binary file, and MRM creates the widgets from these descriptions. The application defines callback procedures and interacts with the widgets as if it were using the Motif toolkit alone.
UIL offers several advantages over toolkit-only applications:
An application that uses UIL has two separate components: the UIL file and the application program.
The UIL file consists mainly of definitions of the application's widget hierarchy. The declaration for each widget typically includes the following components:
The UIL file can also define values for data such as compound strings, colors, and icons.
The structure of the application program is similar to that of a toolkit-only program. The chief difference is that, instead of explicitly creating each widget, the program uses MRM routines to retrieve widget definitions from the UID file and to create the widgets themselves. The program might also use MRM routines to retrieve data values defined in the UIL file. An application program using UIL must take the following actions: