Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Next: , Previous: Lucid Resources, Up: X Resources


D.5 LessTif Menu X Resources

If the Emacs installed at your site was built to use the X toolkit with the LessTif or Motif widgets, then the menu bar, the dialog boxes, the pop-up menus, and the file-selection box are separate widgets and have their own resources.

The resource names for the menu bar contain ‘pane.menubar’ (following, as always, the name of the Emacs invocation, or ‘Emacs’, which stands for all Emacs invocations). Specify them like this:

     Emacs.pane.menubar.subwidget.resource:  value

Each individual string in the menu bar is a subwidget; the subwidget's name is the same as the menu item string. For example, the word ‘File’ in the menu bar is part of a subwidget named ‘emacs.pane.menubar.File’. Most likely, 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 the menu-bar items, write this:

     Emacs.pane.menubar.*.fontList:  8x16

This also specifies the resource value for submenus.

Each item in a submenu in the menu bar 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.)

It's impossible to specify a resource for all the menu-bar items without also specifying it for the submenus as well. So if you want the submenu items to look different from the menu bar itself, you must ask for that in two steps. First, specify the resource for all of them; then, override the value for submenus alone. Here is an example:

     Emacs.pane.menubar.*.fontList:  8x16
     Emacs.pane.menubar.popup_*.fontList: 8x16

For LessTif pop-up menus, use ‘menu*’ instead of ‘pane.menubar’. For example, to specify the font ‘8x16’ for the pop-up menu items, write this:

     Emacs.menu*.fontList:  8x16

For LessTif dialog boxes, use ‘dialog’ instead of ‘menu’:

     Emacs.dialog*.fontList: 8x16
     Emacs.dialog*.foreground: hotpink

To specify resources for the LessTif file-selection box, use ‘fsb*’, like this:

     Emacs.fsb*.fontList: 8x16

Here is a list of the specific 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.

 
 
  Published under the terms of the GNU General Public License Design by Interspire