Say hello to vLib, a library for building user interfaces with theRenoise API
The groundwork was done during the development of Redux, as I was collecting presets and organizing content for the release.
To do that, I started to remake the XRNI-merger - the original tool is still online, but it’s a monster - 3000 lines of code, and hardly re-usable.
So I decided to split the user-interface into a separate project, and expand on it. vLib is the result of these efforts.
Basically, it contains a number of widgets that you can use in your own tools, with a syntax that lies very close to the Renoise Viewbuilder API.
For example, this is the code you need to create a hierarchical tree widget:
-- include class files
_vlibroot = "classes/vLib/"
require (_vlibroot.."vLib")
require (_vlibroot.."vTree")
vtree = vTree{
vb = vb,
id = "vTree",
width = 340,
height = 200,
num_rows = 12,
data = {
name = "Root",
{
name = "Node",
expanded = true, -- initial state of this node/branch
{
name = "Item #1",
},
{
name = "Item #2",
}
},
},
}
-- once created, we can add it to an existing view
viewbuilder_view:add_child(vtree.view)
Of course, you can change it’s properties after having created it. The vTree even supports seamless loading of XML files, I have tried loading an entire Renoise song into it (it was slow, but it worked…)
A functional demo of all components is included with the library - you can launch it by choosing “vLib Demo” from the tools menu after having installed the tool.
Here is a screenshot of the vTree page in the demo tool.
Other useful components include full-blown grid/table component (vTable), a graph and more. And the demo allows you to access most, if not all properties and methods of each component and change them in realtime.
For now, I will just release vLib as it is. I have found it to be quite solid and fundamental changes to it’s design are not likely to happen. I do have plenty of ideas for optimizations, but this is also not a reason to hold back.
If you encounter a bug, have ideas for the library, or want to use it in your own projects, this is the place to discuss it
Source is available on Github
HTML-formatted documentation can be found here