MultiStateButton widget.
More...
|
number | alpha |
| transparency value between 0.0 and 1.0
|
|
string | 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
|
|
string | backgroundImage |
| path to the background image strip
|
|
table | bounds |
| widget bounding rect {x,y,width,height}
|
|
function | changed |
| callback function used by child widgets to be notified of changes
|
|
string | displayName |
| widget display name
|
|
bool | enabled |
| boolean flag to enable / disable the widget
|
|
int | height |
| widget height in pixels
|
|
bool | interceptsMouseClicks |
| boolean flag to toggle mouse handling on widget
|
|
int | length |
| size of the menu
|
|
Mapper::Type | mapper |
| Mapper type, default is Mapper.Linear.
|
|
string | name |
| widget name
|
|
int | paramId |
| paramter id
|
|
bool | persistent |
| flag to tell if the widget values should be serialized when saving. True by default. Persistent widgets will call their changed function on reload
|
|
table | position |
| widget position {x,y}
|
|
int | selected |
| selected index
|
|
string | selectedText |
| selected text
|
|
bool | showLabel |
| show widgets label if any
|
|
table | size |
| widget size {width, height}
|
|
string | text |
| selected text
|
|
string | 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
|
|
string | tooltip |
| widget tooltip, default is name
|
|
Unit::Type | unit |
| Unit type, default is Unit.Generic.
|
|
int | value |
| selected index
|
|
bool | visible |
| boolean flag to toggle widget visibility
|
|
int | width |
| widget width in pixels
|
|
int | x |
| x position in pixels
|
|
int | y |
| y position in pixels
|
|
MultiStateButton widget.
creates a multi-state button widget on the user inteface.
m.changed = function(self)
print("multi state changed:", self.value, self.
selectedText)
end
MultiStateButton::MultiStateButton |
( |
string |
name, |
|
|
table |
entries |
|
) |
| |
creates a menu widget on the user inteface.
- Parameters
-
name | the name to give to the widget |
entries | (optional) array of strings to be displayed in the menu |
int MultiStateButton::addItem |
( |
string |
name) | |
|
add a menu item.
- Parameters
-
- Returns
- index of new menu item
void MultiStateButton::setItem |
( |
int |
index, |
|
|
string |
name |
|
) |
| |
setItem text for given index.
- Parameters
-
index | menu item index to change |
name | new menu item text |
void MultiStateButton::setValue |
( |
number |
value, |
|
|
bool |
callChangedCallback = true |
|
) |
| |
- Parameters
-
value | the new widget's value |
callChangedCallback | call the changed callback function if true |
string MultiStateButton::getText |
( |
) | |
|
- Returns
- the currently selected text.