D.4 Motif Menu X Resources
If Emacs is compiled with the X toolkit support using Motif or LessTif widgets, you can use X resources to customize the appearance of the menu bar (see Menu Bar), pop-up menus, and dialog boxes (see Dialog Boxes). However, the resources are organized differently from Lucid widgets.
The resource names for the menu bar are in the βpane.menubarβ class, and they must be specified in this form:
Emacs.pane.menubar.subwidget.resource: value
For pop-up menus, the resources are in the βmenu*β class, instead of βpane.menubarβ. For dialog boxes, they are in βdialogβ. In each case, each individual menu string is a subwidget; the subwidgetβs name is the same as the menu item string. For example, the βFileβ menu in the menu bar is a subwidget named βemacs.pane.menubar.Fileβ.
Typically, you want to specify the same resources for the whole menu bar. To do this, use β*β instead of a specific subwidget name. For example, to specify the font β8x16β for all menu bar items, including submenus, write this:
Emacs.pane.menubar.*.fontList: 8x16
Each item in a submenu also has its own name for X resources; for example, the βFileβ submenu has an item named βSave (current buffer)β. A resource specification for a submenu item looks like this:
Emacs.pane.menubar.popup_*.menu.item.resource: value
For example, hereβs how to specify the font for the βSave (current buffer)β item:
Emacs.pane.menubar.popup_*.File.Save (current buffer).fontList: 8x16
For an item in a second-level submenu, such as βComplete Wordβ under βSpell Checkingβ under βToolsβ, the resource fits this template:
Emacs.pane.menubar.popup_*.popup_*.menu.resource: value
For example,
Emacs.pane.menubar.popup_*.popup_*.Spell Checking.Complete Word: value
(This should be one long line.)
If you want the submenu items to look different from the menu bar itself, you must first specify the resource for all of them, then override the value for submenus alone. Here is an example:
Emacs.pane.menubar.*.fontList: 9x18
Emacs.pane.menubar.popup_*.fontList: 8x16
To specify resources for the LessTif file-selection box, use βfsb*β, like this:
Emacs.fsb*.fontList: 8x16
Here is a list of resources for LessTif menu bars and pop-up menus:
armColorβ
The color to show in an armed button.
fontListβ
The font to use.
marginBottomβ
marginHeightβ
marginLeftβ
marginRightβ
marginTopβ
marginWidthβ
Amount of space to leave around the item, within the border.
borderWidthβ
The width of the border around the menu item, on all sides.
shadowThicknessβ
The width of the border shadow.
bottomShadowColorβ
The color for the border shadow, on the bottom and the right.
topShadowColorβ
The color for the border shadow, on the top and the left.