Knob widget.
More...
|
|
number | alpha |
| | transparency value between 0.0 and 1.0
|
| |
|
table | bounds |
| | widget bounding rect {x,y,width,height}
|
| |
|
function | changed |
| | callback function used by child widgets to be notified of changes
|
| |
|
number | default |
| | the widget's default value
|
| |
|
string | displayName |
| | widget display name
|
| |
|
string | displayText |
| | custom text to display in place of the standard value display. To revert to the standard behaviour, leave it empty.
|
| |
|
bool | enabled |
| | boolean flag to enable / disable the widget
|
| |
|
string | fillColour |
| | fill colour. It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format
|
| |
|
int | height |
| | widget height in pixels
|
| |
|
bool | interceptsMouseClicks |
| | boolean flag to toggle mouse handling on widget
|
| |
|
Mapper::Type | mapper |
| | Mapper type, default is Mapper.Linear.
|
| |
|
number | max |
| | the widget's maximum value
|
| |
|
number | min |
| | the widget's minimum value
|
| |
|
string | name |
| | widget name
|
| |
|
string | outlineColour |
| | outline colour. It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format
|
| |
|
int | paramId |
| | parameter 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}
|
| |
|
bool | showLabel |
| | show widgets label if any
|
| |
|
bool | showPopupDisplay |
| | show/hide the value popup display (if any)
|
| |
|
bool | showValue |
| | show/hide value display
|
| |
|
table | size |
| | widget size {width, height}
|
| |
|
string | stripImage |
| | path to knob strip image
|
| |
|
string | tooltip |
| | widget tooltip, default is name
|
| |
|
Unit::Type | unit |
| | Unit type, default is Unit.Generic.
|
| |
|
number | value |
| | the widget's value
|
| |
|
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
|
| |
Knob widget.
creates a knob widget on the user inteface.
k =
Knob(
"knob", 0.5, 0.0, 1.0,
false)
k.changed = function(self)
print("knob changed", self.
value)
end
- Examples:
- Chorder.lua, Ensemble.lua, InvertPitch.lua, legato.lua, monoBassLine.lua, portamento.lua, TimbreShifting.lua, tremolo.lua, Unison.lua, and vibrato.lua.
| Knob::Knob |
( |
string |
name, |
|
|
number |
def, |
|
|
number |
min, |
|
|
number |
max, |
|
|
bool |
integer |
|
) |
| |
creates a knob widget on the user inteface.
- Parameters
-
| name | the name to give to the widget |
| def | default and initial value |
| min | minimum value |
| max | maximum value |
| integer | (optional) default is false |
| void Knob::setValue |
( |
number |
value, |
|
|
bool |
callChangedCallback = true |
|
) |
| |
- Parameters
-
| value | the new widget's value |
| callChangedCallback | call the changed callback function if true |
| void Knob::setRange |
( |
number |
min, |
|
|
number |
max |
|
) |
| |
- Parameters
-
| min | minimum value |
| max | maximum value |
| void Knob::setStripImage |
( |
string |
imagePath, |
|
|
int |
numImages |
|
) |
| |
- Parameters
-
| imagePath | path to knob strip image |
| numImages | number of images in strip |