haxeui-hxwidgets is the wxWidgets backend for HaxeUI.
haxeui-hxwidgetsrequires at least Haxe 3.4.0.haxeui-hxwidgetshas a dependency tohaxeui-core, and so that too must be installed.haxeui-hxwidgetsalso has a dependency to hxWidgets (thewxWidgetsHaxe externs), please refer to the installation instructions here.
Installation of the haxeui can be performed by using haxelib, you will need a the haxeui-core haxelib as well as the haxeui-hxwidgets backend:
haxelib install haxeui-core
haxelib install haxeui-hxwidgets
The simplest method to create a new hxWidgets application that is HaxeUI ready is to use the CLI to create a skeleton project:
haxelib run haxeui-core create hxwidgets
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.
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();
app.init();
var frame:Frame = new Frame(null, "My App");
frame.resize(800, 600);
frame.show();
app.run();
app.exit();
}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:
Toolkit.init({
frame: frame // the frame on which 'Screen' will place components
});Once the toolkit is initialised you can add components using the methods specified here.
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.
The configuration options that may be passed to Tookit.init() are as follows:
Toolkit.init({
frame: frame // the frame on which 'Screen' will place components
});- component-explorer - Browse HaxeUI components
- playground - Write and test HaxeUI layouts in your browser
- component-examples - Various componet examples
- haxeui-api - The HaxeUI api docs.
- haxeui-guides - Set of guides to working with HaxeUI and backends.
