uvi-script
Musical event scripting with Lua
Loading...
Searching...
No Matches
ParamOnOffButton Class Reference

An on/off button bound to an existing boolean Element parameter (e.g. More...

Inheritance diagram for ParamOnOffButton:
Widget

Public Member Functions

 ParamOnOffButton (Element elementOrPath, string paramName)
 creates an on/off button bound to an existing Element parameter.
 
void setNormalImage (string imagePath)
 image for the normal state
 
void setPressedImage (string imagePath)
 image for the pressed state
 
void setOverImage (string imagePath)
 image for the mouse-over state
 

Public Attributes

bool value
 the button state (read-only; reflects the bound parameter)
 
string normalImage
 image path for the normal state
 
string pressedImage
 image path for the pressed state
 
string overImage
 image path for the mouse-over state
 
string overPressedImage
 image path for the over+pressed state
 
string backgroundColourOff
 background colour when off
 
string textColourOff
 text colour when off
 
string backgroundColourOn
 background colour when on
 
string textColourOn
 text colour when on
 
bool triggeredOnMouseDown
 fire on mouse-down instead of mouse-up
 
number fontSize
 text font size
 
string font
 path to a custom TrueType font
 
- Public Attributes inherited from Widget
string name
 widget name
 
string displayName
 widget display name
 
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
 
table size
 widget size {width, height}
 
table position
 widget position {x,y}
 
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

An on/off button bound to an existing boolean Element parameter (e.g.

a Bypass toggle). It is a Widget (not an OnOffButton).

Constructor & Destructor Documentation

◆ ParamOnOffButton()

ParamOnOffButton::ParamOnOffButton ( Element elementOrPath,
string paramName )

creates an on/off button bound to an existing Element parameter.

Parameters
elementOrPathan Element reference, or a path string identifying one
paramNamethe parameter name (as used by setParameter)