/* Copyright (c): 2002-2005 (Germany): United Internet, 1&1, GMX, Schlund+Partner, Alturo */ 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;i0;};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;i1){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;i0){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;i0?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;i0){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=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;icw||lsl+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||tst+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=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