Product Documentation
Cadence Application Infrastructure SKILL Reference
Product Version IC23.1, November 2023

lmgrCreateMenuItem

lmgrCreateMenuItem( 
t_itemName 
t_itemType 
l_itemAttributes 
) 
=> t / nil 

Description

Creates an instance of a menu item, which should be populated into a single menu. Once this menu item is created, you can install it into a menu using lmgrAddMenuItems().

There are four types of menu items: simple, toggle, radio, and separator. simple is a normal menu item, toggle is a menu item with a tick box next to it, separator is a line to draw between menu items. You define one radio item for each choice in the set of radio options. All the radio items in the set must be collected in their own pull-down menu or submenu.

This SKILL API can be used in cdsLibMgr.il only.

Arguments

t_itemName

A unique global name to reference this menu item.

t_itemType

A standard type, one of simple, toggle, radio, separator.

l_itemAttributes

List of tagged elements consisting of name value pairs for the following attributes. None of these attributes are valid for separators:

  • label: Paired value is the string displayed by this item. This attribute is mandatory except when the item type is separator.
  • mnemonic: Paired value is a string representing the character mnemonic to use with this object.
  • accelerator: This attribute is not supported in the current release.
  • font: Paired value is a string for the font to use for this particular item. If this attribute is not specified, or if nil or an empty string is specified, the global default fonts are used.
  • callback: Paired value is the callback list defining the action, if any, and the interpretation of results, which will be called when activating this menu item. See the previous section describing callback definitions. For radio items, when the item is selected through the user interface, the callback for both the item being selected and the item being deselected is started.

Value Returned

t

All arguments were processed without error.

nil

An error occurred. In this case, the menu item will not be created.

Examples

lmgrCreateMenuItem ( "myMenuItem1" "simple"
'( ( "label" "Do My Thing" )
( "callback" ( "myThingCallback" ) )
)
) => t

To set menu access key in Library Manager:

lmgrCreateMenuItem(
"myfunc" 
"simple" 
list(list("label" "My Function2") list("mnemonic" "F") )
)
lmgrCreateMenu( "my_pulldown" list(list( "label" "My Pulldown" ) list( "mnemonic" "P") ) )
lmgrAddMenuItems("my_pulldown" "LCV" list("myfunc"))
lmgrAddMenuItems("" "" list("my_pulldown"))

Related Topics

Callback Definition List

lmgrCreateMenuItem

lmgrInsertMenuItems

lmgrAddMenuItems


Return to top
 ⠀
X