![]() |
uvi-script
Musical event scripting with Lua
|
A dropdown menu bound to an existing enumerated Element parameter. More...
Public Member Functions | |
| ParamMenu (Element elementOrPath, string paramName) | |
| creates a menu bound to an existing Element parameter. | |
| ParamMenu (string name) | |
| creates an unbound menu, to be targeted later with bind. | |
| void | bind (Element elementOrPath, string paramName) |
| bind the widget to another parameter, or bind an unbound widget for the first time. | |
Public Attributes | |
| number | value |
| the selected index (read-only; reflects the bound parameter) | |
| bool | hierarchical |
| build nested sub-menus from "/"-separated entries | |
| bool | displayArrow |
| show/hide the drop-down arrow | |
| string | align |
| text alignment | |
| number | fontSize |
| text font size | |
| string | font |
| path to a custom TrueType font | |
| number | minimumHorizontalScale |
| minimum horizontal font squash before ellipsis | |
| number | menuHeight |
| drop-down item height | |
| string | backgroundImage |
| path to background image | |
| string | backgroundColour |
| background colour | |
| string | textColour |
| text colour | |
| string | outlineColour |
| outline colour | |
| string | arrowColour |
| drop-down arrow colour | |
| string | popupBackgroundColour |
| popup background colour | |
| string | popupTextColour |
| popup text colour | |
| string | popupHighlightedBackgroundColour |
| popup highlighted-item background colour | |
| string | popupHighlightedTextColour |
| popup highlighted-item text colour | |
| string | popupFont |
| path to a custom TrueType font for the popup | |
| number | popupFontSize |
| popup font size | |
Public Attributes inherited from Widget | |
| string | name |
| widget name, given at construction (read-only) | |
| string | displayName |
| widget display name | |
| string | displayText |
| custom text to display in place of the standard value display, on widgets that show one. | |
| string | tooltip |
| widget tooltip, default is name | |
| int | x |
| x position in pixels | |
| int | y |
| y position in pixels | |
| int | width |
| widget width in pixels | |
| int | height |
| widget height in pixels | |
| int | w |
| alias of width | |
| int | h |
| alias of height | |
| table | size |
| widget size {width, height} | |
| table | position |
| widget position {x,y} | |
| table | pos |
| alias of position | |
| table | bounds |
| widget bounding rect {x,y,width,height} | |
| number | alpha |
| transparency value between 0.0 and 1.0 | |
| bool | enabled |
| boolean flag to enable / disable the widget | |
| bool | visible |
| boolean flag to toggle widget visibility | |
| bool | interceptsMouseClicks |
| boolean flag to toggle mouse handling on widget. | |
| bool | showLabel |
| show widgets label if any | |
| bool | persistent |
| flag to tell if the widget values should be serialized when saving. | |
| function | changed |
| callback function used by child widgets to be notified of changes. | |
A dropdown menu bound to an existing enumerated Element parameter.
The menu entries come from the parameter's list of values and the selection follows the parameter. It is a Widget (not a Menu).
| ParamMenu::ParamMenu | ( | Element | elementOrPath, |
| string | paramName ) |
creates a menu bound to an existing Element parameter.
| elementOrPath | an Element reference, or a path string identifying one |
| paramName | the parameter name (as used by setParameter) |
| ParamMenu::ParamMenu | ( | string | name | ) |
creates an unbound menu, to be targeted later with bind.
Until then it shows a placeholder and its value is nil.
| name | the widget name |
| void ParamMenu::bind | ( | Element | elementOrPath, |
| string | paramName ) |
bind the widget to another parameter, or bind an unbound widget for the first time.
The control is rebuilt with the new parameter's range, unit, mapper and value; rebinding to the same element and parameter does nothing. Typically called when the element the UI edits changes, e.g. the insert effect selected in an effect rack. Raises an error when the element no longer exists or has no such parameter.
| elementOrPath | an Element reference, or a path string identifying one |
| paramName | the parameter name (as used by setParameter) |