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

hiGetSharedIcon

hiGetSharedIcon(
t_callback
)
=> g_icon / nil

Description

Gets the icon associated with an action. The icon is in the format in which it was originally specified: an image file name or an hiIcon list.

Action icons are maintained in a table and this function enables you to look them up by the callback name of the action.

When you create a menu item with a callback of the same name as an action callback, the icon associated with the action will be used for the menu item, regardless of whether you specify an icon for the menu item. However, instead of relying on that to share icons between a menu item created with hiCreateMenuItem and an action, you should use actions directly in menus.

Argument

t_callback

The name of the callback function that was specified for the action when the action was created with hiCreateAction.

Value Returned

g_icon

The action’s icon, in the format in which it was specified when the action was created.

nil

An icon does not exist for the action or t_callback does not exist.

Related Topics

Toolbar Functions

hiSetActionChecked


Return to top
 ⠀
X