zul.box.Hlayout=zk.$extends(zul.box.Layout,{_valign:"top",$define:{valign:function(){this.updateDomClass_()}},bind_:function(){this.$supers(zul.box.Hlayout,"bind_",arguments);zWatch.listen({_beforeSizeForRead:this,beforeSize:this,onFitSize:this})},unbind_:function(){zWatch.unlisten({_beforeSizeForRead:this,beforeSize:this,onFitSize:this});this.$supers(zul.box.Hlayout,"unbind_",arguments)},isVertical_:function(){return!1},domClass_:function(){var a=this.$supers("domClass_",arguments),b;"middle"==(b=
this._valign)?a+=" z-valign-middle":"bottom"==b&&(a+=" z-valign-bottom");return a},getFlexDirection_:function(){return"row"},_beforeSizeForRead:function(){var a=this.$n();this._beforeSizeWidth=a?a.offsetWidth:0;for(var b=this.firstChild;b;b=b.nextSibling)a=b.$n(),b._beforeSizeWidth=a?a.offsetWidth:0},beforeSize:function(){var a=this.firstChild,b=this._beforeSizeWidth,c=null!=b?b:this.$n().offsetWidth,e=0;for(b=[];a;a=a.nextSibling){if(a.isVisible()&&!zk(a).hasVParent()){var d=a._nhflex,f=a.$n();d?
(b.push({wgt:a,flex:d}),e+=d):f&&(d=a._beforeSizeWidth,f=null!=d?d:f.offsetWidth,c-=f,a.$n("chdex").style.width=jq.px0(f))}delete a._beforeSizeWidth}if(0<e)for(a=c/e,c=0,e=b.length;c<e;c++)b[c].wgt.$n("chdex").style.width=jq.px0(a*b[c].flex);delete this._beforeSizeWidth},onFitSize:function(){for(var a=this.firstChild;a;a=a.nextSibling)a.isVisible()&&!zk(a).hasVParent()&&(a.$n("chdex").style.width="")}});
