List of all members | Public Member Functions | Public Attributes
Table Class Reference

Table widget. More...

+ Inheritance diagram for Table:

Public Member Functions

number getValue (int index)
 get a table value. More...
 
void setRange (number min, number max)
 
void setValue (int index, number value, bool callChangedCallback=true)
 set a table value. More...
 
 Table (string name, int size, number def, number min, number max, bool integer)
 creates a table widget on the user inteface. More...
 

Public Attributes

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
 
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 drawInnerEdge
 draw separation line between each bar (default is true)
 
bool enabled
 boolean flag to enable / disable the widget
 
string fillStyle
 background and slider fill style: 'gloss' or 'solid'
 
int height
 widget height in pixels
 
string innerEdgeColour
 inner edge 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
 
bool interceptsMouseClicks
 boolean flag to toggle mouse handling on widget
 
int length
 table size
 
number max
 maximum value
 
number min
 minimum value
 
string name
 widget name
 
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)
 
table size
 widget size {width, height}
 
string sliderColour
 slider 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
 
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
 

Detailed Description

Table widget.

creates a table widget on the user inteface.

t = Table("table", 10, 0, -12, 12, true)
t.changed = function(self, index)
print("table changed:", index, self:getValue(index))
end
Examples:
monoBassLine.lua.

Constructor & Destructor Documentation

Table::Table ( string  name,
int  size,
number  def,
number  min,
number  max,
bool  integer 
)

creates a table widget on the user inteface.

Parameters
namethe name to give to the widget
sizenumber of element in the table
defdefault and initial value of all sliders
minminimum value
maxmaximum value
integeroptional default is false

Member Function Documentation

void Table::setValue ( int  index,
number  value,
bool  callChangedCallback = true 
)

set a table value.

Parameters
indexindex of the value to write in the table
valuevalue to write in the table
callChangedCallbackcall the changed callback function if true
void Table::setRange ( number  min,
number  max 
)
Parameters
minminimum value
maxmaximum value
number Table::getValue ( int  index)

get a table value.

Parameters
indexindex of the value to read