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 https://github.com/haxeui/haxeui-core
haxelib dev haxeui-html5 path/to/expanded/source/archive
If however you already have an existing application, then incorporating HaxeUI into that application is straight forward:
If you are using a command line build (via a `.hxml` file) then simply add these two lines:-lib haxeui-core
-lib haxeui-html5
If you are using an IDE (like Flash Develop simply add these lines via the project settings window)
Note: Currently you must also include haxeui-core
explicitly during the alpha, eventually haxelib.json
files will exist to take care of this dependency automatically.
Toolkit.init();
Once the toolkit is initialised you can add components using the methods specified here.
As well as using the generic Screen.instance.addComponent
, it is also possible to simply add components directly to any other DOM node, the haxeui-html5
backend exposes a special element
property for this purpose. Eg:
js.Browser.document.getElementById("myContainer").appendChild(main.element);
Toolkit.init({
container: js.Browser.document.getElementById("myContainer") // where 'Screen' will place components
// defaults to the document body
});
<h2>Addtional resources</h2>
* <a href="http://haxeui.github.io/haxeui-api/">haxeui-api</a> - The HaxeUI api docs.
* <a href="https://github.com/haxeui/haxeui-guides">haxeui-guides</a> - Set of guides to working with HaxeUI and backends.
* <a href="https://github.com/haxeui/haxeui-demo">haxeui-demo</a> - Demo application written using HaxeUI.
* <a href="https://github.com/haxeui/haxeui-templates">haxeui-templates</a> - Set of templates for IDE's to allow quick project creation.
* <a href="https://github.com/haxeui/haxeui-bdd">haxeui-bdd</a> - A behaviour driven development engine written specifically for HaxeUI (uses <a href="https://github.com/haxeui/haxe-bdd">haxe-bdd</a> which is a gherkin/cucumber inspired project).
* <a href="https://www.youtube.com/watch?v=L8J8qrR2VSg&feature=youtu.be">WWX2016 presentation</a> - A presentation given at WWX2016 regarding HaxeUI.