MultiStateButton widget.
More...
|
| | MultiStateButton (string name, table entries) |
| | creates a menu widget on the user interface.
|
| |
| int | addItem (string name) |
| | add a menu item.
|
| |
| void | setItem (int index, string name) |
| | setItem text for given index.
|
| |
| void | setValue (number value, bool callChangedCallback=true) |
| |
|
void | clear () |
| | clear the menu entries.
|
| |
| string | getText () |
| |
|
|
int | paramId |
| | paramter id
|
| |
|
int | length |
| | size of the menu
|
| |
|
int | value |
| | selected index
|
| |
|
int | selected |
| | selected index
|
| |
|
string | selectedText |
| | selected text
|
| |
|
string | text |
| | selected text
|
| |
|
string | backgroundImage |
| | path to the background image strip
|
| |
| string | backgroundColour |
| | background colour: colour string that defines the desired colour.
|
| |
| string | textColour |
| | text colour: colour string that defines the desired
|
| |
|
Mapper::Type | mapper |
| | Mapper type, default is Mapper.Linear.
|
| |
|
Unit::Type | unit |
| | Unit type, default is Unit.Generic.
|
| |
|
string | name |
| | widget name
|
| |
|
string | displayName |
| | widget display name
|
| |
|
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
|
| |
|
table | size |
| | widget size {width, height}
|
| |
|
table | position |
| | widget position {x,y}
|
| |
|
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
|
| |
MultiStateButton widget.
creates a multi-state button widget on the user interface. Image properties support Retina @2x variants.
◆ MultiStateButton()
| MultiStateButton::MultiStateButton |
( |
string | name, |
|
|
table | entries ) |
creates a menu widget on the user interface.
- Parameters
-
| name | the name to give to the widget |
| entries | (optional) array of strings to be displayed in the menu |
◆ addItem()
| int MultiStateButton::addItem |
( |
string | name | ) |
|
add a menu item.
- Parameters
-
- Returns
- index of new menu item
◆ getText()
| string MultiStateButton::getText |
( |
| ) |
|
- Returns
- the currently selected text.
◆ setItem()
| void MultiStateButton::setItem |
( |
int | index, |
|
|
string | name ) |
setItem text for given index.
- Parameters
-
| index | menu item index to change |
| name | new menu item text |
◆ setValue()
| void MultiStateButton::setValue |
( |
number | value, |
|
|
bool | callChangedCallback = true ) |
- Parameters
-
| value | the new widget's value |
| callChangedCallback | call the changed callback function if true |
◆ backgroundColour
| string MultiStateButton::backgroundColour |
background colour: colour string that defines the desired colour.
It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format
◆ textColour
| string MultiStateButton::textColour |
text colour: colour string that defines the desired
colour. It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format