uvi-script
Musical event scripting with Lua
FileSelector Class Reference

FileSelector widget. More...

Inheritance diagram for FileSelector:
Widget

Public Member Functions

 FileSelector (string name)
 creates a FileSelector widget on the user interface.
 
void prev ()
 selects the previous path
 
void next ()
 selects the next path
 

Public Attributes

string basepath
 root path for the file selector
 
string filepath
 current file path
 
string filetype
 pattern for allowed file extensions ex: '.txt;.json'
 
string textColour
 text colour.
 
string backgroundColour
 background colour.
 
string highlightColour
 selected path highlight colour.
 
string arrowColour
 arrow colour.
 
string scrollBarThumbColour
 scrollBar thumb colour.
 
string scrollBarTrackColour
 scrollBar track colour.
 
string scrollBarBackgroundColour
 scrollBar background colour.
 
string fillStyle
 fill style: 'gloss' or 'solid'
 
number fontSize
 font size
 
string font
 path to custom font file
 
int scrollBarThickness
 scrollBar size
 
int columnWidth
 width of each columns
 
int rowHeight
 height of each rows
 
bool displayExtension
 should we display file extension
 
bool allowDnD
 should we allow file DnD
 
bool invertColourOnSelection
 should we invert selected path colour scheme
 
function pathSelected
 callback invoked when a path is selected
 
function pathActivated
 callback invoked when a path is activated
 
- Public Attributes inherited from Widget
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

FileSelector widget.

Creates a FileSelector widget on the user interface.

fs = FileSelector("fs")
fs.filepath = getLocation("Script")
fs.columnWidth = 180
fs.rowHeight = 20
fs.x = 0
fs.y = 0
fs.width = 720
fs.height = 360
fs.filetype = "*.*"
function fs:pathSelected()
print("selected:", self.filepath)
end
function fs:pathActivated()
print("activated:", self.filepath)
end
int columnWidth
width of each columns
Definition ui.cpp:2570
string filepath
current file path
Definition ui.cpp:2537
FileSelector(string name)
creates a FileSelector widget on the user interface.
string filetype
pattern for allowed file extensions ex: '.txt;.json'
Definition ui.cpp:2538
int rowHeight
height of each rows
Definition ui.cpp:2571
function pathActivated
callback invoked when a path is activated
Definition ui.cpp:2577
function pathSelected
callback invoked when a path is selected
Definition ui.cpp:2576
int x
x position in pixels
Definition ui.cpp:979
int height
widget height in pixels
Definition ui.cpp:982
int y
y position in pixels
Definition ui.cpp:980
int width
widget width in pixels
Definition ui.cpp:981
string getLocation(string location)

Constructor & Destructor Documentation

◆ FileSelector()

FileSelector::FileSelector ( string name)

creates a FileSelector widget on the user interface.

–

Parameters
namethe name to give to the widget

Member Data Documentation

◆ arrowColour

string FileSelector::arrowColour

arrow colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ backgroundColour

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

◆ highlightColour

string FileSelector::highlightColour

selected path highlight colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ scrollBarBackgroundColour

string FileSelector::scrollBarBackgroundColour

scrollBar background colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ scrollBarThumbColour

string FileSelector::scrollBarThumbColour

scrollBar thumb colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ scrollBarTrackColour

string FileSelector::scrollBarTrackColour

scrollBar track colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format

◆ textColour

string FileSelector::textColour

text colour.

It can be either a named colour like "blue" or "red" or an hexadecimal string in RGB ("#FF00CC") or ARGB ("#3C00FECD") format