Product Documentation
Virtuoso Layout Suite SKILL Reference
Product Version IC23.1, November 2023

mbRegisterHierMenu

mbRegisterHierMenu(
t_viewType
t_uniqueId
t_name
t_enableCB
)
=> t / nil

Description

Registers a hierarchical menu with the menu builder for future retrieval and use within menus.

Arguments

t_viewType

Name of the view type with which the menu is to be registered.

t_uniqueId

Unique ID for the reference menu.

t_name

Name of the registered menu.

t_enableCB

Function to determine if action is enabled or disabled.

Values Returned

t

Returned when the menu is successfully registered.

nil

Returned when registration of the menu fails.

Example

Creates a slider (hierarchical) menu called Hier Example under the Shape context menu, with two sub items, labeled Item 1 and Item 2.

mbRegisterAction("maskLayout" "subItem1" "Item 1" "println(\"Item 1\")" "t")
mbRegisterAction("maskLayout" "subItem2" "Item 2" "println(\"Item 2\")" "t")
mbRegisterHierMenu("maskLayout" "hierMenu" "Hier Example" "t")
mbSetContextData("maskLayout" "subItem1" "Shape" "Canvas" "Common" ?parent
"hierMenu")
mbSetContextData("maskLayout" "subItem2" "Shape" "Canvas" "Common" ?parent
"hierMenu")
mbSetContextData("maskLayout" "hierMenu" "Shape" "Canvas" "Common")
mbRegisterMenuItem

Return to top
 ⠀
X