these widgets are short, they are defined in the body of the search_panel definition instead of in separate object
sections. In contrast, the size of the search_panel itself makes it too large to place in the Form parent without
making the module unreadable.
26.1.2 The Menu System
Even though the MenuBar for this application contains only a few entries, there are still enough widgets to make it
worthwhile to define the menu system in a separate UIL module. This technique makes sense for most applications.
The general widget hierarchy for a MenuBar is basically the same for all applications. The top−level widget is the
MenuBar; it contains a CascadeButton for each menu. The editor application provides File, Edit, and Search menus.
A PulldownMenu is associated with each CascadeButton and contains the individual menu entries. The definition of
the menu system for the editor program is shown in the source code
! menubar.uil − editor application main window MenuBar definitions
module editor_menubar
objects = {
XmLabel = gadget;
XmCascadeButton = gadget;
XmPushButton = gadget;
XmToggleButton = gadget;
XmSeparator = gadget;
}
include file 'procedures.uih';
object menubar : exported XmMenuBar {
controls {
XmCascadeButton file;
XmCascadeButton edit;
XmCascadeButton search;
};
};
object file : XmCascadeButton {
controls {
file_menu : XmPulldownMenu {
controls {
XmPushButton open;
XmPushButton save;
XmSeparator { };
XmPushButton exit;
};
};
};
arguments {
XmNlabelString = "File";
XmNmnemonic = ...