procedure
quit();
object quit_dialog : XmQuestionDialog {
controls {
Xm_Help {
! Disable the help button for now.
arguments {
XmNsensitive = false;
};
};
};
callbacks {
XmNokCallback = procedure quit();
};
arguments {
XmNmessageString = "Really Quit?";
XmNdialogTitle = "Confirm Quit";
XmNdialogStyle = XmDIALOG_FULL_APPLICATION_MODAL;
};
};
end module;
The only potential disadvantage of this method of creating dialogs is that string−to−widget lookup is slightly slower
than using a widget pointer directly. For most moderately−sized widget trees, the difference should not be noticeable.
The creation callback is a useful tool that can be especially helpful when you are prototyping an interface.
27.6 Summary
Once you've learned the basics of UIL, you can begin to take full advantage of its features. Some advanced techniques
include: defining non−Motif widgets; using lists to shorten modules and create reusable interface components, and
using UIL to rapidly prototype the interface for an application. As UIL modules grow, it is important to pay attention
to their organization. A well−organized set of modules can ease the task of editing and maintaining an interface. When
you develop a real−world application with UIL, it is also important to consider the best location for resource settings.
While most fixed resources can be set in UIL and possibly modified in application code, it is usually best to specify
values that a user might want to change in an app−defaults file.
27 Advanced UIL Programming ...