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

text label widget. More...

Inheritance diagram for Label:
Widget

Public Member Functions

 Label (string name)
 creates a label widget on the user interface.
 

Public Attributes

string text
 text to display on screen
 
string align
 text alignement: "centred" | "left"| "right" | "top" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight"
 
number fontSize
 font size
 
string font
 path to TrueType font
 
string backgroundColour
 background colour: colour string that defines the desired colour.
 
string textColour
 textColour: colour string that defines the desired
 
string backgroundColourWhenEditing
 background colour when editing: colour string that defines the desired colour.
 
string textColourWhenEditing
 textColour when editing: colour string that defines the desired colour.
 
bool editable
 whether the label text field can be edited.
 
float minimumHorizontalScale
 specifies the minimum amount that the font can be squashed horizontally before it starts using ellipsis.
 
string url
 URL to open when the label is clicked.
 
- 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

text label widget.

creates a label widget on the user interface.

l = Label("label")
l.text = "a long description"
l.align = "left"
l.backgroundColour = "black"
l.textColour = "orange"
string text
text to display on screen
Definition ui.cpp:992
string textColour
textColour: colour string that defines the desired
Definition ui.cpp:1003
string backgroundColour
background colour: colour string that defines the desired colour.
Definition ui.cpp:999
Label(string name)
creates a label widget on the user interface.
string align
text alignement: "centred" | "left"| "right" | "top" | "bottom" | "topLeft" | "topRight" | "bottomLef...
Definition ui.cpp:993

Constructor & Destructor Documentation

◆ Label()

Label::Label ( string name)

creates a label widget on the user interface.

Parameters
namethe name to give to the widget

Member Data Documentation

◆ backgroundColour

string Label::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

◆ backgroundColourWhenEditing

string Label::backgroundColourWhenEditing

background colour when editing: 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

◆ editable

bool Label::editable

whether the label text field can be edited.

default value is false

◆ minimumHorizontalScale

float Label::minimumHorizontalScale

specifies the minimum amount that the font can be squashed horizontally before it starts using ellipsis.

0 for a default value. 1 for no stretching

◆ textColour

string Label::textColour

textColour: 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

◆ textColourWhenEditing

string Label::textColourWhenEditing

textColour when editing: 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