deoMenuTrigger
deoMenuTrigger(g_application l_args) =>l_menus
Description
Returns a list of menus to be installed in the banner of a window. The menu trigger is called when the Design Editor installs and removes the plugin. Whenever there's an application switching event, deoMenuTrigger is called again for plugins that are pluggable to the application being switched into. For example, given a plugin whose pluggableViewTypes equals schematic, the plugin is pluggable to all schematic-based applications. So, if the plugin is currently installed in a VSE window then, if you launch VSE XL in the same window the menu trigger will be called again. Also push down, or return back into another schematic cell-view, the deoMenuTrigger is called again. The default deoMenuTrigger is a no-op. It returns args->bannerMenus as is.
Arguments
Value Returned
Example
This example adds a menu My Menu at the end of the banner menu when MyPlugin is installed and removes the menu when the plugin is removed.
defclass( MyPlugin (DEPlugin) ())
defmethod( deoMenuTrigger ((this MyPlugin) args)
(if (eq args->action 'activate)
(append args->bannerMenus (myMenuTrigger args))
(when (eq args->action 'deactivate)
(setof mi args->bannerMenus (nequal mi->hiMenuSym MyMenu)))))
Return to top