@:uiComp("view") // Naming scheme of component classes can be customized with domkit.Macros.registerComponentsPath(); class ViewComp extends h2d.Flow implements h2d.domkit.Object { static var SRC = for( i in icons ) ; public function new(align:h2d.Flow.FlowAlign,icons:Array,?parent) { super(parent); initComponent(); } } @:uiComp("button") class ButtonComp extends h2d.Flow implements h2d.domkit.Object { static var SRC = public var label(get, set): String; function get_label() return labelTxt.text; function set_label(s) { labelTxt.text = s; return s; } public function new( ?parent ) { super(parent); initComponent(); enableInteractive = true; interactive.onClick = function(_) onClick(); interactive.onOver = function(_) { dom.hover = true; }; interactive.onPush = function(_) { dom.active = true; }; interactive.onRelease = function(_) { dom.active = false; }; interactive.onOut = function(_) { dom.hover = false; }; } public dynamic function onClick() { } } @:uiComp("container") class ContainerComp extends h2d.Flow implements h2d.domkit.Object { static var SRC =