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

hiCreateHorizontalFixedMenu

hiCreateHorizontalFixedMenu(
s_menuHandle 
l_menuItems 
x_rows 
x_cols 
[ S_doneCallback ]
[ s_showTextWithIcon ]
) 
=> r_hiMenu 

Description

Creates a horizontal fixed menu that is a free-floating menu unattached to any application window. The fixed menu is created as a grid of row x column dimensions, and contains menu item objects created by hiCreateMenuItem. An additional Done item is added as the last item. Selecting Done removes the fixed menu from the screen.

Menu items you want to display in the fixed menu are inserted in row-major order.

The width and height of the horizontal fixed menu is determined by the number of rows and columns in the menu. Once the menu is created, you can display it with hiDisplayFixedMenu.

Horizontal fixed menus appear across the entire top or bottom of the root window (screen), rather than an application window. These fixed menus are shared among all Cadence application windows in the root window.

Arguments

s_menuHandle

A unique global SKILL symbol used to reference this menu.

l_menuItems

List of menu items created by hiCreateMenuItem.

x_rows

Number of rows in the fixed menu.

x_cols

Number of columns in the fixed menu.

S_doneCallback

Symbol or string specifying the SKILL function that is called when the menu is closed either by clicking the Done button or by calling hiFixedMenuDown. If you specify a symbol, the function is passed one argument (r_hiMenu); if you specify a string, the string is evaluated and the function is not passed any argument.

If you do not want to use this argument but want to use the next argument, specify ’none as the value of this argument.

s_showTextWithIcon

  

Specifies whether both text and icons should be displayed for all menu items for which both ?itemText and ?itemIcon have been set. Legal values are ’under (the text is displayed below the icon), ’beside (the text is displayed beside the icon) and ’none (if both ?itemText and ?itemIcon have been set for a menu item, only the icon is displayed). The default value is ’none.

Value Returned

r_hiMenu

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

Examples

Creates a horizontal fixed menu with items trMenuItemOne and trMenuItemOne.

hiCreateHorizontalFixedMenu (
’trExampleHorizontalFixedMenu
list ( trMenuItemOne trMenuItemTwo )
1
2
)

If you need to create a series of menu items for the fixed menu, it is more efficient to create a symbol rather than creating each menu item individually.

Procedure ( trCreateMenuItem( theMenuSymbol )
set(
theMenuSymbol
hiCreateMenuItem(
?name theMenuSymbol
?itemText get_pname( theMenuSymbol )
?callback sprintf ( nil "println ( ’%L )" theMenuSymbol )
)
   ) ; set
) ; procedure
trCreateMenuItem ( 'item1 )
trCreateMenuItem ( 'item2 )
trCreateMenuItem ( 'item3 )
trCreateMenuItem ( 'item4 )
trCreateMenuItem ( 'item5 )
trCreateMenuItem ( 'item6 )
hiCreateHorizontalFixedMenu( 
'trExampleHorizontalFixedMenu
list( item1 item2 item3 item4 item5 item6 )
1 ;;; number of rows
6 ;;; number of columns
)
hiDisplayFixedMenu( 
trExampleHorizontalFixedMenu
"top"
)
hiCreateVerticalFixedMenu( 
'trExampleVerticalFixedMenu
list ( item1 item2 item3 item4 item5 item6 )
6 ;;; number of rows
1 ;;; number of columns
)
hiDisplayFixedMenu( 
trExampleVerticalFixedMenu
"left"
)

Related Topics

Menu Functions

hiCreateMenuItem


Return to top
 ⠀
X