uvi-script
Musical event scripting with Lua
Loading...
Searching...
No Matches
User Interface Classes and Functions

Classes

class  Mapper
 Predefined mapper types. More...
 
class  Unit
 Predefined unit types. More...
 
class  RectanglePlacement
 Image placement and alignment options. More...
 
class  FileFormat
 Predefined format file types. More...
 
class  ModifierKeys
 Keyboard modifier key state information. More...
 
class  Widget
 Widget base class. More...
 
class  ParamWidget
 base class for ParamWidget. More...
 
class  Button
 stateless transient button. More...
 
class  OnOffButton
 2 states boolean button. More...
 
class  Image
 Image widget. More...
 
class  DnDArea
 DnDArea widget. More...
 
class  Label
 text label widget. More...
 
class  Menu
 Menu widget. More...
 
class  MultiStateButton
 MultiStateButton widget. More...
 
class  Table
 Table widget. More...
 
class  NumBox
 Numeric input widget. More...
 
class  Slider
 Horizontal or vertical slider widget. More...
 
class  Knob
 Knob widget. More...
 
class  Panel
 Panel widget. More...
 
class  WaveView
 WaveView widget. More...
 
class  Viewport
 Viewport widget. More...
 
class  XY
 XY widget. More...
 
class  AudioMeter
 AudioMeter widget. More...
 
class  FileSelector
 FileSelector widget. More...
 
class  SVG
 SVG widget. More...
 

Functions

void moveControl (Widget widget, int col, int row)
 move a UI element to a specific place on the grid
 
void setBackground (string imagePath)
 set the script background Image.
 
void setBackgroundColour (string colour)
 set the script background colour.
 
void setSize (number w, number h)
 set the script UI dimensions explicitly.
 
void makePerformanceView ()
 make this script User Interface visible in performance view.
 
function setKeyColour (note, colour)
 customize the keyboard colours.
 
function resetKeyColour (note)
 customize the keyboard colours.
 
function setHeight (h)
 sets the desired height of the user interface.
 
function moveControl (widget, xcol, yrow)
 move a UI element to a specific place on the grid
 
function setBackground (imgPath)
 set the script background Image.
 
function setBackgroundColour (colour)
 set the script background colour.
 

Detailed Description

Custom user interface widgets and layout system.

The UI group provides a comprehensive set of widgets for creating custom script interfaces. All widgets use automatic layout by default but support precise manual positioning. Widget constructors are only available during the main script chunk (not in real-time callbacks).

Widget Categories:

Layout System:

Key Features:

Retina / HiDPI Support:

All image properties support Apple's @2x naming convention for Retina displays. To provide a high-resolution variant, place a file with the @2x suffix alongside the standard-resolution file:

The engine automatically picks the appropriate variant based on the display's scale factor. If no @2x variant is found, the standard image is used.

Note
Widget constructors are disabled during real-time execution. Create all widgets in the main script chunk before any callbacks execute.
See also
User Interface

Function Documentation

◆ makePerformanceView()

void makePerformanceView ( )

make this script User Interface visible in performance view.

The performance view is the simplified instrument interface shown to the end user during performance (as opposed to the full editing view). Calling this function registers the current script UI so it appears in the performance view panel of the host.

Typically called at the end of your script after all widgets have been created and positioned:

-- ... create widgets, position panels ...
setSize(650, 380)
void makePerformanceView()
make this script User Interface visible in performance view.
Definition ui.lua:107
See also
setSize, setHeight, setBackground

◆ moveControl() [1/2]

void moveControl ( Widget widget,
int col,
int row )

move a UI element to a specific place on the grid

Parameters
widgetwidget element to move
colgrid column index
rowgrid row index

◆ moveControl() [2/2]

function moveControl ( widget ,
xcol ,
yrow  )

move a UI element to a specific place on the grid

Parameters
widget
xcol
yrow

◆ resetKeyColour()

function resetKeyColour ( note )

customize the keyboard colours.

Parameters
notemidiNote to change
See also
setKeyColour

◆ setBackground() [1/2]

function setBackground ( imgPath )

set the script background Image.

supported image types include jpg and png

Parameters
imgPathfile path to the Image can be absolute or relative

◆ setBackground() [2/2]

void setBackground ( string imagePath)

set the script background Image.

supported image types include jpg and png. Supports Retina @2x variants.

Parameters
imagePathfile path to the Image can be absolute or relative

◆ setBackgroundColour() [1/2]

function setBackgroundColour ( colour )

set the script background colour.

Parameters
colourstring 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

◆ setBackgroundColour() [2/2]

void setBackgroundColour ( string colour)

set the script background colour.

Parameters
colourstring 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

◆ setHeight()

function setHeight ( h )

sets the desired height of the user interface.

it is automatically computed when creating widgets but you can adjust it to fit your needs

Parameters
hheight in pixels

◆ setKeyColour()

function setKeyColour ( note ,
colour  )

customize the keyboard colours.

Parameters
notemidiNote to change
colourstring 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 You can use custom colors to set the valid key range: #00FFFFFF (transparent white) and #00000000 (transparent black) for a valid and non valid key
See also
resetKeyColour, Keyswitch

◆ setSize()

void setSize ( number w,
number h )

set the script UI dimensions explicitly.

By default the UI height adjusts automatically to fit the widgets. Use this to override both width and height when you need a custom canvas size.

Parameters
wwidth in pixels
hheight in pixels
setSize(650, 380)
void setSize(number w, number h)
set the script UI dimensions explicitly.
See also
setHeight, makePerformanceView