hiCreateSimpleMenu
hiCreateSimpleMenu(s_menuHandlet_menuTitlel_menuItemsl_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
Values Returned
|
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
Return to top