
The Hello, World user interface
The icon Label and the PushButton are contained in a Form, which manages their positions. As in a typical Motif
program, an ApplicationShell at the root of the hierarchy contains the Form. A diagram of the hierarchy appears in the
figure.
The Hello, World widget hierarchy
23.3 Describing an Interface With UIL
An interface description in a UIL module consists of three things:
The widget hierarchy•
The initial resource settings of the individual widgets, which define the "look" of the interface•
The callbacks invoked in response to user actions, which define the "feel" of the application•
The UIL module for the "Hello, World" application is shown in the source code This module defines the widget
hierarchy starting at the Form. Its parent ApplicationShell is created by the C program, which we'll examine later. This
division is typical for an application that creates its interface with UIL because at least one widget must be created by
the program to be used as a parent for the UIL−defined widgets.
/* hello_world.uil −− Illustrate basic UIL programming concepts */
module hello_world
objects = { XmPushButton = gadget; }
23 Introduction to UIL 23.3 Describing an Interface With UIL
631