Skip to Main Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced content levelIntermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
/* trivial.uil −− Illustrate a minimal widget declaration. */
module trivial
object root : XmPushButton { };
end module;
The widget definition in the source code consists of three parts, not including the object keyword. The definition
begins with the widget name, which is a programmer−defined identifier. The name of the widget in this example is
root. The type of widget follows the name; a colon separates the name and the type. Legal widget types include all
of the standard Motif widgets as well as the names of specific instances of Motif widgets, such as XmMenuBar (a
RowColumn) or XmQuestionDialog (a MessageBox). You can find a complete list of widget type names in
Appendix D, Table of UIL Objects, of Volume Six B, Motif Reference Manual. UIL also supports non−Motif
widgets with the user_defined type, which we explain later in Chapter 26, Advanced UIL Programming. The
last, and usually largest, part of a widget definition is made up of the widget attributes. In our simple definition, we do
not specify any attributes, but even so, we must include the curly braces that would surround them. Widget definitions
always end with a semicolon.
After compiling the module, we can display its output with the showuid program. The following two commands
accomplish these steps:
uil −o trivial.uid trivial.uil
showuid trivial
You don't need to use the −root option because the PushButton uses the default ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431