Custom Menus

From Jmol
Revision as of 20:17, 21 January 2008 by AngelHerraez (talk | contribs) (start this page by bring here content that was in Recycling Corner)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Custom pop-up menus

Starting on v. 11.3.15, Jmol (both application and applet) allows a customized pop-up menu instead of the standard default menu. Custom menus are defined using plain-text files according to certain syntax and rules.

  • To open the application with your own menu, use
-m myMenu.mnu

as a command-line parameter.

  • To insert the applet with your own menu, use
param=menuFile value="myMenu.mnu"

as one of the parameters of the applet or object tag.

  • To start the applet with your own menu, use

prior to JmolApplet()

  • To switch to your own menu on the applet via scripting, use
load menu myMenu.mnu   (may need quotes around the filename)

To get back the default menu, use an empty string:

load menu ""
  • Also available: show menu and getProperty "menu".
  • Documentation for building custom pop-up menus (future link; for now, see inside Jmol.mnu).

Default menu is built using this: Jmol.mnu

An example of custom menu: test.mnu

If you design a new menu, please share it in the Custom pop-up menus section within Recycling Corner.