Jmol community,
Here's a simple example of a context menu in JSmol:

http://www.metallacycle.com/play/netmol/tests/popupMenu/popupMenu.html

Dig into the document ready function and jmolPopupMenu.js for details. The
whole kit and kaboodle (including jQueryUI menu, which I used to handle the
visuals) is 165 KB at the moment. The JS file adds Jmol.Menu with its
associated functions:

initializeMenu
menuAddItem(menu, item)
menuRemoveItem(menu, itemId)
menuAddSubmenu(menu, submenu)
menuAddSeparator(menu)
menuEnableItem(menu, itemId, boolEnable)

Should the "items" sent to menuAddItem, etc. just be HTML, or something
more abstract like Javascript objects? There are no jQueryUI objects for
things like radio groups and checkboxes...these would have to be handled by
us somewhere on the path from abstract menu object to final rendered menu.
Would be interested to hear your thoughts on the best way to implement
addItem.

Cheers, Mike

---
Michael Evans
Organic Chemistry Graduate Student, Moore Group
University of Illinois, Urbana-Champaign
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to