Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiCreateSimpleMenu

hiCreateSimpleMenu(
s_menuHandle 
t_menuTitle 
l_menuItems 
l_menuItemCallbacks 
) 
=> r_hiMenu 

Description

Returns the SKILL description of a simple menu, which is a single level menu containing only text menu items, none of which invoke a submenu. Once this menu is created, you can display it with hiDisplayMenu or associate it with a window using hiSetWindowMenu.

Arguments

s_menuHandle

A unique global SKILL symbol used to reference this menu.

t_menuTitle

Title that is displayed in the menu bar.

To set the access key for the menu, add an ampersand before the desired letter. For example, if the menu title is Edit and you want E to be the access key for the menu, you would specify this argument as "&Edit".

l_menuItems

List of strings that are the menu items for the simple menu.

To set access keys for the menu items, add an ampersand before the desired letter in each menu item name. For example, if you want P to be the access key for the menu item Replace, you would specify the menu item as "Re&place".

l_menuItemCallbacks

  

List of string specifications of SKILL callback procedures that are called when the menu item is selected. There should be one callback string listed for every menu item. If only one callback string is specified, that routine is called back regardless of which menu item is selected. In this case, the text of the selected menu item gets appended to the callback string.

Values Returned

r_hiMenu

The SKILL structure representing the menu. The menuHandle can be referenced by menu->hiMenuSym.

Examples

The following sample first creates a popup menu that lists the Virtuoso windows currently accessible on the desktop, and then sets the F6 function key to display this popup menu.

hiCreateSimpleMenu(
’trExampleMenu
"Example Menu"
’( "One" "Two" )
’( "println( \"One\" )" "println( \"Two\" )" ) )
=> array[7]:27015368

procedure( trDisplayWindowsPopUp()
hiDisplayMenu(
;;; creating a dynamic popup menu
hiCreateSimpleMenu(
'trWindowsPopUp
"Windows"
foreach( mapcar wid hiGetWindowList()
hiSetWindowName( wid )
) ; foreach
foreach( mapcar wid hiSetWindowName()
sprintf(
nil
"hiRaiseWindow( window( %d ))"
wid->windowNum
)
) ; foreach
) ; hiCreateSimpleMenu
) ; hiDisplayMenu
) ; procedure
;;; Setting the F6 function key to display the popup menu hiSetBindKey( "Command Interpreter" "<Key>F6"
"trDisplayWindowsPopUp()" )

Related Topics

Menu Functions

hiDisplayMenu

hiSetWindowMenu


Return to top
 ⠀
X