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

lmgrCreateMenu

lmgrCreateMenu( 
t_menuName 
l_menuAttributes 
) 
=> t / nil 

Description

Creates a structure for a menu, which can be populated with menu items. Once this menu is created, you can install it into the top menu bar or into another parent menu using lmgrAddMenuItems.

You can specify a predefined menu name in order to change its label or to add a single map callback attribute to a predefined menu.

A map callback must finish its execution quickly. Lengthy callback options are automatically ignored. Additionally, the Library Manager may choose to not wait for map callbacks to finish if callbacks require more than 5 seconds elapsed time. The reason behind these restrictions is that the X Window System remains locked for all other programs while a map callback is being processed. Efficient shared usage necessitates fast and efficient execution of map callbacks.

The predefined name pop-up refers to all pop-ups started from the main selection lists. The label and font attributes have no significance within a pop-up menu. This mechanism exists only to allow spThis SKILL API can be used in cdsLibMgr.il only.ecifying the map callback of pop-ups.

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

Arguments

t_menuName

A unique global name to reference this menu.

l_menuAttributes

List of tagged elements consisting of name-value pairs for the following attributes:

label

Paired value is the string displayed with this menu. This attribute is mandatory when specifying a custom (non predefined) menu.

font

Paired value is a string for the font to use for this particular menu. If this attribute is not specified, or if nil or an empty string is specified, the global default fonts are used.

mapCallback

Value is the callback list defining the action, if any, which will be called directly before mapping the menu.

unmapCallback

Helps to identify active callbacks when a button is activated without any menu. For the popup menus, combine this attribute with a matching map callback to identify the active menu for any button.

You can call unmap in the following way:

list("unmapCallback" list("myUnmapCB" "noOpts"))

It acts as a post notification, an activated command button performs callback before the unmapCallback attribute is received.

Value Returned

t

All arguments were processed without error.

nil

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

Examples

Creates a new pulldown menu

lmgrCreateMenu ( "MyPulldown" '( ( "label" "My pulldown" ) ) )
=> t

Related Topics

Callback Definition List

lmgrCreateMenuItem

lmgrInsertMenuItems

lmgrAddMenuItems


Return to top
 ⠀
X