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

Panel widget. More...

+ Inheritance diagram for Panel:

Public Member Functions

 Panel (string name)
 creates a Panel widget on the user inteface. More...
 

Public Attributes

number alpha
 transparency value between 0.0 and 1.0
 
string backgroundColour
 background 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 background image
 
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
 
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
 
table size
 widget size {width, height}
 
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

Panel widget.

creates a Panel widget on the user inteface.

Panel inherits all the standard widget creation functions (Knob, Slider...) as methods. in order to add sub-widgets, just call those function on an existing Panel instance.

local panel = Panel("panel")
panel.x = 5
panel.y = 5
panel.width = 710
panel.height = 120
panel:Button("foo")
panel:OnOffButton("onoff", false)
panel:Knob("knob", 0, 0, 1)
panel:Slider("slider", 0, 0, 1)
panel:Label("label")
panel:NumBox("NumBox", 0, 0, 1)
panel:Menu("Menu", {"one", "two", "three"})
panel:Table("table", 24, 0, 0, 1)
panel.backgroundColour = "3f000000"
local panel2 = panel:Panel("panel2")
panel2.bounds = {5, 95, 700, 20}
Examples:
monoBassLine.lua.

Constructor & Destructor Documentation

Panel::Panel ( string  name)

creates a Panel widget on the user inteface.

Parameters
namethe name to give to the widget