a07389c2f3ee849249fe932bec35c83f3d2f10ef
[ab/samba.git/.git] / swat / style / qooxdoo / widgets / widgets / QxWidget.js
1 /* Copyright (c): 2002-2005 (Germany): United Internet, 1&1, GMX, Schlund+Partner, Alturo */
2 function QxWidget(){QxTarget.call(this);this._a2=[];this._htmlProperties=copyCreateHash(this._htmlProperties);this._htmlProperties.id="QxWidget-"+(++QxWidget._count);this._htmlProperties.className=this.classname;if(isInvalid(this._htmlProperties.hideFocus)){this._htmlProperties.hideFocus=false;};if(isInvalid(this._htmlProperties.unselectable)){this._htmlProperties.unselectable="on";};this._htmlAttributes=copyCreateHash(this._htmlAttributes);this._styleProperties=copyCreateHash(this._styleProperties);this._usedDimensionsHorizontal=[];this._usedDimensionsVertical=[];};QxWidget.extend(QxTarget,"QxWidget");QxWidget._count=0;QxWidget.addProperty({name:"parent",defaultValue:null});QxWidget.addProperty({name:"element"});QxWidget.addProperty({name:"visible",type:Boolean,defaultValue:false,getAlias:"isVisible"});QxWidget.addProperty({name:"anonymous",type:Boolean,defaultValue:false,getAlias:"isAnonymous"});QxWidget.addProperty({name:"tagName",type:String,defaultValue:"DIV"});QxWidget.addProperty({name:"cssClassName",type:String});QxWidget.addProperty({name:"timerCreate",type:Boolean,defaultValue:true});QxWidget.addProperty({name:"layoutHint",defaultValue:"auto"});QxWidget.addProperty({name:"position",type:String,impl:"styleProperty"});QxWidget.addProperty({name:"float",type:String,impl:"floatStyleProperty"});QxWidget.addProperty({name:"display",type:String,impl:"styleProperty",defaultValue:"none"});QxWidget.addProperty({name:"visibility",type:String,impl:"styleProperty",defaultValue:"hidden"});QxWidget.addProperty({name:"textAlign",type:String,impl:"styleProperty"});QxWidget.addProperty({name:"verticalAlign",type:String,impl:"styleProperty"});QxWidget.addProperty({name:"horizontalAlign",type:String});QxWidget.addProperty({name:"zIndex",type:Number,impl:"styleProperty"});QxWidget.addProperty({name:"backgroundColor",type:QxColor,impl:"styleProperty"});QxWidget.addProperty({name:"color",type:QxColor,impl:"styleProperty"});QxWidget.addProperty({name:"border",type:Object});QxWidget.addProperty({name:"opacity",type:Number});QxWidget.addProperty({name:"cursor",type:String});QxWidget.addProperty({name:"backgroundImage",type:String});QxWidget.addProperty({name:"overflow",type:String});QxWidget.addProperty({name:"clip",type:Object});QxWidget.addProperty({name:"tabIndex",type:Number,defaultValue:-1});QxWidget.addProperty({name:"focused",type:Boolean,defaultValue:false});QxWidget.addProperty({name:"canSelect",type:Boolean,defaultValue:true});QxWidget.addProperty({name:"toolTip",type:Object});QxWidget.addProperty({name:"contextMenu",type:Object});QxWidget.addProperty({name:"state",type:String});QxWidget.addProperty({name:"capture",type:Boolean,defaultValue:false});QxWidget.addProperty({name:"dropDataTypes",type:Object});QxWidget.addProperty({name:"command",type:Object});QxWidget.addProperty({name:"appearance",type:String});QxWidget.addProperty({name:"marginTop",type:Number,defaultValue:0,impl:"marginVertical",groups:["margin"]});QxWidget.addProperty({name:"marginRight",type:Number,defaultValue:0,impl:"marginHorizontal",groups:["margin"]});QxWidget.addProperty({name:"marginBottom",type:Number,defaultValue:0,impl:"marginVertical",groups:["margin"]});QxWidget.addProperty({name:"marginLeft",type:Number,defaultValue:0,impl:"marginHorizontal",groups:["margin"]});QxWidget.addProperty({name:"paddingTop",type:Number,defaultValue:0,impl:"paddingVertical",groups:["padding"]});QxWidget.addProperty({name:"paddingRight",type:Number,defaultValue:0,impl:"paddingHorizontal",groups:["padding"]});QxWidget.addProperty({name:"paddingBottom",type:Number,defaultValue:0,impl:"paddingVertical",groups:["padding"]});QxWidget.addProperty({name:"paddingLeft",type:Number,defaultValue:0,impl:"paddingHorizontal",groups:["padding"]});QxWidget.addProperty({name:"left",impl:"horizontalDimension",groups:["location","space","edge"]});QxWidget.addProperty({name:"right",impl:"horizontalDimension",groups:["edge"]});QxWidget.addProperty({name:"width",impl:"horizontalDimension",groups:["dimension","space"]});QxWidget.addProperty({name:"minWidth",impl:"horizontalLimitDimension",defaultValue:-Infinity});QxWidget.addProperty({name:"maxWidth",impl:"horizontalLimitDimension",defaultValue:Infinity});QxWidget.addProperty({name:"top",impl:"verticalDimension",groups:["location","space","edge"]});QxWidget.addProperty({name:"bottom",impl:"verticalDimension",groups:["edge"]});QxWidget.addProperty({name:"height",impl:"verticalDimension",groups:["dimension","space"]});QxWidget.addProperty({name:"minHeight",impl:"verticalLimitDimension",defaultValue:-Infinity});QxWidget.addProperty({name:"maxHeight",impl:"verticalLimitDimension",defaultValue:Infinity});proto.isCreated=function(){return Boolean(this.getElement());};proto._visualPropertyCheck=function(){if(!this.isCreated()){throw new Error("Create the element first!");};};proto.getStyle=function(){var el=this.getElement();if(!el){throw new Error("Element is not already created!");};return el.style;};proto._createElement=function(_b4){return this.setElement(this.getTopLevelWidget().getDocumentElement().createElement(this.getTagName()),_b4);};proto._getParentNodeForChild=function(otherObject){return this.getElement();};proto._createChildren=function(){var ch=this.getChildren();var chl=ch.length;var cho;var el;try{for(var i=0;i<chl;i++){cho=ch[i];switch(cho.isCreated()){case true:el=cho.getElement();if(!el.parentNode&&cho._shouldBecomeCreated()){this._getParentNodeForChild(cho).appendChild(el);};break;case false:if(cho._shouldBecomeCreated()){cho._createElementWrapper();};break;};};}catch(ex){throw new Error("Failed to setup children:"+ex);};};proto._shouldBecomeCreated=function(){return true;};proto._shouldBecomeChilds=function(){return true;};proto._shouldBecomeVisible=function(){return true;};proto._appendElement=function(otherObject){var pl=this._getParentNodeForChild(otherObject);if(pl){var el=otherObject.getElement();try{pl.appendChild(el);el.scrollTop=el.scrollLeft=pl.scrollTop=pl.scrollLeft=0;}catch(ex){throw new Error("Could not append element:"+el+" to "+pl+":"+ex);};this._postAppendChild(otherObject);}else {throw new Error("No parent node available for this widget:"+otherObject+")");};};proto._removeElement=function(otherObject){var el=otherObject.getElement();var pl=el.parentNode;if(pl){try{pl.removeChild(el);}catch(ex){throw new Error("Could not remove element:"+el+":"+ex);};this._postRemoveChild(otherObject);};};proto._postAppendChild=function(otherObject){if(!this._wasVisible){return;};this._invalidatePreferred();this._onnewchild(otherObject);};proto._onnewchild=function(otherObject){if(this.getWidth()=="auto"){this._setChildrenDependWidth(otherObject,"append-child");};if(this.getHeight()=="auto"){this._setChildrenDependHeight(otherObject,"append-child");};};proto._postRemoveChild=function(otherObject){if(!this._wasVisible){return;};this._invalidatePreferred();this._onremovechild(otherObject);};proto._onremovechild=function(otherObject){if(this.getWidth()=="auto"){this._setChildrenDependWidth(otherObject,"remove-child");};if(this.getHeight()=="auto"){this._setChildrenDependHeight(otherObject,"remove-child");};};proto._appendMyself=function(){var pa=this.getParent();if(pa){pa._appendElement(this);};};proto._removeMyself=function(vParent){if(vParent){vParent._removeElement(this);};};proto._beforeShow=function(_b4){};proto._beforeHide=function(_b4){};QxWidget._createList=[];QxWidget._createListLength=0;QxWidget._createListMaxCount=0;QxWidget._createMaxTimeout=500;QxWidget._createInterval=10;QxWidget.addToCreateList=function(vWidget){QxWidget._createList.push(vWidget);QxWidget._createListMaxCount++;QxWidget._createListLength++;if(QxWidget._createTimer==null){var vWin=window.application.getClientWindow();if(vWin&&vWin.hasEventListeners("creatorStarted")){vWin.dispatchEvent(new QxEvent("creatorStarted"),true);};this._createStart=(new Date).valueOf();QxWidget._createTimer=window.setInterval("QxWidget._timeCreator()",QxWidget._createInterval);};};QxWidget._timeCreator=function(){if(this._timeCreatorRun){return;};this._timeCreatorRun=true;var vParent,vCurrent;var vList=QxWidget._createList;var vStart=(new Date).valueOf();while((vCurrent=vList[0])&&((new Date).valueOf()-vStart)<QxWidget._createMaxTimeout){if(vCurrent.isCreated()){vList.shift();continue;};vParent=vCurrent.getParent();if(vParent&&vParent.isCreated()){vCurrent._createElement();vList.shift();QxWidget._createListLength--;};};var vWin=window.application.getClientWindow();if(vWin&&vWin.hasEventListeners("creatorInterval")){vWin.dispatchEvent(new QxDataEvent("creatorInterval",100-Math.round(QxWidget._createListLength/QxWidget._createListMaxCount*100)),true);};if(QxWidget._createListLength==0){window.clearInterval(QxWidget._createTimer);QxWidget._createTimer=null;QxWidget._createListMaxCount=0;var vWin=window.application.getClientWindow();if(vWin&&vWin.hasEventListeners("creatorStopped")){vWin.dispatchEvent(new QxEvent("creatorStopped"),true);};};delete this._timeCreatorRun;};proto._createElementWrapper=function(_b4){var vParent=this.getParent();if(this.getTimerCreate()&&vParent.getWidth()!="auto"&&vParent.getHeight()!="auto"){QxWidget.addToCreateList(this);}else {this._createElement(_b4);};};proto._modifyParent=function(_b1,_b2,_b3,_b4){if(_b2){_b2._removeChild(this);if(this.isCreated()){this._removeMyself(_b2);};};if(_b1){if(this.contains(_b1)){throw new Error("Could not add me to a child!");};_b1._pushChild(this);if(_b1.isCreated()){if(!_b1._shouldBecomeChilds()){return true;}else if(!this._shouldBecomeCreated()){return true;}else if(!this.isCreated()){this._createElementWrapper(_b4);}else {this._appendMyself();this._render("force");};};};return true;};proto._modifyElement=function(_b1,_b2,_b3,_b4){if(_b2){this._removeMyself(this.getParent());_b2._QxWidget=null;_b2.id="";_b2.name="";this._removeInlineEvents(_b2);};if(_b1){_b1._QxWidget=this;this._applyStyleProperties(_b1,_b4);this._applyHtmlProperties(_b1,_b4);this._applyHtmlAttributes(_b1,_b4);this._addInlineEvents(_b1);this.setVisible(true,_b4);};return true;};if((new QxClient).isMshtml()){proto._addInlineEvents=function(el){el.onpropertychange=QxWidget.__oninlineevent;el.attachEvent("onselect",QxWidget.__oninlineevent);el.attachEvent("onscroll",QxWidget.__oninlineevent);el.attachEvent("onfocus",QxWidget.__oninlineevent);el.attachEvent("onblur",QxWidget.__oninlineevent);};proto._removeInlineEvents=function(el){el.onpropertychange=null;el.detachEvent("onselect",QxWidget.__oninlineevent);el.detachEvent("onscroll",QxWidget.__oninlineevent);el.detachEvent("onfocus",QxWidget.__oninlineevent);el.detachEvent("onblur",QxWidget.__oninlineevent);};}else {proto._addInlineEvents=function(el){el.addEventListener("select",QxWidget.__oninlineevent,false);el.addEventListener("scroll",QxWidget.__oninlineevent,false);el.addEventListener("focus",QxWidget.__oninlineevent,false);el.addEventListener("blur",QxWidget.__oninlineevent,false);};proto._removeInlineEvents=function(el){el.removeEventListener("select",QxWidget.__oninlineevent,false);el.removeEventListener("scroll",QxWidget.__oninlineevent,false);el.removeEventListener("focus",QxWidget.__oninlineevent,false);el.removeEventListener("blur",QxWidget.__oninlineevent,false);};};QxWidget.__oninlineevent=function(e){if(this._QxWidget){return this._QxWidget._oninlineevent(e);};};proto._oninlineevent=function(e){if(!e){e=window.event;};switch(e.type){case "focus":case "blur":case "select":case "scroll":case "load":break;case "propertychange":break;default:this.debug("Uncatched inline event:"+e.type);};};proto._wasVisible=false;proto._modifyVisible=function(_b1,_b2,_b3,_b4){if(_b1){if(!this.isCreated()){this.forceVisible(false);this._createElementWrapper();return true;};if(!this._wasVisible){this.setDisplay(null);this._appendMyself();var vAutoWidth=this._typeof_width=="auto";var vAutoHeight=this._typeof_height=="auto";if(vAutoWidth||vAutoHeight){this._createChildren();if(vAutoWidth){this._setChildrenDependWidth();};if(vAutoHeight){this._setChildrenDependHeight();};this._render("initial");this._wasVisible=true;var ch=this.getChildren();var chl=ch.length;for(var i=0;i<chl;i++){ch[i]._render("initial");};}else {this._render("initial");this._wasVisible=true;this._createChildren();};this._invalidatePreferred();}else {this.setDisplay(null);if(this._renderHorizontalOmitted){this._renderHorizontal("force");this._renderHorizontalOmitted=false;};if(this._renderVerticalOmitted){this._renderVertical("force");this._renderVerticalOmitted=false;};};this._beforeShow(_b4);this.setVisibility("inherit",_b4);}else {this._beforeHide(_b4);this.setVisibility("hidden",_b4);this.setDisplay("none");};return true;};proto.getChildren=function(){return this._a2;};proto.getChildrenLength=function(){return this.getChildren().length;};proto.hasChildren=function(){return this.getChildrenLength()>0;};proto.getTopLevelWidget=function(){var p=this.getParent();if(p==null){return null;};return p.getTopLevelWidget();};proto.add=function(){var l=arguments.length;var o;for(var i=0;i<l;i++){o=arguments[i];if(!(o instanceof QxWidget)){if(o instanceof Array){var j;for(j=0;j<o.length;j++){this.add(o[j]);};for(j in o){if(o[j]instanceof QxWidget){this.add(o[j]);};};}else {throw new Error("Invalid Widget:"+o);};}else {o.setParent(this);};};return this;};proto.addBefore=function(otherWidget,beforeWidget){if(!(otherWidget instanceof QxWidget)||!(beforeWidget instanceof QxWidget)){throw new Error("Invalid widgets:"+otherWidget+","+beforeWidget);};if(beforeWidget.getParent()!=this){throw new Error("Invalid before widget:"+beforeWidget+". Should be child of same parent!");};if(otherWidget.contains(this)){throw new Error("Could not add me to a child!");};var ch=this.getChildren();var oldLength=ch.length;ch.remove(otherWidget);ch.insertBefore(otherWidget,beforeWidget);this._complexAdd(otherWidget,oldLength);};proto.addAfter=function(otherWidget,afterWidget){if(!(otherWidget instanceof QxWidget)||!(afterWidget instanceof QxWidget)){throw new Error("Invalid widgets:"+otherWidget+","+afterWidget);};if(afterWidget.getParent()!=this){throw new Error("Invalid after widget:"+afterWidget+". Should be child of same parent!");};if(otherWidget.contains(this)){throw new Error("Could not add me to a child!");};var ch=this.getChildren();var oldLength=ch.length;ch.remove(otherWidget);ch.insertAfter(otherWidget,afterWidget);this._complexAdd(otherWidget,oldLength);};proto._complexAdd=function(otherWidget,oldLength){var ch=this._a2;var newLength=ch.length;if(otherWidget.getParent()==this){this.syncChildrenOrder();if(newLength!=oldLength&&newLength==1){this._firstChildCache=otherWidget;this._lastChildCache=otherWidget;if(this.isCreated()&&oldLength>1){this._obtainFirstChild();};if(otherWidget.isCreated()){otherWidget._obtainFirstChildState();};}else {var newFirst=ch[0];if(this._firstChildCache&&this._firstChildCache!=newFirst){var oldFirst=this._firstChildCache;this._firstChildCache=newFirst;if(oldFirst.isCreated()){oldFirst._loseFirstChildState();};if(newFirst.isCreated()){newFirst._obtainFirstChildState();};};var newLast=ch[newLength-1];if(this._lastChildCache&&this._lastChildCache!=newLast){var oldLast=this._lastChildCache;this._lastChildCache=newLast;if(oldLast.isCreated()){oldLast._loseLastChildState();};if(newLast.isCreated()){newLast._obtainLastChildState();};};};}else {otherWidget.setParent(this);this.syncChildrenOrder();};};proto.syncChildrenOrder=function(){if(!this.isCreated()){return;};var ch=this.getChildren().copy();var chl=ch.length;var chc;var che;for(var i=0;i<chl;i++){chc=ch[i];che=chc.getElement();if(chc.isCreated()&&che.parentNode){this._getParentNodeForChild(chc).appendChild(che);};};};proto.remove=function(){var l=arguments.length;var o;for(var i=0;i<l;i++){o=arguments[i];if(!(o instanceof QxWidget)){throw new Error("Invalid Widget:"+o);}else {o.setParent(null);};};};proto.removeAll=function(){var cs=this.getChildren();var co=cs[0];while(co){this.remove(co);co=cs[0];};};proto.contains=function(des){if(des==null){return false;};if(des==this){return true;};return this.contains(des.getParent());};proto.getPreviousSibling=function(){var p=this.getParent();if(p==null){return null;};var cs=p.getChildren();return cs[cs.indexOf(this)-1];};proto.getNextSibling=function(){var p=this.getParent();if(p==null){return null;};var cs=p.getChildren();return cs[cs.indexOf(this)+1];};QxWidget.getActiveSiblingHelperIgnore=function(vIgnoreClasses,vInstance){for(var j=0;j<vIgnoreClasses.length;j++){if(vInstance instanceof vIgnoreClasses[j]){return true;};};return false;};QxWidget.getActiveSiblingHelper=function(vObject,vParent,vCalc,vIgnoreClasses,vMode){if(!vIgnoreClasses){vIgnoreClasses=[];};var vChilds=vParent.getChildren();var vPosition;if(isInvalid(vMode)){vPosition=vChilds.indexOf(vObject)+vCalc;}else {vPosition=vMode=="first"?0:vChilds.length-1;};var vInstance=vChilds[vPosition];while(!vInstance.isEnabled()||QxWidget.getActiveSiblingHelperIgnore(vIgnoreClasses,vInstance)){vPosition+=vCalc;vInstance=vChilds[vPosition];if(!vInstance){return null;};};return vInstance;};proto.getPreviousActiveSibling=function(vIgnoreClasses){var vPrev=QxWidget.getActiveSiblingHelper(this,this.getParent(),-1,vIgnoreClasses,null);return vPrev?vPrev:this.getParent().getLastActiveChild();};proto.getNextActiveSibling=function(vIgnoreClasses){var vMext=QxWidget.getActiveSiblingHelper(this,this.getParent(),1,vIgnoreClasses,null);return vMext?vMext:this.getParent().getFirstActiveChild();};proto.isFirstChild=function(){var pa=this.getParent();if(!pa){return false;};return pa.getFirstChild()==this;};proto.isLastChild=function(){var pa=this.getParent();if(!pa){return false;};return pa.getLastChild()==this;};proto.getFirstActiveChild=function(vIgnoreClasses){return QxWidget.getActiveSiblingHelper(null,this,1,vIgnoreClasses,"first");};proto.getLastActiveChild=function(vIgnoreClasses){return QxWidget.getActiveSiblingHelper(null,this,-1,vIgnoreClasses,"last");};proto._firstChildCache=null;proto._lastChildCache=null;proto.getFirstChild=function(){if(this._firstChildCache==null){var ch=this.getChildren();if(ch.length>0){this._firstChildCache=ch[0];ch[0]._getFirstChildState();};};return this._firstChildCache;};proto.getLastChild=function(){if(this._lastChildCache==null){var ch=this.getChildren();if(ch.length>0){this._lastChildCache=ch[ch.length-1];ch[ch.length-1]._getLastChildState();};};return this._lastChildCache;};proto._pushChild=function(o){var ch=this.getChildren();var chi=ch.indexOf(o);if(chi==-1){ch.push(o);if(ch.length==1){this._firstChildCache=o;this._lastChildCache=o;if(this.isCreated()){this._obtainFirstChild();};}else {if(this._lastChildCache){var oc=this._lastChildCache;this._lastChildCache=o;oc._loseLastChildState();};};}else {if(ch.length==1){this._firstChildCache=o;this._lastChildCache=o;if(this.isCreated()){this._obtainFirstChild();};}else {if(this._lastChildCache&&chi==(ch.length-1)){var oc=this._lastChildCache;this._lastChildCache=o;if(oc.isCreated()){oc._loseLastChildState();};};};};};proto._removeChild=function(o){var ch=this.getChildren();ch.remove(o);if(ch.length==0){this._loseAllChilds();};if(this._firstChildCache==o){if(ch.length>0){this._firstChildCache=ch[0];ch[0]._obtainFirstChildState();}else {this._firstChildCache=null;};o._loseFirstChildState();};if(this._lastChildCache==o){if(ch.length>0){this._lastChildCache=ch[ch.length-1];ch[ch.length-1]._obtainLastChildState();}else {this._lastChildCache=null;};o._loseLastChildState();};};proto._obtainFirstChildState=function(){};proto._obtainLastChildState=function(){};proto._loseFirstChildState=function(){};proto._loseLastChildState=function(){};proto._obtainFirstChild=function(){};proto._loseAllChilds=function(){};proto._modifyEnabled=function(_b1,_b2,_b3,_b4){QxTarget.prototype._modifyEnabled.call(this,_b1,_b2,_b3,_b4);var vClasses=this.getCssClassName();var vDisClassA="QxDisabled";var vDisClassB=this.classname+"Disabled";if(_b1){this.removeHtmlProperty("disabled");this.setCssClassName(vClasses.remove(vDisClassA," ").remove(vDisClassB," "));}else {this.setHtmlProperty("disabled",true);this.setCssClassName(vClasses.add(vDisClassA," ").add(vDisClassB," "));};return true;};proto._modifyState=function(_b1,_b2,_b3,_b4){var vClasses=this.getCssClassName();if(isValidString(_b2)){vClasses=vClasses.remove(this.classname+"-"+_b2.toFirstUp()," ");};if(isValidString(_b1)){vClasses=vClasses.add(this.classname+"-"+_b1.toFirstUp()," ");};this.setCssClassName(vClasses,_b4);this._recalculateFrame();return true;};proto._modifyAppearance=function(_b1,_b2,_b3,_b4){return true;};proto.setHtmlProperty=function(n,v){this._htmlProperties[n]=v;var el=this.getElement();if(el){el[n]=v;};return true;};proto.removeHtmlProperty=function(n){delete this._htmlProperties[n];var el=this.getElement();if(el){el.removeAttribute(n);if((new QxClient).isNotMshtml()){try{delete el[n];}catch(ex){};};};return true;};proto.getHtmlProperty=function(n){var el=this.getElement();return el?el[n]:this._htmlProperties[n];};proto._applyHtmlProperties=function(el){for(var i in this._htmlProperties){el[i]=this._htmlProperties[i];};};proto.setHtmlAttribute=function(n,v){this._htmlAttributes[n]=v;var el=this.getElement();if(el){el.setAttribute(n,v);};return true;};proto.removeHtmlAttribute=function(n){delete this._htmlAttributes[n];var el=this.getElement();if(el){el.removeAttribute(n);};return true;};proto.getHtmlAttribute=function(n){var el=this.getElement();return el?el.getAttribute(n):this._attributes[n];};proto._applyHtmlAttributes=function(el){for(var i in this._htmlAttributes){el.setAttribute(i,this._htmlAttributes[i]);};};proto._evalCurrentStyleProperty=function(_b3){return this.isCreated()?QxDOM.getComputedStyleProperty(this.getElement(),_b3):null;};proto.getStyleProperty=function(_b3){var _b1=this._styleProperties[_b3]||this._evalCurrentStyleProperty(_b3);return isValid(_b1)?_b1:null;};proto.setStyleProperty=function(_b3,_b1,_b4){return this._modifyStyleProperty(_b1,null,_b3,_b4);};proto.removeStyleProperty=function(_b3){delete this._styleProperties[_b3];var el=this.getElement();if(el){el.style[_b3]="";};return true;};proto._modifyStyleProperty=function(_b1,_b2,_b3,_b4){this._styleProperties[_b3]=_b1;try{this.getElement().style[_b3]=isValid(_b1)?_b1:"";}catch(ex){};return true;};proto._modifyFloatStyleProperty=function(_b1,_b2,_b3,_b4){return this._modifyStyleProperty(_b1,_b2,"cssFloat",_b4);};proto._applyStyleProperties=function(el){for(var i in this._styleProperties){el.style[i]=this._styleProperties[i];};};proto.getAnyWidth=function(){var w=this.getWidth();var wu=w=="auto"?null:w;if(!wu&&!this.isCreated()){return 0;};if(this._pixelof_width!=null){wu=Math.max(this._pixelof_width,wu);};return wu||this.getPreferredWidth()||this.getComputedBoxWidth()||0;};proto.getAnyHeight=function(){var h=this.getHeight();var hu=h=="auto"?null:h;if(!hu&&!this.isCreated()){return 0;};if(this._pixelof_height!=null){hu=Math.max(this._pixelof_height,hu);};return hu||this.getPreferredHeight()||this.getComputedBoxHeight()||0;};proto._widthAuto=false;proto._widthMode=null;proto._widthModeValue=null;proto.setWidth=function(_b1,_b4,vMode,vKeepAuto){var _b2=this.getWidth();this._widthMode=isValid(vMode)?vMode:"box";this._widthModeValue=_b1;if(_b1=="auto"){this._widthAuto=true;if(this._wasVisible){return this._setChildrenDependWidth();};}else if(isInvalid(vKeepAuto)){this._widthAuto=false;}else if(vKeepAuto==true){if(!this._widthAuto){throw new Error("Width was not auto previously!:"+_b1);};};this._valueWidth=_b1;this._nullWidth=_b1==null;try{var r=this._modifyHorizontalDimension(_b1,_b2,"width",_b4);if(!r){throw new Error("Failed without exception:width[horizontalDimension|"+r+"]");};}catch(ex){this.debug("Failed to modify property width:"+ex);return false;};if(vKeepAuto){this._valueWidth="auto";this._nullWidth=false;};return _b1;};proto._heightAuto=false;proto._heightMode=null;proto._heightModeValue=null;proto.setHeight=function(_b1,_b4,vMode,vKeepAuto){var _b2=this.getHeight();this._heightMode=isValid(vMode)?vMode:"box";this._heightModeValue=_b1;if(_b1=="auto"){this._heightAuto=true;if(this._wasVisible){return this._setChildrenDependHeight();};}else if(isInvalid(vKeepAuto)){this._heightAuto=false;}else if(vKeepAuto==true){if(!this._heightAuto){throw new Error("Height was not auto previously:"+_b1);};};this._valueHeight=_b1;this._nullHeight=_b1==null;try{var r=this._modifyVerticalDimension(_b1,_b2,"height",_b4);if(!r){throw new Error("Failed without exception:height[verticalDimension|"+r+"]");};}catch(ex){this.debug("Failed to modify property height:"+ex);return false;};if(vKeepAuto){this._valueHeight="auto";this._nullHeight=false;};return _b1;};proto.setBoxWidth=function(_b1,_b4,vKeepAuto){return this.setWidth(_b1,_b4,"box",vKeepAuto);};proto.setAreaWidth=function(_b1,_b4,vKeepAuto){return this.setWidth(_b1,_b4,"area",vKeepAuto);};proto.setInnerWidth=function(_b1,_b4,vKeepAuto){return this.setWidth(_b1,_b4,"inner",vKeepAuto);};proto.setBoxHeight=function(_b1,_b4,vKeepAuto){return this.setHeight(_b1,_b4,"box",vKeepAuto);};proto.setAreaHeight=function(_b1,_b4,vKeepAuto){return this.setHeight(_b1,_b4,"area",vKeepAuto);};proto.setInnerHeight=function(_b1,_b4,vKeepAuto){return this.setHeight(_b1,_b4,"inner",vKeepAuto);};proto._minWidthMode=null;proto._maxWidthMode=null;proto._minHeightMode=null;proto._maxHeightMode=null;proto._minWidthModeValue=null;proto._maxWidthModeValue=null;proto._minHeightModeValue=null;proto._maxHeightModeValue=null;proto.setMinWidth=function(_b1,_b4,vMode){var _b2=this.getMinWidth();this._minWidthMode=isValid(vMode)?vMode:"box";this._minWidthModeValue=_b1;this._valueMinWidth=_b1;this._nullMinWidth=_b1==null;try{var r=this._modifyHorizontalLimitDimension(_b1,_b2,"minWidth",_b4);if(!r){throw new Error("Failed without exception:minWidth[horizontalLimitDimension|"+r+"]");};}catch(ex){return false;};return _b1;};proto.setMaxWidth=function(_b1,_b4,vMode){var _b2=this.getMinWidth();this._maxWidthMode=isValid(vMode)?vMode:"box";this._maxWidthModeValue=_b1;this._valueMaxWidth=_b1;this._nullMaxWidth=_b1==null;try{var r=this._modifyHorizontalLimitDimension(_b1,_b2,"maxWidth",_b4);if(!r){throw new Error("Failed without exception:maxWidth[horizontalLimitDimension|"+r+"]");};}catch(ex){return false;};return _b1;};proto.setMinHeight=function(_b1,_b4,vMode){var _b2=this.getMinHeight();this._minHeightMode=isValid(vMode)?vMode:"box";this._minHeightModeValue=_b1;this._valueMinHeight=_b1;this._nullMinHeight=_b1==null;try{var r=this._modifyVerticalLimitDimension(_b1,_b2,"minHeight",_b4);if(!r){throw new Error("Failed without exception:minHeight[verticalLimitDimension|"+r+"]");};}catch(ex){return false;};return _b1;};proto.setMaxHeight=function(_b1,_b4,vMode){var _b2=this.getMaxHeight();this._maxHeightMode=isValid(vMode)?vMode:"box";this._maxHeightModeValue=_b1;this._valueMaxHeight=_b1;this._nullMaxHeight=_b1==null;try{var r=this._modifyVerticalLimitDimension(_b1,_b2,"maxHeight",_b4);if(!r){throw new Error("Failed without exception:maxHeight[verticalLimitDimension|"+r+"]");};}catch(ex){return false;};return _b1;};proto._manageHorizontalDimensions=function(_b3,_b1){if(_b1==null){this._usedDimensionsHorizontal.remove(_b3);}else if(this._usedDimensionsHorizontal.contains(_b3)){return;}else if(this._usedDimensionsHorizontal.length==2){throw new Error("List max reached. Unable to add:"+_b3+"("+_b1+")!,List:"+this._usedDimensionsHorizontal);}else {this._usedDimensionsHorizontal.push(_b3);};};proto._manageVerticalDimensions=function(_b3,_b1){if(_b1==null){this._usedDimensionsVertical.remove(_b3);}else if(this._usedDimensionsVertical.contains(_b3)){return;}else if(this._usedDimensionsVertical.length==2){throw new Error("List max reached. Unable to add:"+_b3+"("+_b1+")!,List:"+this._usedDimensionsVertical);}else {this._usedDimensionsVertical.push(_b3);};};proto._render=function(_e5){this._renderHorizontal(_e5);this._renderVertical(_e5);};proto._renderHorizontalRunning=false;proto._renderVerticalRunning=false;proto._renderHorizontalOmit=false;proto._renderVerticalOmit=false;proto._renderHorizontal=function(_e5){return this._renderHelper("horizontal","Horizontal",_e5,"left","width","right","Left","Width","Right","minWidth","maxWidth","MinWidth","MaxWidth");};proto._renderVertical=function(_e5){return this._renderHelper("vertical","Vertical",_e5,"top","height","bottom","Top","Height","Bottom","minHeight","maxHeight","MinHeight","MaxHeight");};proto._omitHorizontalRendering=function(){this._renderHorizontalOmit=true;};proto._activateHorizontalRendering=function(){this._renderHorizontalOmit=false;this._renderHorizontal("activate");};proto._omitVerticalRendering=function(){this._renderVerticalOmit=true;};proto._activateVerticalRendering=function(){this._renderVerticalOmit=false;this._renderVertical("activate");};proto._omitRendering=function(){this._omitHorizontalRendering();this._omitVerticalRendering();};proto._activateRendering=function(){this._activateHorizontalRendering();this._activateVerticalRendering();};proto._renderInitialDone_horizontal=false;proto._renderInitialDone_vertical=false;proto._renderHelper=function(vId,vIdUp,_e5,vNameStart,vNameRange,vNameStop,vNameStartUp,vNameRangeUp,vNameStopUp,vNameRangeMin,vNameRangeMax,vNameRangeMinUp,vNameRangeMaxUp){var vParent=this.getParent();if(vParent==null||!this.isCreated()){return true;};if(!this["_renderInitialDone_"+vId]){_e5="initial";}else if(this["_renderInitialDone_"+vId]&&_e5=="initial"){return true;};if(!vParent["_renderInitialDone_"+vId]&&this["get"+vNameRangeUp]()!="auto"){if(vParent["get"+vNameRangeUp]()!=null||(vParent["get"+vNameStartUp]()!=null&&vParent["get"+vNameStopUp]()!=null)){return true;};};this["_renderInitialDone_"+vId]=true;if(_e5!="initial"&&this._wasVisible&&!this.getVisible()){this["_render"+vIdUp+"Omitted"]=true;return true;};try{switch(_e5){case "initial":case "force":case "parent":case "activate":this._computeDimensionPixelValue(vNameStart,vNameStartUp,vNameRangeUp,vNameStopUp);this._computeDimensionPixelValue(vNameStop,vNameStartUp,vNameRangeUp,vNameStopUp);case "padding":case "border":this._computeDimensionPixelValue(vNameRange,vNameStartUp,vNameRangeUp,vNameStopUp);this._computeDimensionPixelValue(vNameRangeMin,vNameStartUp,vNameRangeUp,vNameStopUp);this._computeDimensionPixelValue(vNameRangeMax,vNameStartUp,vNameRangeUp,vNameStopUp);break;case vNameRangeMin:case vNameRangeMax:if(vParent["get"+vNameRangeUp]()=="auto"){return vParent["_setChildrenDepend"+vNameRangeUp](this);};case vNameStart:case vNameRange:case vNameStop:this._computeDimensionPixelValue(_e5,vNameStartUp,vNameRangeUp,vNameStopUp);break;};var vValueStart=this["_pixelof_"+vNameStart];var vValueRange=this["_pixelof_"+vNameRange];var vValueStop=this["_pixelof_"+vNameStop];var vValueRangeMin=this["_pixelof_"+vNameRangeMin]||-Infinity;var vValueRangeMax=this["_pixelof_"+vNameRangeMax]||Infinity;var vUseStart=vValueStart!=null;var vUseRange=vValueRange!=null;var vUseStop=vValueStop!=null;if((_e5=="initial"||_e5=="parent")&&!vUseStart&&!vUseRange&&!vUseStop&&vValueRangeMin==-Infinity&&vValueRangeMax==Infinity){return true;};var vComputedPosition;var vComputedSize;function limitSize(vValue){return isValidNumber(vValue)?vValue.limit(vValueRangeMin,vValueRangeMax):0;};if(vUseRange){vComputedSize=limitSize(vValueRange);};if(vUseStart){vComputedPosition=vValueStart;if(!vUseRange){if(vUseStop){vComputedSize=limitSize(vParent["getInner"+vNameRangeUp]()-this["getComputedMargin"+vNameStartUp]()-this["getComputedMargin"+vNameStopUp]()-vComputedPosition-vValueStop);}else if(vValueRangeMin>0){vComputedSize=vValueRangeMin;};};}else if(vUseStop){if(!vUseRange){if(!this.getElement().parentNode){return;};vComputedSize=limitSize(this["getPreferred"+vNameRangeUp]());};vComputedPosition=vParent["getInner"+vNameRangeUp]()-this["getComputedMargin"+vNameStartUp]()-this["getComputedMargin"+vNameStopUp]()-vComputedSize-vValueStop;};if(typeof vComputedSize=="undefined"){vComputedSize=null;};if(typeof vComputedPosition=="undefined"){vComputedPosition=null;}else if(isValidNumber(vComputedPosition)&&this._evalCurrentStyleProperty("position")=="absolute"){vComputedPosition+=vParent["getComputedPadding"+vNameStartUp]();};var vPositionChanged=vComputedPosition!=this["_computedLast"+vNameStartUp];var vSizeChanged=vComputedSize!=this["_computedLast"+vNameRangeUp];if(vPositionChanged||vSizeChanged){if(vSizeChanged){try{this["_applySize"+vIdUp](vComputedSize);}catch(ex){this.debug("Failed to apply size:"+vComputedSize);};this["_computedLast"+vNameRangeUp]=vComputedSize;if(this.hasEventListeners("resize")){this.dispatchEvent(new QxEvent("resize"));};if(this.hasEventListeners("resize"+vIdUp)){this.dispatchEvent(new QxEvent("resize"+vIdUp));};this["_inner"+vNameRangeUp+"Changed"]();};if(vPositionChanged){try{this["_d3"+vIdUp](vComputedPosition);}catch(ex){this.debug("Failed to apply position:"+vComputedPosition);};this["_computedLast"+vNameStartUp]=vComputedPosition;if(this.hasEventListeners("move")){this.dispatchEvent(new QxEvent("move"));};if(this.hasEventListeners("move"+vIdUp)){this.dispatchEvent(new QxEvent("move"+vIdUp));};};if(_e5!="initial"){this["_outer"+vNameRangeUp+"Changed"](vPositionChanged&&vSizeChanged?"position-and-size":vPositionChanged?"position":vSizeChanged?"size":"");};};}catch(ex){throw new Error("Could not render "+this+":"+vId+":"+ex);};};if((new QxClient).isMshtml()){proto._d3Horizontal=function(vPosition){return isInvalidNumber(vPosition)?this.removeStyleProperty("pixelLeft"):this.setStyleProperty("pixelLeft",Math.round(vPosition));};proto._applySizeHorizontal=function(vSize){return isInvalidNumber(vSize)?this.removeStyleProperty("pixelWidth"):this.setStyleProperty("pixelWidth",Math.round(vSize));};proto._d3Vertical=function(vPosition){return isInvalidNumber(vPosition)?this.removeStyleProperty("pixelTop"):this.setStyleProperty("pixelTop",Math.round(vPosition));};proto._applySizeVertical=function(vSize){return isInvalidNumber(vSize)?this.removeStyleProperty("pixelHeight"):this.setStyleProperty("pixelHeight",Math.round(vSize));};}else {proto._d3Horizontal=function(vPosition){return isInvalidNumber(vPosition)?this.removeStyleProperty("left"):this.setStyleProperty("left",Math.round(vPosition)+"px");};proto._applySizeHorizontal=function(vSize){return isInvalidNumber(vSize)?this.removeStyleProperty("width"):this.setStyleProperty("width",Math.round(vSize)+"px");};proto._d3Vertical=function(vPosition){return isInvalidNumber(vPosition)?this.removeStyleProperty("top"):this.setStyleProperty("top",Math.round(vPosition)+"px");};proto._applySizeVertical=function(vSize){return isInvalidNumber(vSize)?this.removeStyleProperty("height"):this.setStyleProperty("height",Math.round(vSize)+"px");};};proto._recalculateFrame=function(_e5){this._recalculateFrameWidth(_e5);this._recalculateFrameHeight(_e5);};proto._recalculateFrameWidth=function(_e5){if(!this._wasVisible){return;};switch(_e5){case "padding":if(this._widthMode=="inner"){return this._renderHorizontal(_e5);};break;case "border":if(this._widthMode=="inner"||this._widthMode=="area"){return this._renderHorizontal(_e5);};};this._innerWidthChanged();};proto._recalculateFrameHeight=function(_e5){if(!this._wasVisible){return;};switch(_e5){case "padding":if(this._heightMode=="inner"){return this._renderVertical(_e5);};break;case "border":if(this._heightMode=="inner"||this._heightMode=="area"){return this._renderVertical(_e5);};};this._innerHeightChanged();};proto._innerWidthChanged=function(){this._d4Width();var ch=this._a2;var chl=ch.length;for(var i=0;i<chl;i++){ch[i]._renderHorizontal("parent");};};proto._innerHeightChanged=function(){this._d4Height();var ch=this._a2;var chl=ch.length;for(var i=0;i<chl;i++){ch[i]._renderVertical("parent");};};proto._outerChanged=function(_e5){this._outerWidthChanged(_e5);this._outerHeightChanged(_e5);};proto._outerWidthChanged=function(_e5){var pa=this.getParent();return pa?pa._childOuterWidthChanged(this,_e5):true;};proto._outerHeightChanged=function(_e5){var pa=this.getParent();return pa?pa._childOuterHeightChanged(this,_e5):true;};proto._childOuterWidthChanged=function(vModifiedChild,_e5){if(!this._wasVisible){return;};var w=this.getWidth();if(w=="auto"){return this._setChildrenDependWidth(vModifiedChild,_e5);}else if(w==null||typeof w=="string"){this._lastChildWithInvalidatedPreferredWidth=vModifiedChild;this._invalidatePreferredWidth();};};proto._childOuterHeightChanged=function(vModifiedChild,_e5){if(!this._wasVisible){return;};var h=this.getHeight();if(h=="auto"){return this._setChildrenDependHeight(vModifiedChild,_e5);}else if(h==null||typeof h=="string"){this._lastChildWithInvalidatedPreferredHeight=vModifiedChild;this._invalidatePreferredHeight();};};proto._computedlast_position=null;proto._computedlast_size=null;proto._typeof_left=null;proto._typeof_width=null;proto._typeof_right=null;proto._typeof_top=null;proto._typeof_height=null;proto._typeof_bottom=null;proto._typeof_minWidth=null;proto._typeof_maxWidth=null;proto._typeof_minHeight=null;proto._typeof_maxHeight=null;proto._pixelof_left=null;proto._pixelof_width=null;proto._pixelof_right=null;proto._pixelof_top=null;proto._pixelof_height=null;proto._pixelof_bottom=null;proto._pixelof_minWidth=null;proto._pixelof_maxWidth=null;proto._pixelof_minHeight=null;proto._pixelof_maxHeight=null;proto._valueof_left=null;proto._valueof_width=null;proto._valueof_right=null;proto._valueof_top=null;proto._valueof_height=null;proto._valueof_bottom=null;proto._valueof_minWidth=null;proto._valueof_maxWidth=null;proto._valueof_minHeight=null;proto._valueof_maxHeight=null;proto.getPixelOfLeft=function(){return this._pixelof_left;};proto.getPixelOfWidth=function(){return this._pixelof_width;};proto.getPixelOfRight=function(){return this._pixelof_right;};proto.getPixelOfTop=function(){return this._pixelof_top;};proto.getPixelOfHeight=function(){return this._pixelof_height;};proto.getPixelOfBottom=function(){return this._pixelof_bottom;};proto._computeDimensionPixelValue=function(vId,vNameStartUp,vNameRangeUp,vNameStopUp){var pixelKey="_pixelof_"+vId;var valueKey="_valueof_"+vId;switch(this["_typeof_"+vId]){case "pixel":this[pixelKey]=this[valueKey];break;case "percent":this[pixelKey]=this._toPercent(this[valueKey],this.getParent()["getInner"+vNameRangeUp]());break;default:this[pixelKey]=null;return;};switch(vId){case "width":case "height":case "minWidth":case "maxWidth":case "minHeight":case "maxHeight":switch(this["_"+vId+"Mode"]){case "inner":this[pixelKey]+=this["getComputedPadding"+vNameStartUp]()+this["getComputedPadding"+vNameStopUp]();case "area":this[pixelKey]+=this["getComputedBorder"+vNameStartUp]()+this["getComputedBorder"+vNameStopUp]();};};};proto._computeDimensionType=function(_b1){switch(typeof _b1){case "number":return "pixel";case "string":if(_b1=="auto"){return "auto";}else if (/^([0-9\.]+)%$/.test(_b1)){return "percent";};break;case "object":if(_b1==null){return null;};};throw new Error("Invalid value:"+_b1);};proto._toPercent=function(_b1,vFullWidth){return Math.round(vFullWidth*parseFloat(_b1)/100);};proto._modifyHorizontalDimension=function(_b1,_b2,_b3,_b4){this._manageHorizontalDimensions(_b3,_b1);return this._modifyHorizontalHelper(_b1,_b3);};proto._modifyHorizontalLimitDimension=function(_b1,_b2,_b3,_b4){return this._modifyHorizontalHelper(_b1,_b3);};proto._modifyHorizontalHelper=function(_b1,_b3){this["_typeof_"+_b3]=this._computeDimensionType(_b1);this["_valueof_"+_b3]=_b1;this._renderHorizontal(_b3);return true;};proto._modifyVerticalDimension=function(_b1,_b2,_b3,_b4){this._manageVerticalDimensions(_b3,_b1);return this._modifyVerticalHelper(_b1,_b3);};proto._modifyVerticalLimitDimension=function(_b1,_b2,_b3,_b4){return this._modifyVerticalHelper(_b1,_b3);};proto._modifyVerticalHelper=function(_b1,_b3){this["_typeof_"+_b3]=this._computeDimensionType(_b1);this["_valueof_"+_b3]=_b1;this._renderVertical(_b3);return true;};proto._setChildrenDependWidth=function(_e4,_e5){var newWidth=this._d5Width(_e4,_e5);if(newWidth!=null){this.setWidth(newWidth,null,"inner",true);}else {this.setWidth(null,null,"box",true);};return true;};proto._d5Width=function(_e4,_e5){return this._d5Helper(_e4,_e5,"_dependWidthCache","left","width","right");};proto._setChildrenDependHeight=function(_e4,_e5){var newHeight=this._d5Height(_e4,_e5);if(newHeight!=null){this.setHeight(newHeight,null,"inner",true);}else {this.setHeight(null,null,"box",true);};return true;};proto._d5Height=function(_e4,_e5){return this._d5Helper(_e4,_e5,"_dependHeightCache","top","height","bottom");};proto._compareDependSize=function(d1,d2){return d2.size-d1.size;};proto._dependWidthCache=null;proto._dependHeightCache=null;proto._d5Helper=function(_e4,_e5,vCache,vStart,vRange,vStop){if(this[vCache]==null||this[vCache].length==0){var vChildren=this.getChildren();var vChildrenLength=vChildren.length;if(vChildrenLength==0){return null;};var vDependCache=this[vCache]=[];var vCurrentChild;var vCurrentNeeded;for(var i=0;i<vChildrenLength;i++){vCurrentChild=vChildren[i];if(vCurrentChild._wasVisible){vCurrentNeeded=vCurrentChild._computeNeededSize(vStart,vRange,vStop);vDependCache.push({widget:vCurrentChild,size:vCurrentNeeded?vCurrentNeeded:0});};};vDependCache.sort(this._compareDependSize);}else {if(!_e4&&this._wasVisible){if(vRange=="height"&&this._lastChildWithInvalidatedPreferredHeight){_e4=this._lastChildWithInvalidatedPreferredHeight;this._lastChildWithInvalidatedPreferredHeight=null;}else if(vRange=="width"&&this._lastChildWithInvalidatedPreferredWidth){_e4=this._lastChildWithInvalidatedPreferredWidth;this._lastChildWithInvalidatedPreferredWidth=null;};};if(_e4&&_e4!=this){var vDependCache=this[vCache];var vDependCacheLength=vDependCache.length;var vChildFound=false;var vCurrentNeeded;if(_e5!="add"){for(var i=0;i<vDependCacheLength;i++){if(vDependCache[i].widget==_e4){if(_e4.getParent()==this){vCurrentNeeded=_e4._computeNeededSize(vStart,vRange,vStop);vDependCache[i].size=vCurrentNeeded?vCurrentNeeded:0;}else {vDependCache.splice(i,1);};vChildFound=true;break;};};};if(_e5=="add"||!vChildFound){if(_e4.getParent()==this){vCurrentNeeded=_e4._computeNeededSize(vStart,vRange,vStop);vDependCache.push({widget:_e4,size:vCurrentNeeded?vCurrentNeeded:0});}else {throw new Error("No change while recalculating the dependCache!");};};vDependCache.sort(this._compareDependSize);}else {var vDependCache=this[vCache];};};return vDependCache.length>0?vDependCache[0].size:null;};proto._computeNeededSize=function(vNameStart,vNameRange,vNameStop){var vNameStartUp=vNameStart.toFirstUp();var vNameRangeUp=vNameRange.toFirstUp();var vNameStopUp=vNameStop.toFirstUp();var vTypeStart=this["_typeof_"+vNameStart];var vTypeRange=this["_typeof_"+vNameRange];var vTypeStop=this["_typeof_"+vNameStop];var vMinRangeValue=this["getMin"+vNameRangeUp]();var vMaxRangeValue=this["getMax"+vNameRangeUp]();var vMarginStart=this["getComputedMargin"+vNameStartUp]();var vMarginStop=this["getComputedMargin"+vNameStopUp]();var neededForMargin=vMarginStart+vMarginStop;if(vTypeRange=="percent"){var sizePreferred=this["getPreferred"+vNameRangeUp]();var sizeLimit=sizePreferred.limit(vMinRangeValue,vMaxRangeValue);var sizeProcent=parseFloat(this["get"+vNameRangeUp]());var neededInner=Math.ceil(sizeLimit/sizeProcent*100);return neededInner+neededForMargin;}else if(vTypeStart=="percent"&&vTypeStop=="percent"){var sizePreferred=this["getPreferred"+vNameRangeUp]();var sizeLimit=sizePreferred.limit(vMinRangeValue,vMaxRangeValue);var percentRemain=100-parseFloat(this["get"+vNameStartUp]())-parseFloat(this["get"+vNameStopUp]());var neededInner=Math.ceil(sizeLimit/percentRemain*100);return neededInner+neededForMargin;}else {var neededForSize=null;if(vTypeRange=="pixel"){this._computeDimensionPixelValue(vNameRange,vNameStartUp,vNameRangeUp,vNameStopUp);neededForSize=this["_pixelof_"+vNameRange];};if(neededForSize==null){var neededForSize=this["getPreferred"+vNameRangeUp]();};if(neededForSize==null){return;};neededForSize=neededForSize.limit(vMinRangeValue,vMaxRangeValue);if(vTypeStart=="percent"){var stopNeededSize=vTypeStop=="pixel"?this["get"+vNameStopUp]():0;var otherNeededSize=neededForSize+stopNeededSize;var percentRemain=100-parseFloat(this["get"+vNameStartUp]());var neededInner=Math.ceil(otherNeededSize/percentRemain*100);return neededInner+neededForMargin;}else if(vTypeStop=="percent"){var startNeededSize=vTypeStart=="pixel"?this["get"+vNameStartUp]():0;var otherNeededSize=neededForSize+startNeededSize;var percentRemain=100-parseFloat(this["get"+vNameStopUp]());var neededInner=Math.ceil(otherNeededSize/percentRemain*100);return neededInner+neededForMargin;}else {var neededForPosition=0;if(vTypeStart=="pixel"){neededForPosition+=this["get"+vNameStartUp]();};if(vTypeStop=="pixel"){neededForPosition+=this["get"+vNameStopUp]();};var neededInner=neededForSize+neededForPosition;return neededInner+neededForMargin;};};};QxWidget._domConnector=function(){var tpropsmargin="marginLeft,marginTop,marginRight,marginBottom";var tpropspadding="paddingLeft,paddingTop,paddingRight,paddingBottom";var tpropsborder="borderLeft,borderTop,borderRight,borderBottom";var tprops=tpropsmargin+","+tpropspadding+","+tpropsborder;var tdimsouter="outerWidth,outerHeight";var tdimsbox="boxWidth,boxHeight";var tdimsarea="areaWidth,areaHeight";var tdimsinner="innerWidth,innerHeight";var tdims=tdimsouter+","+tdimsbox+","+tdimsarea+","+tdimsinner;var tinsets="insetLeft,insetTop,insetRight,insetBottom";var tscrolls="scrollBarSizeLeft,scrollBarSizeTop,scrollBarSizeRight,scrollBarSizeBottom,scrollBarVisibleX,scrollBarVisibleY";var tcposouter="clientOuterLeft,clientOuterTop,clientOuterRight,clientOuterBottom";var tcposbox="clientBoxLeft,clientBoxTop,clientBoxRight,clientBoxBottom";var tcposarea="clientAreaLeft,clientAreaTop,clientAreaRight,clientAreaBottom";var tcposinner="clientInnerLeft,clientInnerTop,clientInnerRight,clientInnerBottom";var tcpos=tcposouter+","+tcposbox+","+tcposarea+","+tcposinner;var tpposouter="pageOuterLeft,pageOuterTop,pageOuterRight,pageOuterBottom";var tpposbox="pageBoxLeft,pageBoxTop,pageBoxRight,pageBoxBottom";var tpposarea="pageAreaLeft,pageAreaTop,pageAreaRight,pageAreaBottom";var tpposinner="pageInnerLeft,pageInnerTop,pageInnerRight,pageInnerBottom";var tppos=tpposouter+","+tpposbox+","+tpposarea+","+tpposinner;var tscreenouter="screenOuterLeft,screenOuterTop,screenOuterRight,screenOuterBottom";var tscreenbox="screenBoxLeft,screenBoxTop,screenBoxRight,screenBoxBottom";var tscreenarea="screenAreaLeft,screenAreaTop,screenAreaRight,screenAreaBottom";var tscreeninner="screenInnerLeft,screenInnerTop,screenInnerRight,screenInnerBottom";var tscreen=tscreenouter+","+tscreenbox+","+tscreenarea+","+tscreeninner;var tall=tprops+","+tdims+","+tinsets+","+tscrolls+","+tcpos+","+tppos+","+tscreen;var tarr=tall.split(",");for(var i=0;i<tarr.length;i++){var tname="getComputed"+tarr[i].toFirstUp();proto[tname]=new Function("var el=this.getElement();return QxDOM."+tname+"(el);");};};QxWidget._domConnector();proto.setScrollLeft=function(nScrollLeft){if(!this.isCreated()){return;};this.getElement().scrollLeft=nScrollLeft;};proto.setScrollTop=function(nScrollTop){if(!this.isCreated()){return;};this.getElement().scrollTop=nScrollTop;};proto.getOffsetLeft=function(){if(!this.isCreated()){return;};return QxDOM.getOffsetLeft(this.getElement());};proto.getOffsetTop=function(){if(!this.isCreated()){return;};return QxDOM.getOffsetTop(this.getElement());};proto.getScrollLeft=function(){if(!this.isCreated()){return;};return this.getElement().scrollLeft;};proto.getScrollTop=function(){if(!this.isCreated()){return;};return this.getElement().scrollTop;};proto.getClientWidth=function(){if(!this.isCreated()){return;};return this.getElement().clientWidth;};proto.getClientHeight=function(){if(!this.isCreated()){return;};return this.getElement().clientHeight;};proto.getOffsetWidth=function(){if(!this.isCreated()){return;};return this.getElement().offsetWidth;};proto.getOffsetHeight=function(){if(!this.isCreated()){return;};return this.getElement().offsetHeight;};proto._preferred_width=null;proto._preferred_height=null;proto._invalidatePreferred=function(){this._preferred_width=this._preferred_height=null;var pa=this.getParent();if(pa){pa._a2PreferredInvalidated(this);};};proto._invalidatePreferredWidth=function(){this._preferred_width=null;var pa=this.getParent();if(pa){pa._a2PreferredWidthInvalidated(this);};};proto._invalidatePreferredHeight=function(){this._preferred_height=null;var pa=this.getParent();if(pa){pa._a2PreferredHeightInvalidated(this);};};proto._calculatePreferredDimensions=function(){try{return QxDOM.getComputedPreferredSize(this.getElement());}catch(ex){throw new Error("Calculation of preferred width/height(of "+this+")failed:"+ex);};};proto.getPreferredWidth=function(){if(this.getWidth()=="auto"){if(!this._wasVisible){this._renderHorizontal("initial");};return this._pixelof_width;};if(this._preferred_width==null){if(this.getChildrenLength()>0){this._preferred_width=this._d5Width()+this.getComputedPaddingLeft()+this.getComputedPaddingRight()+this.getComputedInsetLeft()+this.getComputedInsetRight();}else {var r=this._calculatePreferredDimensions();this._preferred_width=r.width;this._preferred_height=r.height;};};return this._preferred_width;};proto.getPreferredHeight=function(){if(this.getHeight()=="auto"){if(!this._wasVisible){this._renderVertical("initial");};return this._pixelof_height;};if(this._preferred_height==null){if(this.getChildrenLength()>0){this._preferred_height=this._d5Height()+this.getComputedPaddingTop()+this.getComputedPaddingBottom()+this.getComputedInsetTop()+this.getComputedInsetBottom();}else {var r=this._calculatePreferredDimensions();this._preferred_width=r.width;this._preferred_height=r.height;};};return this._preferred_height;};proto.pack=function(){this.setWidth(this.getPreferredWidth());this.setHeight(this.getPreferredHeight());};proto._a2PreferredInvalidated=function(_e4){this._a2PreferredWidthInvalidated(_e4);this._a2PreferredHeightInvalidated(_e4);};proto._lastChildWithInvalidatedPreferredHeight=null;proto._lastChildWithInvalidatedPreferredWidth=null;proto._a2PreferredWidthInvalidated=function(_e4){if(!this._wasVisible){return;};this._lastChildWithInvalidatedPreferredWidth=_e4;if(this.getWidth()=="auto"){this._setChildrenDependWidth(_e4,"preferred");}else {this._invalidatePreferredWidth(_e4);};};proto._a2PreferredHeightInvalidated=function(_e4){if(!this._wasVisible){return;};this._lastChildWithInvalidatedPreferredHeight=_e4;if(this.getHeight()=="auto"){this._setChildrenDependHeight(_e4,"preferred");}else {this._invalidatePreferredHeight(_e4);};};proto._inner_width=null;proto._inner_height=null;proto._d4=function(){this._inner_width=this._inner_height=null;};proto._d4Width=function(){this._inner_width=null;};proto._d4Height=function(){this._inner_height=null;};proto.getInnerWidth=function(){if(this._inner_width==null){this._inner_width=this.getComputedInnerWidth();};return this._inner_width;};proto.getInnerHeight=function(){if(this._inner_height==null){this._inner_height=this.getComputedInnerHeight();};return this._inner_height;};proto._modifyPaddingHorizontal=function(_b1,_b2,_b3,_b4){if(isValid(_b1)){this.setStyleProperty(_b3,Math.round(_b1)+"px");}else {this.removeStyleProperty(_b3);};this._recalculateFrameWidth("padding");this._invalidatePreferredWidth();return true;};proto._modifyPaddingVertical=function(_b1,_b2,_b3,_b4){if(isValid(_b1)){this.setStyleProperty(_b3,Math.round(_b1)+"px");}else {this.removeStyleProperty(_b3);};this._recalculateFrameHeight("padding");this._invalidatePreferredHeight();return true;};proto._modifyMarginHorizontal=function(_b1,_b2,_b3,_b4){if(isValid(_b1)){this.setStyleProperty(_b3,Math.round(_b1)+"px");}else {this.removeStyleProperty(_b3);};this._outerWidthChanged("margin");return true;};proto._modifyMarginVertical=function(_b1,_b2,_b3,_b4){if(isValid(_b1)){this.setStyleProperty(_b3,Math.round(_b1)+"px");}else {this.removeStyleProperty(_b3);};this._outerHeightChanged("margin");return true;};QxWidget.cssLikeShortHandService=function(params){var l=params.length;if(l>4){throw new Error("Invalid number of arguments!");};var v;var forceList=new Array();var styleList=new Array();for(var i=0;i<l;i++){v=params[i];if(isValidNumber(v)){forceList.push(v);styleList.push(Math.round(v)+"px");}else if(v==""||v==null){forceList.push(null);styleList.push("");}else {throw new Error("Invalid shorthand value:"+v);};};switch(l){case 1:forceList[1]=forceList[2]=forceList[3]=forceList[0];styleList[1]=styleList[2]=styleList[3]=styleList[0];break;case 2:forceList[2]=forceList[0];styleList[2]=styleList[0];case 3:forceList[3]=forceList[1];styleList[3]=styleList[1];};return[forceList,styleList];};proto.setPadding=function(){try{var r=QxWidget.cssLikeShortHandService(arguments);}catch(ex){throw new Error("Invalid value for padding:"+ex);};var forceList=r[0];var styleList=r[1];this.forcePaddingTop(forceList[0]);this.forcePaddingRight(forceList[1]);this.forcePaddingBottom(forceList[2]);this.forcePaddingLeft(forceList[3]);this.setStyleProperty("paddingTop",styleList[0]);this.setStyleProperty("paddingRight",styleList[1]);this.setStyleProperty("paddingBottom",styleList[2]);this.setStyleProperty("paddingLeft",styleList[3]);this._recalculateFrame("padding");this._invalidatePreferred();return true;};proto.setMargin=function(){try{var r=QxWidget.cssLikeShortHandService(arguments);}catch(ex){throw new Error("Invalid value for margin:"+ex);};var forceList=r[0];var styleList=r[1];this.forceMarginTop(forceList[0]);this.forceMarginRight(forceList[1]);this.forceMarginBottom(forceList[2]);this.forceMarginLeft(forceList[3]);this.setStyleProperty("marginTop",styleList[0]);this.setStyleProperty("marginRight",styleList[1]);this.setStyleProperty("marginBottom",styleList[2]);this.setStyleProperty("marginLeft",styleList[3]);this._outerChanged("margin");return true;};proto.setEdge=function(){try{var r=QxWidget.cssLikeShortHandService(arguments);}catch(ex){throw new Error("Invalid value for edge:"+ex);};var forceList=r[0];this._omitRendering();this.setWidth(null);this.setHeight(null);this.setTop(forceList[0]);this.setRight(forceList[1]);this.setBottom(forceList[2]);this.setLeft(forceList[3]);this._activateRendering();return true;};proto.canGetFocus=function(){return this.isCreated()&&this.getTabIndex()>=0&&this.isEnabled();};proto.isFocusRoot=function(){return false;};proto._ontabfocus=function(){};proto._modifyFocused=function(_b1,_b2,_b3,_b4){if(!this.isCreated()){return true;};if(_b1){this.getTopLevelWidget().getFocusManager().setFocusedWidget(this,_b4);this._visualizeFocus();}else {this.getTopLevelWidget().getFocusManager().setFocusedWidget(null,_b4);this._visualizeBlur();};return true;};if((new QxClient).isOpera()){proto.repaint=function(){var d=this.getTopLevelWidget().getDocumentElement();var z=d.createElement("div");z.style.height=(d.body.offsetHeight)+"px";z.style.width=(d.body.offsetWidth)+"px";z.style.top="0px";z.style.left="0px";z.style.position="absolute";z.style.backgroundColor="blue";z.style.zIndex="100000000000000";d.body.appendChild(z);var el=this.getElement();var t=el.style.top;var l=el.style.left;el.style.top=(this.getComputedPageBoxTop()-5)+"px";el.style.left=(this.getComputedPageBoxLeft()-5)+"px";el.style.top=t;el.style.left=l;d.body.removeChild(z);};}else {proto.repaint=function(){};};if((new QxClient).isOpera()){proto._visualizeBlur=function(){this.setCssClassName(this.getCssClassName().remove("QxFocused"," ").remove(this.classname+"-Focused"," "));try{this.getElement().blur();}catch(ex){};this.repaint();return true;};proto._visualizeFocus=function(){this.setCssClassName(this.getCssClassName().add("QxFocused"," ").add(this.classname+"-Focused"," "));try{this.getElement().focus();}catch(ex){};this.repaint();return true;};}else {proto._visualizeBlur=function(){this.setCssClassName(this.getCssClassName().remove("QxFocused"," ").remove(this.classname+"-Focused"," "));try{this.getElement().blur();}catch(ex){};return true;};proto._visualizeFocus=function(){this.setCssClassName(this.getCssClassName().add("QxFocused"," ").add(this.classname+"-Focused"," "));try{this.getElement().focus();}catch(ex){};return true;};};proto._modifyCapture=function(_b1,_b2,_b3,_b4){if(_b2){this.getTopLevelWidget().getEventManager().setCaptureWidget(null,_b4);}else if(_b1){this.getTopLevelWidget().getEventManager().setCaptureWidget(this,_b4);};return true;};if((new QxClient).isMshtml()){proto._modifyTabIndex=function(_b1,_b2,_b3,_b4){this.setHtmlProperty("unselectable",_b1<0||!this.getEnabled());this.setHtmlProperty("tabIndex",_b1<0?-1:1);return true;};}else if((new QxClient).isGecko()){proto._modifyTabIndex=function(_b1,_b2,_b3,_b4){this.setStyleProperty("MozUserFocus",_b1<0?"ignore":"normal");this.setStyleProperty("userFocus",_b1<0?"ignore":"normal");return true;};}else {proto._modifyTabIndex=function(_b1,_b2,_b3,_b4){this.setStyleProperty("userFocus",_b1<0?"ignore":"normal");this.setHtmlProperty("tabIndex",_b1<0?-1:1);return true;};};proto._modifyCssClassName=function(_b1,_b2,_b3,_b4){this.setHtmlProperty("className",_b1);return true;};proto._evalCssClassName=function(){var v1=this.getHtmlProperty("className");if(typeof v1=="string"&&v1!="")return v1;else return this.classname;};proto._addCssClassName=function(_b1){this.setCssClassName(this.getCssClassName().add(_b1," "));};proto._removeCssClassName=function(_b1){this.setCssClassName(this.getCssClassName().remove(_b1," "));};proto.addCssClassNameDetail=function(_b1){this._addCssClassName(this.classname+"-"+_b1.toFirstUp());};proto.removeCssClassNameDetail=function(_b1){this._removeCssClassName(this.classname+"-"+_b1.toFirstUp());};proto.getWidgetFromPoint=function(x,y){var ret=this.getWidgetFromPointHelper(x,y);return ret&&ret!=this?ret:null;};proto.getWidgetFromPointHelper=function(x,y){var ch=this.getChildren();for(var chl=ch.length,i=0;i<chl;i++){if(ch[i].isCreated()&&QxDOM.getElementAbsolutePointChecker(ch[i].getElement(),x,y)){return ch[i].getWidgetFromPointHelper(x,y);};};return this;};proto.scrollIntoView=function(){if(!this.isCreated()){return;};this.scrollIntoViewX();this.scrollIntoViewY();};proto.scrollIntoViewX=function(){if(!this.isCreated()){return;};var p=this.getParent();if(!p){return;};var l=this.getOffsetLeft();var w=this.getOffsetWidth();var sl=p.getScrollLeft();var cw=p.getComputedAreaWidth();if(w>cw||l<sl){p.setScrollLeft(l);}else if(l+w>sl+cw){p.setScrollLeft(l+w-cw);};};proto.scrollIntoViewY=function(){if(!this.isCreated()){return;};var p=this.getParent();if(!p){return;};var t=this.getOffsetTop();var h=this.getOffsetHeight();var st=p.getScrollTop();var ch=p.getClientHeight();if(h>ch||t<st){p.setScrollTop(t);}else if(t+h>st+ch){p.setScrollTop(t+h-ch);};};if((new QxClient).isMshtml()){proto._modifyCanSelect=function(_b1,_b2,_b3,_b4){return _b1?this.removeHtmlProperty("unselectable"):this.setHtmlProperty("unselectable","on");};proto._evalCanSelect=function(_b3){var v=this.getHtmlProperty("unselectable");return v!="on"||v==null;};}else if((new QxClient).isGecko()){proto._modifyCanSelect=function(_b1,_b2,_b3,_b4){if(_b1){this.removeStyleProperty("MozUserSelect");this.removeStyleProperty("userSelect");}else {this.setStyleProperty("MozUserSelect","none");this.setStyleProperty("userSelect","none");};return true;};proto._evalCanSelect=function(_b3){var v=(new QxClient).isGecko()?this.getStyleProperty("MozUserSelect"):null;var v=v==null?this.getStyleProperty("userSelect"):v;return v!="none"||v==null;};}else {proto._modifyCanSelect=function(_b1,_b2,_b3,_b4){return _b1?this.removeStyleProperty("userSelect"):this.setStyleProperty("userSelect","none");};proto._evalCanSelect=function(_b3){throw new Error("_evalCanSelect is not implemented for this client!");};};if((new QxClient).isMshtml()){proto._modifyOpacity=function(_b1,_b2,_b3,_b4){if(_b1==null||_b1>1){this.removeStyleProperty("filter");}else if(isValidNumber(_b1)){this.setStyleProperty("filter","Alpha(Opacity="+Math.round(_b1.limit(0,1)*100)+")");}else {throw new Error("Unsupported opacity value:"+_b1);};return true;};proto._evalOpacity=function(){var o=this.getStyleProperty("filter");if(o==null||o==""){return 1;};var re = /Alpha\(Opacity=([0-9]{1,3})\)/;if(!re.test(o)){return 1;};return parseInt(RegExp.$1)/100;};}else {proto._modifyOpacity=function(_b1,_b2,_b3,_b4){if(_b1==null||_b1>1){if((new QxClient).isGecko()){this.removeStyleProperty("MozOpacity");}else if((new QxClient).isKhtml()){this.removeStyleProperty("KhtmlOpacity");};this.removeStyleProperty("opacity");}else if(isValidNumber(_b1)){_b1=_b1.limit(0,1);if((new QxClient).isGecko()){this.setStyleProperty("MozOpacity",_b1);}else if((new QxClient).isKhtml()){this.setStyleProperty("KhtmlOpacity",_b1);};this.setStyleProperty("opacity",_b1);};return true;};proto._evalOpacity=function(){var o=(new QxClient).isGecko()?this.getStyleProperty("MozOpacity"):(new QxClient).isKhtml()?this.getStyleProperty("KhtmlOpacity"):null;var o=o==null||o==""?this.getStyleProperty("opacity"):o;if(o==null||o==""){return 1;};return parseFloat(o);};};proto._modifyCursor=function(_b1,_b2,_b3,_b4){return this.setStyleProperty("cursor",_b1=="pointer"&&(new QxClient).isMshtml()?"hand":_b1);};proto._evalCursor=function(){var c=this.getStyleProperty("cursor");return c=="hand"?"pointer":c;};proto._modifyBackgroundImage=function(_b1,_b2,_b3,_b4){if(_b1==""||_b1=="null"){this.removeStyleProperty("backgroundImage");}else {this.setStyleProperty("backgroundImage","url("+(new QxImageManager).buildURI(_b1)+")");};return true;};proto._evalBackgroundImage=function(){var s=this.getStyleProperty("backgroundImage");return isInvalid(s) ? "" : s.replace(/^url\(/i, "").replace(/\)$/, "");};proto._modifyClip=function(_b1,_b2,_b3,_b4){if(_b1){try{var r=QxWidget.cssLikeShortHandService(_b1);}catch(ex){throw new Error("Invalid value for clip:"+ex);};r=r[1];this.setStyleProperty("clip","rect("+r[0]+","+r[1]+","+r[2]+","+r[3]+")");}else {this.removeStyleProperty("clip");};return true;};proto._modifyOverflow=function(_b1,_b2,_b3,_b4){var pv=_b1;var pn=_b3;if((new QxClient).isGecko()){switch(pv){case "hidden":pv="-moz-scrollbars-none";break;case "scrollX":pv="-moz-scrollbars-horizontal";break;case "scrollY":pv="-moz-scrollbars-vertical";break;};}else if((new QxClient).isMshtml()){switch(pv){case "scrollX":pn="overflowX";pv="scroll";break;case "scrollY":pn="overflowY";pv="scroll";break;};var a=["overflow","overflowX","overflowY"];for(var i=0;i<a.length;i++){if(a[i]!=pn){this.removeStyleProperty(a[i]);};};}else {switch(pv){case "scrollX":case "scrollY":pv="scroll";break;};};return this.setStyleProperty(pn,pv);};proto._evalOverflow=function(){var pv=this.getStyleProperty("overflow");if((new QxClient).isGecko()){switch(pv){case "-moz-scrollbars-none":pv="hidden";break;case "-moz-scrollbars-horizontal":pv="scrollX";break;case "-moz-scrollbars-vertical":pv="scrollY";break;};}else if((new QxClient).isMshtml()){var pvx=this.getStyleProperty("overflowX");var pvy=this.getStyleProperty("overflowY");if(pvx==pvy=="scroll"){pv="scroll";}else if(pvx=="scroll"){pv="scrollX";}else if(pvy=="scroll"){pv="scrollY";};};return pv;};proto._modifyBorder=function(_b1,_b2,_b3,_b4){if(_b2){_b2.removeWidget(this);};if(_b1){_b1.addWidget(this);};this._recalculateFrame("border");this._invalidatePreferred();return true;};proto.dispose=function(){if(this.getDisposed()){return;};var ch=this._a2;if(isValid(this._a2)){var chl=ch.length;for(var i=chl-1;i>=0;i--){this._a2[i].dispose();delete this._a2[i];};delete this._a2;};try{this.getElement()._QxWidget=null;}catch(ex){};delete this._usedDimensionsHorizontal;delete this._usedDimensionsVertical;QxTarget.prototype.dispose.call(this);for(var i in this._styleProperties){delete this._styleProperties[i];};delete this._styleProperties;for(var i in this._htmlProperties){delete this._htmlProperties[i];};delete this._htmlProperties;for(var i in this._htmlAttributes){delete this._htmlAttributes[i];};delete this._htmlAttributes;return true;};proto._clonePropertyIgnoreList="parent,element,visible,display,visibility,boxPrefHeight,boxPrefWidth";proto.clone=function(cloneRecursive,customPropertyList){var cloneInstance=new this.constructor;var propertyName;var propertyList=[];var propertyIngoreList=this._clonePropertyIgnoreList.split(",");var sourcePropertyList=isValid(customPropertyList)?customPropertyList:this._i1.split(",");var sourcePropertyListLength=sourcePropertyList.length-1;do{propertyName=sourcePropertyList[sourcePropertyListLength];if(!propertyIngoreList.contains(propertyName)){propertyList.push(propertyName);};}while(sourcePropertyListLength--);propertyListLength=propertyList.length-1;do{propertyName=propertyList[propertyListLength].toFirstUp();cloneInstance["set"+propertyName](this["get"+propertyName]());}while(propertyListLength--);if(sourcePropertyList.contains("parent")){var myParent=this.getParent();if(myParent){cloneInstance.setParent(myParent);};};if(sourcePropertyList.contains("visibility")){cloneInstance.setVisibility(this.getVisibility());};if(sourcePropertyList.contains("display")){cloneInstance.setDisplay(this.getDisplay());};if(cloneRecursive){this._cloneRecursive(cloneInstance);};return cloneInstance;};proto._cloneRecursive=function(cloneInstance){var ch=this.getChildren();var chl=ch.length;var cloneChild;for(var i=0;i<chl;i++){cloneChild=ch[i].clone(true);cloneInstance.add(cloneChild);};};proto.execute=function(){var vCommand=this.getCommand();if(vCommand){vCommand.execute(this);};if(this.hasEventListeners("execute")){this.dispatchEvent(new QxEvent("execute"));};if(this.hasEventListeners("action")){this.dispatchEvent(new QxEvent("action"));};};