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
User interface of quitbox.uil
The Quit PushButton manages the dialog, which causes it to be displayed. Pressing the OK PushButton exits the
application. There is no need to use the unmanage() callback in this example, as the Cancel PushButton unmanages
the dialog by default. You can easily apply the manage() and unmanage() callbacks to other dialogs in an
interface.
27.5.2 Creating Widgets
In the source code the entire user interface is defined in a single widget hierarchy. This technique is fine for a small
application, but for performance reasons it is not practical in a larger application. Creating a separate hierarchy for
each window allows you to divide an interface into separate modules, as discussed earlier in this chapter. The only
drawback to distributing dialog creation is that it takes longer for a dialog to appear the first time it is displayed. Since
this delay is typically not noticeable, we still recommend this approach.
You can support the as−needed dialog creation policy in UIL by adding another callback that creates a widget
hierarchy. A new widget hierarchy is created by calling MrmFetchWidget(). As a reminder, this function takes the
following form:
Cardinal
MrmFetchWidget(hierarchy, widget_name, parent, widget_return,
class_return)
MrmHierarchy hierarchy;
String widget_name;
Widget parent;
Widget *widget_return;
MrmType *class_return;
A creation callback needs three values ...
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