Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

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

g_application

Specifies an instance (stdobj) of the plugin

l_args

Single argument, which is a disembodied property list. The trigger argument (l_args) for DE plugin is similar to the Trigger argument given to DE main application triggers. In addition to the properties for DE main application menu triggers, two new values are added for the args->action property, they are 'activate, and 'deactivate. These are used for installing and removing a plugin in a window, respectively. args->bannerMenus equals the list of menus in the main window when the menu trigger is called.

Value Returned

l_menus

Returns a list of menus to be installed in the banner

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))

;; else

(when (eq args->action 'deactivate)

(setof mi args->bannerMenus (nequal mi->hiMenuSym MyMenu)))))


Return to top
 ⠀
X