The hxWidgets backend of the HaxeUI framework -
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Build Status Support this project on Patreon


haxeui-hxwidgets is the wxWidgets backend for HaxeUI.


  • haxeui-hxwidgets requires at least Haxe 3.4.0, we recommend Haxe 3.4.2.
  • haxeui-hxwidgets has a dependency to haxeui-core, and so that too must be installed.
  • haxeui-hxwidgets also has a dependency to hxWidgets (the wxWidgets Haxe externs), please refer to the installation instructions on their site.
  • You will also need a copy of the wxWidgets libraries which can be obtained here. The easiest way to install and setup the libraries is to follow the instructions here.

Eventually all these libs will become haxelibs, however, currently in their alpha form they do not even contain a haxelib.json file (for dependencies, etc) and therefore can only be used by downloading the source and using the haxelib dev command or by directly using the git versions using the haxelib git command (recommended). Eg:

haxelib git haxeui-core
haxelib dev haxeui-hxwidgets path/to/expanded/source/archive


The simplest method to create a new hxWidgets application that is HaxeUI ready is to use one of the haxeui-templates. These templates will allow you to start a new project rapidly with HaxeUI support baked in.

If however you already have an existing application, then incorporating HaxeUI into that application is straightforward:


As well as the haxeui-core and haxeui-hxwidgets haxelibs, you must also include (in either the IDE or your .hxml) the haxelib hxWidgets.

Toolkit initialisation and usage

The hxWidgets application itself must be initialised and an event loop started. This can be done by using code similar to:

static function main() {
	var app = new App();
    var frame:Frame = new Frame(null, "My App");
    frame.resize(800, 600);;;

Initialising the toolkit requires you to add these lines somewhere before you start to actually use HaxeUI in your application and after the hxWidgets frame has been created:

	frame: frame      // the frame on which 'Screen' will place components

Once the toolkit is initialised you can add components using the methods specified here.

hxWidgets specifics

Components in haxeui-hxwidgets expose a special window property that allows you to access the hxWidgets Window, this could then be used in other UIs that arent using HaxeUI components.

Initialisation options

The configuration options that may be passed to Tookit.init() are as follows:

	frame: frame      // the frame on which 'Screen' will place components

Addtional resources

  • haxeui-api - The HaxeUI api docs.
  • haxeui-guides - Set of guides to working with HaxeUI and backends.
  • haxeui-demo - Demo application written using HaxeUI.
  • haxeui-templates - Set of templates for IDE's to allow quick project creation.
  • haxeui-bdd - A behaviour driven development engine written specifically for HaxeUI (uses haxe-bdd which is a gherkin/cucumber inspired project).
  • WWX2016 presentation - A presentation given at WWX2016 regarding HaxeUI.