implement filemenu_item_index() for menu editors.