Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

29 Commits

Repository files navigation

StablexUI backend for HML Build Status

Installation

haxelib git hml https://github.com/profelis/hml.git
haxelib git stablexui-hml https://github.com/StablexUI/Hml master

Special cases

  • Values for metric properties can be specified with units (DIPS by default):
<Widgetleft="20%"top="100px"height="200dip"width="300" />
  • StablexUI enums are imported automatically, so you can use them without fully qualified names:
<Box align="Right & Bottom" orientation="Horizontal" />
  • Signal handlers
    • If you dont need to use signal arguments
    <ButtononTrigger="trace('Button triggered!');" />
    • If you need to use signal arguments, then you must define a closure with the same amount of arguments
    <Buttonname="'myButton'"onTrigger=" function(btn) trace(btn.name + ' triggered'); " />
    • If you need to define multiple handlers for the same signal
    <Button>
    <onTrigger>trace('first handler');</onTrigger>
    <onTrigger>trace('second handler');</onTrigger>
    </Button>
  • destroyHml() will be automatically called when you dispose() widget created via xml

Using with hxml project files

Put your xml files in <project_root>/hml/xml. Generated files will be written to <preject_root>/hml/gen. Add it to your classpaths.

Now if your build.hxml looks like this:

-main Main
-cp hml/gen
-lib someLib
-lib anotherLib
-swf bin/app.swf

You need to create hml.hxml like this:

-main sx.hml.Generator
--no-output
-lib stablexui-hml
-cp hml/gen
-lib someLib
-lib anotherLib
-swf bin/app.swf

And run it with haxe hml.hxml before haxe build.hxml.

Using with OpenFL and NME

Add to your project configuration file this section:

<sourcepath="hml/gen" />
<sectionif="hml">
<haxelibname="stablexui-hml" />
<appmain="sx.hml.Generator"/>
<haxeflagname="--no-output"/>
</section>

And run openfl build <platform> -Dhml before openfl build <platform>.

Example

See example

About

StablexUI adapter for HML

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages