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
compiler knows if a widget allows children, and for those that do, which widget types can be created as their children.
If you try to include a child widget where it isn't allowed or supported, the UIL compiler generates an error message
and the compilation fails, which is one of the advantages of describing a user interface in UIL rather than with a
programming language like C.
You set widget resources, with the exception of callbacks, in a widget's argument subsection. This subsection in the
hello_main widget illustrates several typical resource settings. We used a symbolic constant to set the last two
resources so that it is easy to adjust the Form margins by changing the constant definition.
Callback resource settings are specified separately from other resources in the callbacks subsection of a widget
definition. The hello_main widget does not have any callbacks, but the PushButton does. Here's the relevant part
of its definition:
object hello : XmPushButton
{
! ... arguments ...
callbacks {
XmNactivateCallback = procedure quit ("Goodbye!");
};
};
This subsection sets the PushButton's activate callback to the quit() procedure declared earlier in the module. The
string argument "Goodbye!" is passed as client_data to the procedure when the callback is invoked. You'll see
how this value is used later when we explain registering callback procedures with Mrm.
The widget definitions, along with the value definitions and procedure declaration, are all there is to the "Hello,
World" module. ...
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