
The File menu for dynapix.c with accelerators
These resource settings work because XmNaccelerator and XmNacceleratorText were not hard−coded by
the application. By the same token, the labels of the MenuBar titles and the menu items in the PulldownMenus are
hard−coded values that cannot be modified through resources. To relax this restriction, you could try setting the
label and mnemonic parameters to NULL in calls to XmVaCreateSimplePulldownMenu(). Unfortunately,
this technique makes resource specification awfully messy, since the CascadeButtons in the MenuBar and the various
PulldownMenus all have names of the form button_n. The other alternative is to use the more advanced methods of
menu creation that are described in Chapter 15, Menus.
The MainWindow provides a few other resources that control different visual attributes: -XmNshowSeparator,
XmNmainWindowMarginWidth, and XmNmainWindowMarginHeight. The XmNshowSeparator resource
controls whether or not Separator widgets are displayed between the different areas of a MainWindow. The margin
resources specify the width and height of the MainWindow's margins. Generally, these resources should not be set by
the application, but left to the user to specify. For example:
*XmMainWindow.showSeparator: True
*XmMainWindow.mainWindowMarginWidth: 10
*XmMainWindow.mainWindowMarginHeight: 10
The class name for the MainWindow widget is XmMainWindow. If these ...