adds an action to examples submenu.
add the menu or menuitem to the menu. separators will be added.
add the menu or menuitem to the actions menu.
request that the menu be rebuilt.
encode font into string like "sans-12". This is a copy of Autoplot's DomUtil.encodeFont.