Introduction
BUW - Basic and Usefull Widgets (for OpenFL)
Copyright Frank Endres / Éducation Nationale, 2012-2018
Released under the Cecill-C licence
Features
BUW provides some controls for the design of a GUI:
- containers: horizontal / vertical boxes and grid,
- widgets: buttons, labels, inputs, checkboxes, radioboxes, spinboxes,
- listviews and tables to display collections of items.
BUW can be used for desktop, mobile and web applications (using OpenFL as backend). Widgets widths are responsive.
Screenshot

Development
haxe/buw Git repository
git clone git://git.tuxfamily.org/gitroot/haxe/buw.git
Usage
Installation
To install BUW library, run the command:
haxelib install buw
Project setup
To setup a new OpenFL+BUW project, run the command:
openfl create project ProjectName
Then edit project.xml
and add the following line:
<haxelib name="buw" />
Sample program
Here is a sample program:
//import buw classes:
import buw.*;
class Main extends openfl.display.Sprite {
function new() {
super();
//create a container widget (recommended):
var box = new VBox();
//with a Vertical Box, widgets are stacked horizontaly.
//add widgets to the container (labels for example):
box.pack(new Label("Some text."));
box.pack(new Label("Something else."));
//display the container (and enables vertical scrolling if needed):
Screen.display(box);
//since all widgets are sprites, one can also display them with addChild:
var b = new TextButton(function (b) { trace("clicked"); }, "Click me !");
b.y = 100;
addChild(b);
}
}