uvi-script
Musical event scripting with Lua

Widget base class. More...

Inheritance diagram for Widget:
AudioMeter Button DnDArea FileSelector Image Label Panel ParamKnob ParamMenu ParamNumBox ParamOnOffButton ParamSlider ParamWidget ParameterValue SVG Table Viewport WaveView XY

Public Attributes

string name
 widget name, given at construction (read-only)
 
string displayName
 widget display name
 
string displayText
 custom text to display in place of the standard value display, on widgets that show one.
 
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
 
int w
 alias of width
 
int h
 alias of height
 
table size
 widget size {width, height}
 
table position
 widget position {x,y}
 
table pos
 alias of position
 
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.
 

Detailed Description

Widget base class.

All widget are derived from this one and all its properties are available in child widgets.

Member Data Documentation

◆ changed

function Widget::changed

callback function used by child widgets to be notified of changes.

Not every widget calls it: the Param* widgets (ParamKnob, ParamSlider, ParamOnOffButton, ParamMenu, ParamNumBox) never do, and a Label calls it only when the user edits its text

◆ displayText

string Widget::displayText

custom text to display in place of the standard value display, on widgets that show one.

Leave it empty to revert to the standard display

◆ interceptsMouseClicks

bool Widget::interceptsMouseClicks

boolean flag to toggle mouse handling on widget.

True by default on every widget, a Label or an Image included: set it to false on anything drawn over a control, or that control no longer receives clicks in the covered area

◆ persistent

bool Widget::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