PLUG'N SCRIPT
rapid plugin development
Tutorial
DSP
KUIML
How-to
Scripts
  • Tutorial
  • Element Reference
Language basics
  • SKIN
  • DUMMY
  • INCLUDE
  • INCLUDE_ONCE
  • DEFINE
  • UNDEFINE
  • VARIABLE
  • LOCAL_VARIABLE
  • TEMPLATE
  • TEMPLATE_INNER_CONTENT
  • REPEAT
Data model
  • PARAM
  • ACTION
    • Action types
  • ACTION_TRIGGER
  • TIMER
UI Layout and positioning
  • CELL
  • TABLE
UI Widgets
  • CANVAS
    • Graphics API
  • COLOR_SCALE
  • FILE_SELECT_MENU
  • GRID
  • INVISIBLE_PARAM_MENU_BUTTON
  • MENU_ITEM
  • MENU_SEPARATOR
  • POPUP_MENU
  • svg
  • RULER
  • TEXT
  • TEXT_FIELD
  • TEXT_EDIT_BOX
  • XY_PARAM_PAD
  • XY_ZOOM_SELECT_PAD
  • XYZ_PARAM_SCRATCH_PAD
  • XYZ_PARAM_CLICK_PAD
  • XYZ_IMAGE_PARAM_JOYSTICK
UI 3D Objects
  • COLOR_SURFACE_3D
  • GRID_3D
  • GL_OBJECT_3D
Data model commands
  • REQUIRED_OBJECTS
  • EXPOSED_OBJECTS
  • PERSISTENT_OBJECTS
Common attrubutes
  • For all elements
  • Widgets
  • Param Widgets
  • Param Controls
  • Param Info Viewers
  • Text Widgets
  • Surface Viewers
  • Curve Viewers
  • 3D Objects
  • Parameters mapping
  • LetiMix
KUIMLElement ReferenceMENU_ITEM
March 25, 2024

MENU_ITEM

Adds an item to a parent POPUP_MENU or MENU_ITEM.

Attributes brief detailed show all inherited

Name Description
nameName to be displayed in the menu itemThe name is overriden by the name of the action when an action is used
action_idIdentifier of the target action to be executed when the menu item is selectedOptional. When used, the name of the action is displayed, instead of the "name" attribute
checked_param_idIdentifier of the parameter used to determine if the menu item should be checkedOptional. When used, the menu item is checked when the target parameter is different from 0
Name Value type Default Description Comment
namestringemptyName to be displayed in the menu itemThe name is overriden by the name of the action when an action is used
action_idaction idemptyIdentifier of the target action to be executed when the menu item is selectedOptional. When used, the name of the action is displayed, instead of the "name" attribute
checked_param_idparam idemptyIdentifier of the parameter used to determine if the menu item should be checkedOptional. When used, the menu item is checked when the target parameter is different from 0

Action and Param Usage

This is an example showing how to use menu items with actions and parameters.

  1. <!-- Define actions & parameter for the menu item -->
  2. <ACTION id="my_action" name="Show Alert" type="DisplayMessageBox" message="Alert!"/>
  3. <ACTION id="toggle_param" name="My param" type="Script" script="my_param = abs(1-my_param);" requires="my_param" />
  4. <PARAM id="my_param" type="boolean" default="1"/>

  5. <!-- The menu -->
  6. <POPUP_MENU id="menu">
  7. <MENU_ITEM action_id="my_action"/>
  8. <MENU_ITEM checked_param_id="my_param" action_id="toggle_param" />
  9. </POPUP_MENU>

  10. <!-- The button to show the menu -->
  11. <TEXT value="Click Me!" >
  12. <INVISIBLE_ACTION_BUTTON action_id="menu.Popup" width="100%" height="100%"/>
  13. </TEXT>

See POPUP_MENU element for more examples.

2020 - 2025 © Site by LetiMix  |  Plug'n Script and KUIML by Blue Cat Audio