HaxeUI Tutorial

Basic App Structure

John Gabriele

After creating your new mostly-empty HaxeUI project, if targetting hxWidgets you’ll have the following files:

.
├── assets
│   └── main.xml
├── hxwidgets.hxml
└── src
    ├── haxeui-hxwidgets.properties
    └── Main.hx

The assets/main.xml file contains the widget layout of your app. If you wanted to, you could instead programmatically specify widget layout in src/Main.hx (laboriously creating all the widget objects and adding them to their parent containers), but it’s way easier to have all that layout info in the separate assets/main.xml file and just load it in, as the default Main.hx file does.

Look in the hxwidgets.hxml build file to see the haxe compiler options used to build your project.

Open up the assets/main.xml file, modify it (try adding more buttons), and rebuild & run your app to see the changes.

Look in src/Main.hx to see how the app object is created and started in your main method.