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.