rgb, single_float, string, string_table,
translation_table, wide_character, xbitmapfile
_ Programmer−defined symbols, also called identifiers, are used to name the variables, procedures, lists, and widgets
that you define in a UIL module. For the most part, you can choose any name that you like for these items, although
the UIL compiler imposes three rules:
A name must be unique within a module.•
A name must begin with one of the characters A−Z, a−z, $, or _ and may contain these characters as well as
the digits 0−9.
A name must be no longer than 32 characters.•
Based on these rules, you can see that Alpha, $money, _tab, and moon44 are legal identifiers, while the following
symbols are not: 1993, 3DogNight, next−char, and ask_the_user_to_save_her_work_callback.
23.3.6 Sections of a UIL Module
The main body of a UIL module is divided into several sections that group the different types of definitions and
declarations. Each section begins with the section name and ends at the start of the next section. The list below gives a
brief overview of the five sections supported by UIL: object, value, identifier, procedure, and list.
An object section defines the widget hierarchy and widgets in a user interface. The widget definitions may
include initial resource and callback settings. The other four sections are used to define named items that you
use for these settings. The object section is covered in detail in Section #suilobject.
A value section contains definitions of variables used as resource settings in an object section or as the
client_data argument to callbacks specified in the module. You can also retrieve most values directly
from an application. UIL supports value types for almost every type of resource that can be specified in a
widget definition. The value section is described in Section #suilvalue.
An identifier section contains declarations of variables defined in the application program. Identifiers
can represent values that do not have a corresponding UIL type or cannot be determined until run−time. The
identifier section is explained in Section #suilident.
A procedure section contains declarations of callback procedures that are used in the application program.
Any routine specified as a callback in an object section must be declared in a procedure section. The
procedure section is covered in Section #suilproc.
A list section defines lists of resource settings, callback settings (for different callbacks), callback
procedures (for a single callback), and widget children. It is often convenient to define lists of commonly used
settings. The list section is described in Section #suillist.
These different sections help to organize a UIL module and make it easier for the UIL compiler to parse a module.
Unlike larger applications, the source code only contains value, procedure, and object sections. Without
describing the syntax of these sections in detail, we'll look at how they are used in this module. The first section in the
source code is a value section that defines a symbolic constant:
form_margin : 3;
This section defines form_margin, whose value is the integer 3. You can place more than one definition in a
value section. As you can see in the module, the second value section defines three more constants: the string
hello_string, the font hello_font, and the pixmap world_icon. Although we've only defined integer,
string, font, and pixmap values, UIL supports a number of additional data types. The complete set is described in
23 Introduction to UIL 23.3.6 Sections of a UIL Module