BUW: Haxe / OpenFL GUI - Home


Introduction

BUW - Basic and Usefull Widgets is a GUI [library)(https://lib.haxe.org/p/buw/) for Haxe and OpenFL.

Copyright Frank Endres / Éducation Nationale, since 2012.

Released under the Cecill-C licence.

Features

BUW is a Haxe library providing some controls for the design of a Graphical User Interface (GUI):

BUW can be used for desktop, mobile and web applications (using OpenFL as backend). Widgets widths are responsive.

Screenshot

demo screenshot

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

<haxelib name="buw" />
<window width="0" height="0" if="html5" />

Sample program

Here is a sample program:

//import buw classes:
import buw.*;

class Main {
  public static function main() {
    new Main();
  }
  
  function new() {
    //create a container widget (recommended):
    var box = new VBox();
    //with a Vertical Box, widgets are stacked verticaly.
    
    //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);
  }
}