OSDN Git Service

Version 0.6.141, fix X.UI.ScrollBox.
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 06_AbstractUINode.js
index 9004773..249bec3 100644 (file)
@@ -1,9 +1,9 @@
-X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](\r
+var XUI_AbstractUINode = X_EventDispatcher[ 'inherits' ](\r
        'X.UI._AbstractUINode',\r
        X_Class.ABSTRACT | X_Class.PRIVATE_DATA,\r
        {\r
                phase             : 0,\r
-               dirty             : X.UI.Dirty.CLEAN,\r
+               dirty             : XUI_Dirty.CLEAN,\r
                \r
                root              : null,\r
                rootData          : null,\r
@@ -12,8 +12,8 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                parentData        : null,\r
                xnode             : null,\r
 \r
-               supportAttrs      : X.UI.Attr.Support,\r
-               attrClass         : X.UI.AttrClass,\r
+               supportAttrs      : XUI_Attr_Support,\r
+               attrClass         : XUI_AttrClass,\r
                attrObject        : null,\r
                unverifiedAttrs   : null,\r
                \r
@@ -32,31 +32,33 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                boxY              : 0,\r
                scrollWidth       : 0, // remove?\r
                scrollHeight      : 0, // remove?\r
-               boxWidth          : X.UI.Attr.AUTO,\r
+               boxWidth          : XUI_Attr_AUTO,\r
                minBoxWidth       : 0,\r
-               maxBoxWidth       : X.UI.Attr.AUTO,     \r
-               boxHeight         : X.UI.Attr.AUTO,\r
+               maxBoxWidth       : XUI_Attr_AUTO,      \r
+               boxHeight         : XUI_Attr_AUTO,\r
                minBoxHeight      : 0,\r
-               maxBoxHeight      : X.UI.Attr.AUTO,\r
+               maxBoxHeight      : XUI_Attr_AUTO,\r
                contentL          : 0,\r
                contentT          : 0,\r
                contentR          : 0,\r
                contentB          : 0,\r
                boxSizingOffsetLR : 0,\r
                boxSizingOffsetTB : 0,          \r
-               contentWidth      : X.UI.Attr.AUTO,\r
+               contentWidth      : XUI_Attr_AUTO,\r
                minContentWidth   : 0,\r
-               maxContentWidth   : X.UI.Attr.AUTO,\r
+               maxContentWidth   : XUI_Attr_AUTO,\r
                lastContentWidth  : -1,\r
-               contentHeight     : X.UI.Attr.AUTO,\r
+               contentHeight     : XUI_Attr_AUTO,\r
                minContentHeight  : 0,\r
-               maxContentHeight  : X.UI.Attr.AUTO,\r
+               maxContentHeight  : XUI_Attr_AUTO,\r
                lastContentHeight : -1,\r
                \r
                constraintW       : false,\r
                constraintH       : false,\r
                autoWidth         : false,\r
                autoHeight        : false,\r
+               noWidth           : false,\r
+               noHeight          : false,\r
                percentWidth      : false,\r
                percentHeight     : false,\r
                // :hover, :focus, :disabled\r
@@ -69,14 +71,14 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                        //this.xnode      = X_Doc_create( 'div' );\r
                        this.phase      = 1;\r
                        \r
-                       this[ 'dispatch' ]( X.UI.Event.INIT );\r
+                       this[ 'dispatch' ]( XUI_Event.INIT );\r
                },\r
                \r
                addToParent : function( xnodeParent ){\r
                        xnodeParent && xnodeParent[ 'append' ]( this.xnode );\r
                        \r
                        this.phase = 2;\r
-                       this[ 'dispatch' ]( X.UI.Event.ADDED );\r
+                       this[ 'dispatch' ]( XUI_Event.ADDED );\r
                },\r
                \r
                creationComplete : function(){\r
@@ -84,7 +86,7 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                l, i;\r
                        \r
                        this.phase = 3;\r
-                       this.User[ 'dispatch' ]( X.UI.Event.CREATION_COMPLETE );\r
+                       this.User[ 'dispatch' ]( XUI_Event.CREATION_COMPLETE );\r
                        \r
                        // html 要素が親に追加されるまで控えていたイベントの登録\r
                        if( events && ( l = events.length ) ){\r
@@ -101,26 +103,26 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                 * 親要素が変化した場合、unverifiedAttrs を元に attrObject を再設定.\r
                 */\r
                setAttr : function( name, def, v ){\r
-                       var attrs      = X.UI.attrClassProto || this.attrObject,\r
+                       var attrs      = XUI_attrClassProto || this.attrObject,\r
                                propID     = def.No || def[ 5 ],\r
-                               defaultVal = X.UI.attrClassProto ? attrs[ propID ] : this.attrClass.prototype[ propID ], // def[ 0 ],\r
+                               defaultVal = XUI_attrClassProto ? attrs[ propID ] : this.attrClass.prototype[ propID ], // def[ 0 ],\r
                                currentVal = attrs ? attrs[ propID ] : defaultVal,\r
                                dirty      = def[ 1 ],\r
                                user       = def[ 2 ],\r
                                type       = def[ 3 ],\r
                                list       = def[ 4 ],\r
-                               length     = !!( type & X.UI.Attr.Type.LENGTH        ),\r
-                               minusLen   = !!( type & X.UI.Attr.Type.MINUS_LENGTH  ),\r
-                               percent    = !!( type & X.UI.Attr.Type.PERCENT       ),\r
-                               minusPct   = !!( type & X.UI.Attr.Type.MINUS_PERCENT ),\r
-                               numerical  = !!( type & X.UI.Attr.Type.NUMERICAL     ),\r
-                               auto       = !!( type & X.UI.Attr.Type.AUTO          ),\r
-                               color      = !!( type & X.UI.Attr.Type.COLOR         ),\r
-                               url        = !!( type & X.UI.Attr.Type.URL           ),\r
-                               fontName   = !!( type & X.UI.Attr.Type.FONT_NAME     ),\r
-                               flag       = !!( type & X.UI.Attr.Type.BOOLEAN       ),\r
-                               combi      = !!( type & X.UI.Attr.Type.COMBI         ),\r
-                               quartet    = !!( type & X.UI.Attr.Type.QUARTET       ),\r
+                               length     = !!( type & XUI_Attr_Type.LENGTH        ),\r
+                               minusLen   = !!( type & XUI_Attr_Type.MINUS_LENGTH  ),\r
+                               percent    = !!( type & XUI_Attr_Type.PERCENT       ),\r
+                               minusPct   = !!( type & XUI_Attr_Type.MINUS_PERCENT ),\r
+                               numerical  = !!( type & XUI_Attr_Type.NUMERICAL     ),\r
+                               auto       = !!( type & XUI_Attr_Type.AUTO          ),\r
+                               color      = !!( type & XUI_Attr_Type.COLOR         ),\r
+                               url        = !!( type & XUI_Attr_Type.URL           ),\r
+                               fontName   = !!( type & XUI_Attr_Type.FONT_NAME     ),\r
+                               flag       = !!( type & XUI_Attr_Type.BOOLEAN       ),\r
+                               combi      = !!( type & XUI_Attr_Type.COMBI         ),\r
+                               quartet    = !!( type & XUI_Attr_Type.QUARTET       ),\r
                                _v, i, l, nodes, root, roots;\r
                \r
                        if( X_Type_isString( v ) ){\r
@@ -129,7 +131,7 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                        // good\r
                                } else\r
                                if( auto && v === 'auto' ){\r
-                                       v = X.UI.Attr.AUTO;\r
+                                       v = XUI_Attr_AUTO;\r
                                } else\r
                                if( list && ( _v = list[ v ] ) ){\r
                                        // good\r
@@ -164,7 +166,7 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                    ( percent   && 0 <= v && v <= 1 ) ||\r
                                        ( minusPct  && -1 <= v && v < 0 ) ||\r
                                    ( numerical && 0 <= v ) ||\r
-                                   ( auto      && v === X.UI.Attr.AUTO ) ||\r
+                                   ( auto      && v === XUI_Attr_AUTO ) ||\r
                                    ( color     && 0 <= v && v <= 0xFFFFFF ) ||\r
                                    ( list      && list[ v ] )\r
                                ){\r
@@ -179,7 +181,7 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                        } else\r
                        if( X_Type_isArray( v ) ){\r
                                if( v.length <= 4 && quartet ){\r
-                                       type &= ~X.UI.Attr.Type.QUARTET;\r
+                                       type &= ~XUI_Attr_Type.QUARTET;\r
                                        switch( v.length ){\r
                                                case 1 :\r
                                                        this.setAttr( false, [ defaultVal, user, dirty, type, list,   propID ], v[ 0 ] );\r
@@ -208,7 +210,7 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                        };                                      \r
                                } else\r
                                if( v.length === 2 && combi ){\r
-                                       type &= ~X.UI.Attr.Type.COMBI;\r
+                                       type &= ~XUI_Attr_Type.COMBI;\r
                                        this.setAttr( false, [ defaultVal, user, dirty, type, list,   propID ], v[ 0 ] );\r
                                        this.setAttr( false, [ defaultVal, user, dirty, type, list, ++propID ], v[ 1 ] );\r
                                } else {\r
@@ -216,40 +218,40 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                        return;\r
                                };\r
 \r
-                               if( !X.UI.attrClassProto && user === X.UI.Attr.USER.XNODE && this.xnode ){\r
-                                       this.xnode[ 'css' ]( X.UI.Attr.Rename[ name ] || name, XUI_AbstractUINode_createCssText( this, name ) );\r
-                                       //console.log( ( X.UI.Attr.Rename[ name ] || name ) + ' ' + XUI_AbstractUINode_createCssText( this, name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
+                               if( !XUI_attrClassProto && user === XUI_Attr_USER.XNODE && this.xnode ){\r
+                                       this.xnode[ 'css' ]( XUI_Attr_Rename[ name ] || name, XUI_AbstractUINode_createCssText( this, name ) );\r
+                                       //console.log( ( XUI_Attr_Rename[ name ] || name ) + ' ' + XUI_AbstractUINode_createCssText( this, name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
                                };\r
                                return;\r
                        };\r
 \r
                        if( !v && v !== 0 ) v = defaultVal;\r
                        \r
-                       if( X.UI.attrClassProto ){\r
+                       if( XUI_attrClassProto ){\r
                                attrs[ propID ] = v;\r
                                return;                 \r
                        };              \r
 \r
                        if( currentVal !== v ){\r
                                switch( propID ){\r
-                                       case X.UI.Attr.Support.left.No :\r
-                                               this.constraintW = attrs[ X.UI.Attr.Support.right.No ] !== null;\r
+                                       case XUI_Attr_Support.left.No :\r
+                                               this.constraintW = attrs[ XUI_Attr_Support.right.No ] !== null;\r
                                                break;\r
-                                       case X.UI.Attr.Support.right.No :\r
-                                               this.constraintW = attrs[ X.UI.Attr.Support.left.No ] !== null;\r
+                                       case XUI_Attr_Support.right.No :\r
+                                               this.constraintW = attrs[ XUI_Attr_Support.left.No ] !== null;\r
                                                break;\r
-                                       case X.UI.Attr.Support.top.No :\r
-                                               this.constraintH = attrs[ X.UI.Attr.Support.bottom.No ] !== null;\r
+                                       case XUI_Attr_Support.top.No :\r
+                                               this.constraintH = attrs[ XUI_Attr_Support.bottom.No ] !== null;\r
                                                break;\r
-                                       case X.UI.Attr.Support.bottom.No :\r
-                                               this.constraintH = attrs[ X.UI.Attr.Support.top.No ] !== null;\r
+                                       case XUI_Attr_Support.bottom.No :\r
+                                               this.constraintH = attrs[ XUI_Attr_Support.top.No ] !== null;\r
                                                break;\r
-                                       case X.UI.Attr.Support.width.No :\r
-                                               this.autoWidth    = v === X.UI.Attr.AUTO;\r
+                                       case XUI_Attr_Support.width.No :\r
+                                               this.autoWidth    = v === XUI_Attr_AUTO;\r
                                                this.percentWidth = X_Type_isString( v );\r
                                                break;\r
-                                       case X.UI.Attr.Support.height.No :\r
-                                               this.autoHeight    = v === X.UI.Attr.AUTO;\r
+                                       case XUI_Attr_Support.height.No :\r
+                                               this.autoHeight    = v === XUI_Attr_AUTO;\r
                                                this.percentHeight = X_Type_isString( v );\r
                                                break;\r
                                };\r
@@ -261,20 +263,20 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                        attrs[ propID ] = v;\r
                                };\r
                                \r
-                               if( name && user === X.UI.Attr.USER.UINODE ){\r
+                               if( name && user === XUI_Attr_USER.UINODE ){\r
                                        this[ name ] = v;\r
                                };\r
                                \r
-                               if( name && user === X.UI.Attr.USER.XNODE && this.xnode ){\r
-                                       this.xnode[ 'css' ]( X.UI.Attr.Rename[ name ] || name, XUI_AbstractUINode_createCssText( this, name ) );\r
-                                       //console.log( ( X.UI.Attr.Rename[ name ] || name ) + ' ' + XUI_AbstractUINode_createCssText( this, name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
+                               if( name && user === XUI_Attr_USER.XNODE && this.xnode ){\r
+                                       this.xnode[ 'css' ]( XUI_Attr_Rename[ name ] || name, XUI_AbstractUINode_createCssText( this, name ) );\r
+                                       //console.log( ( XUI_Attr_Rename[ name ] || name ) + ' ' + XUI_AbstractUINode_createCssText( this, name ) + ' ' + propID + ' ' + attrs[ propID ] );\r
                                } else\r
                                if( this.dirty < dirty ) this.dirty = dirty;\r
                        };\r
                },\r
 \r
                getAttr : function( name ){\r
-                       var attrs   = this.attrObject || this.attrClass.prototype || X.UI.AttrClass,\r
+                       var attrs   = this.attrObject || this.attrClass.prototype || XUI_AttrClass,\r
                                support = this.supportAttrs[ name ],\r
                 v, type, list;\r
                        if( !support ) return;\r
@@ -286,19 +288,19 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                        \r
                        type = support[ 3 ];\r
                        // Unit\r
-                       if( type & X.UI.Attr.Type.QUARTET ){\r
+                       if( type & XUI_Attr_Type.QUARTET ){\r
                                return [ this.getAttr( name + 'Top' ), this.getAttr( name + 'Right' ), this.getAttr( name + 'Bottom' ), this.getAttr( name + 'Left' ) ];\r
                        };\r
-                       if( type & X.UI.Attr.Type.COMBI   ) return [ v, data[ ++propID ] ];\r
+                       if( type & XUI_Attr_Type.COMBI   ) return [ v, data[ ++propID ] ];\r
                        \r
                        v    = attrs[ support.No ];             \r
-                       if( type & X.UI.Attr.Type.AUTO && v === X.UI.Attr.AUTO ) return 'auto'; \r
+                       if( type & XUI_Attr_Type.AUTO && v === XUI_Attr_AUTO ) return 'auto'; \r
                        \r
                        list = support[ 4 ];\r
                        if( list ) return list[ v ];\r
                        \r
-                       if( type & X.UI.Attr.Type.COLOR && X_Type_isNumber( v ) ) return v;\r
-                       if( !( type & X.UI.Attr.Type.NUMERICAL ) && X_Type_isNumber( v ) ) return v + 'em';\r
+                       if( type & XUI_Attr_Type.COLOR && X_Type_isNumber( v ) ) return v;\r
+                       if( !( type & XUI_Attr_Type.NUMERICAL ) && X_Type_isNumber( v ) ) return v + 'em';\r
                        return v;\r
                },\r
                \r
@@ -332,25 +334,32 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                calculate : function( isNeedsDetection, x, y, allowedW, allowedH ){\r
                        this.preMesure( allowedW, allowedH );\r
                        \r
-                       if( this.boxWidth === X.UI.Attr.AUTO || this.boxHeight === X.UI.Attr.AUTO ){\r
+                       this.noWidth  = this.boxWidth === XUI_Attr_AUTO;\r
+                       this.noHeight = this.boxHeight === XUI_Attr_AUTO;\r
+                       \r
+                       if( this.noWidth || this.noHeight ){\r
                                this.mesure();\r
                                this.postMesure();\r
                        };\r
                        \r
-                       !isNeedsDetection && this.updateLayout( x, y );\r
+                       if( !isNeedsDetection ){\r
+                               this.boxX += x;\r
+                               this.boxY += y;                 \r
+                       };\r
                },\r
                \r
                /**\r
                 * X_Node_BoxModel の情報を引きながら top,left,width,height,padding,border の設定\r
                 */\r
-               updateLayout : function( x, y ){\r
-                       this.boxX = x;\r
-                       this.boxY = y;\r
+               updateLayout : function(){\r
+                       var x = this.boxX,\r
+                               y = this.boxY;\r
+\r
                        this.xnode\r
                                [ 'css' ]( 'left',        x ? x + 'em' : 0 )\r
                                [ 'css' ]( 'top',         y ? y + 'em' : 0 )\r
-                               [ 'css' ]( 'width',       this.contentWidth  ? XUI_AbstractUINode_ceil( this.contentWidth  ) + 'em' : 0 )\r
-                               [ 'css' ]( 'height',      this.contentHeight ? XUI_AbstractUINode_ceil( this.contentHeight ) + 'em' : 0 )\r
+                               [ 'css' ]( 'width',       this.noWidth  ? 'auto' : this.contentWidth  ? this.contentWidth  + 'em' : 0 )\r
+                               [ 'css' ]( 'height',      this.noHeight ? 'auto' : this.contentHeight ? this.contentHeight + 'em' : 0 )\r
                                [ 'css' ]( 'padding',     XUI_AbstractUINode_createCssText( this, 'padding' ) )\r
                                [ 'css' ]( 'borderWidth', XUI_AbstractUINode_createCssText( this, 'borderWidth' ) );\r
                },\r
@@ -359,8 +368,8 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                 * 親の サイズを元に自身のサイズを計算していく\r
                 */\r
                preMesure : function( allowedW, allowedH ){\r
-                       var attrs = this.attrObject || this.attrClass.prototype || X.UI.AttrClass,\r
-                               box   = attrs[ X.UI.Attr.Support.sizing.No ],\r
+                       var attrs = this.attrObject || this.attrClass.prototype || XUI_AttrClass,\r
+                               box   = attrs[ XUI_Attr_Support.sizing.No ],\r
                                min, max,\r
                                boxL, boxT, boxR, boxB,\r
                                contentW, contentH, boxMinus,\r
@@ -371,10 +380,10 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                        // 自身が constraintW の場合 親が AUTO ではない\r
                        // 自身が constraintW でない場合自身が  AUTO はなくかつ親 が AUTO の場合 or 自身は % でない\r
                        \r
-                       paddingR = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 1 ], allowedW );\r
-                       paddingL = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 3 ], allowedW );\r
-                       borderR  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No + 1 ], allowedW );\r
-                       borderL  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No + 3 ], allowedW );\r
+                       paddingR = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.padding.No + 1 ], allowedW );\r
+                       paddingL = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.padding.No + 3 ], allowedW );\r
+                       borderR  = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.borderWidth.No + 1 ], allowedW );\r
+                       borderL  = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.borderWidth.No + 3 ], allowedW );\r
                        boxMinus = 0;\r
                        switch( box ){\r
                                case 3 : // border-box\r
@@ -386,11 +395,11 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                        this.contentL = borderL + paddingL;\r
                        this.contentR = borderR + paddingR;\r
                        \r
-                       if( this.constraintW ? allowedW !== X.UI.Attr.AUTO : !this.autoWidth && ( allowedW !== X.UI.Attr.AUTO || !this.percentWidth ) ){\r
+                       if( this.constraintW ? allowedW !== XUI_Attr_AUTO : !this.autoWidth && ( allowedW !== XUI_Attr_AUTO || !this.percentWidth ) ){\r
                                if( this.constraintW ){ // 制約レイアウト\r
-                                       contentW = allowedW - ( boxL = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.left.No ], allowedW ) ) - ( boxR = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.right.No ], allowedW ) );\r
+                                       contentW = allowedW - ( boxL = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.left.No ], allowedW ) ) - ( boxR = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.right.No ], allowedW ) );\r
                                } else {\r
-                                       contentW = XUI_AbstractUINode_calcFinalValue( attrs[ X.UI.Attr.Support.width.No ], attrs[ X.UI.Attr.Support.minWidth.No ], attrs[ X.UI.Attr.Support.maxWidth.No ], allowedW );                                  \r
+                                       contentW = XUI_AbstractUINode_calcFinalValue( attrs[ XUI_Attr_Support.width.No ], attrs[ XUI_Attr_Support.minWidth.No ], attrs[ XUI_Attr_Support.maxWidth.No ], allowedW );                                     \r
                                };\r
                                this.contentWidth = contentW + boxMinus;\r
                                //this.scrollWidth  = this.contentWidth + this.contentL + this.contentR;\r
@@ -401,8 +410,8 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                delete this.minBoxWidth;\r
                                delete this.maxBoxWidth;\r
                        } else {        \r
-                               this.minContentWidth = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.minWidth.No ], allowedW ) + boxMinus );\r
-                               this.maxContentWidth = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.maxWidth.No ], allowedW ) + boxMinus );\r
+                               this.minContentWidth = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.minWidth.No ], allowedW ) + boxMinus );\r
+                               this.maxContentWidth = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.maxWidth.No ], allowedW ) + boxMinus );\r
                                //this.scrollWidth     = this.contentWidth + this.contentL + this.contentR;\r
                                this.minBoxWidth     = this.minContentWidth - boxMinus + this.contentL + this.contentR;\r
                                this.maxBoxWidth     = this.maxContentWidth - boxMinus + this.contentL + this.contentR;\r
@@ -412,10 +421,10 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                //delete this.boxSizingOffsetLR;\r
                        };\r
                        \r
-                       paddingT  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 0 ], allowedH );// paddingTRBL の % 指定は 最大幅に対して TB でも幅に対して\r
-                       paddingB  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 2 ], allowedH );\r
-                       borderT   = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No  + 0 ], allowedH );\r
-                       borderB   = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No  + 2 ], allowedH );\r
+                       paddingT  = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.padding.No + 0 ], allowedH );// paddingTRBL の % 指定は 最大幅に対して TB でも幅に対して\r
+                       paddingB  = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.padding.No + 2 ], allowedH );\r
+                       borderT   = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.borderWidth.No  + 0 ], allowedH );\r
+                       borderB   = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.borderWidth.No  + 2 ], allowedH );\r
                        boxMinus = 0;\r
                        switch( box ){\r
                                case 3 : // border-box\r
@@ -428,11 +437,11 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                        this.contentB = borderB + paddingB;\r
                        \r
                        // Height\r
-                       if( this.constraintH ? allowedH !== X.UI.Attr.AUTO : !this.autoHeight && ( allowedH !== X.UI.Attr.AUTO || !this.percentHeight ) ){\r
+                       if( this.constraintH ? allowedH !== XUI_Attr_AUTO : !this.autoHeight && ( allowedH !== XUI_Attr_AUTO || !this.percentHeight ) ){\r
                                if( this.constraintH ){ // 制約レイアウト\r
-                                       contentH = allowedH - ( boxT = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.top.No ], allowedH ) ) - ( boxB = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.bottom.No ], allowedH ) );\r
+                                       contentH = allowedH - ( boxT = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.top.No ], allowedH ) ) - ( boxB = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.bottom.No ], allowedH ) );\r
                                } else {\r
-                                       contentH = XUI_AbstractUINode_calcFinalValue( attrs[ X.UI.Attr.Support.height.No ], attrs[ X.UI.Attr.Support.minHeight.No ], attrs[ X.UI.Attr.Support.maxHeight.No ], allowedH );\r
+                                       contentH = XUI_AbstractUINode_calcFinalValue( attrs[ XUI_Attr_Support.height.No ], attrs[ XUI_Attr_Support.minHeight.No ], attrs[ XUI_Attr_Support.maxHeight.No ], allowedH );\r
                                };                      \r
                                this.contentHeight = contentH + boxMinus;\r
                                //this.scrollHeight  = this.contentHeight + this.contentT + this.contentB;\r
@@ -443,8 +452,8 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                delete this.minBoxHeight;\r
                                delete this.maxBoxHeight;\r
                        } else {\r
-                               this.minContentHeight = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.minHeight.No ], allowedH ) + boxMinus );\r
-                               this.maxContentHeight = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.maxHeight.No ], allowedH ) + boxMinus );                                \r
+                               this.minContentHeight = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.minHeight.No ], allowedH ) + boxMinus );\r
+                               this.maxContentHeight = XUI_AbstractUINode_ceil( XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.maxHeight.No ], allowedH ) + boxMinus );                         \r
                                this.minBoxHeight = this.minContentHeight - boxMinus + this.contentT + this.contentB;\r
                                this.maxBoxHeight = this.maxContentHeight - boxMinus + this.contentT + this.contentB;\r
                \r
@@ -456,12 +465,12 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                        \r
                        if( this.parentData && this.parentData.layout.overrideAttrsForChild.left ){\r
                                if( this.constraintW ){\r
-                                       this.boxX = ( boxL || boxL === 0 ) ? boxL : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.left.No ], allowedW );\r
+                                       this.boxX = ( boxL || boxL === 0 ) ? boxL : XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.left.No ], allowedW );\r
                                } else\r
-                               if( attrs[ X.UI.Attr.Support.right.No ] === null ){\r
-                                       this.boxX = ( boxL || boxL === 0 ) ? boxL : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.left.No ], allowedW );\r
+                               if( attrs[ XUI_Attr_Support.right.No ] === null ){\r
+                                       this.boxX = ( boxL || boxL === 0 ) ? boxL : XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.left.No ], allowedW );\r
                                } else {\r
-                                       this.boxX = alllowW - this.boxWidth - ( ( boxR || boxR === 0 ) ? boxR : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.right.No ], allowedW ) );\r
+                                       this.boxX = alllowW - this.boxWidth - ( ( boxR || boxR === 0 ) ? boxR : XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.right.No ], allowedW ) );\r
                                };\r
                        } else {\r
                                delete this.boxX;\r
@@ -469,12 +478,12 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                        \r
                        if( this.parentData && this.parentData.layout.overrideAttrsForChild.top ){\r
                                if( this.constraintH ){\r
-                                       this.boxY = ( boxT || boxT === 0 ) ? boxT : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.top.No ], allowedH );\r
+                                       this.boxY = ( boxT || boxT === 0 ) ? boxT : XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.top.No ], allowedH );\r
                                } else\r
-                               if( attrs[ X.UI.Attr.Support.bottom.No ] === null ){\r
-                                       this.boxY = ( boxT || boxT === 0 ) ? boxT : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.top.No ], allowedH );\r
+                               if( attrs[ XUI_Attr_Support.bottom.No ] === null ){\r
+                                       this.boxY = ( boxT || boxT === 0 ) ? boxT : XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.top.No ], allowedH );\r
                                } else {\r
-                                       this.boxY = allowedH - this.boxHeight - ( ( boxB || boxB === 0 ) ? boxB : XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.bottom.No ], allowedH ) );\r
+                                       this.boxY = allowedH - this.boxHeight - ( ( boxB || boxB === 0 ) ? boxB : XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.bottom.No ], allowedH ) );\r
                                };\r
                        } else {\r
                                delete this.boxY;\r
@@ -482,13 +491,14 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                },\r
                \r
                /**\r
-                * 描画・計測を行って、contentSize, scrollSize の決定\r
+                * 描画・計測を行って、contentSize の決定\r
                 */\r
                mesure : function(){\r
                        var dirty = this.dirty,\r
-                               w, h, xnode;\r
+                               //sup   = X_UA[ 'Gecko' ] || ( X_UA[ 'Safari' ] && X_UA[ 'Windows' ] ) ? .01251 : 0,\r
+                               w, _w, h, xnode;\r
                        \r
-                       if( dirty === X.UI.Dirty.CLEAN ){\r
+                       if( dirty === XUI_Dirty.CLEAN ){\r
                                if( this.percentWidth || this.percentHeight ){\r
                                        \r
                                };\r
@@ -496,12 +506,12 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                        \r
                        switch( dirty ){\r
                                \r
-                               case X.UI.Dirty.CONTENT : // コンテンツが変更された\r
-                               case X.UI.Dirty.FONT    : // フォントサイズが変更された\r
+                               case XUI_Dirty.CONTENT : // コンテンツが変更された\r
+                               case XUI_Dirty.FONT    : // フォントサイズが変更された\r
                                        delete this.lastContentWidth;\r
                                        delete this.lastContentHeight;\r
                                        \r
-                               case X.UI.Dirty.LAYOUT : // レイアウトの再計算が必要\r
+                               case XUI_Dirty.LAYOUT : // レイアウトの再計算が必要\r
                                \r
                                default : // TODO レイアウト崩れに対処 パフォーマンス悪い!\r
                                \r
@@ -528,67 +538,67 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                         *     必要でない\r
                                         */\r
                                        if( xnode[ '_xnodes' ] && xnode[ '_xnodes' ].length ){\r
-                                               if( w === X.UI.Attr.AUTO ){\r
-                                                       w = this.contentWidth = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'width', 'auto' )[ 'width' ]() / X_Node_CSS_getCharSize( xnode ) );\r
-                                                       console.log( 'chr ' + X_Node_CSS_getCharSize( xnode ) );\r
-                                                       \r
-                                                       //this.scrollWidth = w + this.contentL + this.contentR;\r
-                                                       if( this.maxContentWidth < w - this.boxSizingOffsetLR ) this.contentWidth = this.maxContentWidth + this.boxSizingOffsetLR;\r
-                                                       if( w - this.boxSizingOffsetLR < this.minContentWidth ) this.contentWidth = this.minContentWidth + this.boxSizingOffsetLR;\r
-                                                       this.lastContentWidth = this.contentWidth;\r
+                                               if( w === XUI_Attr_AUTO ){\r
                                                        \r
-                                                       w !== this.contentWidth && xnode[ 'css' ]( 'width', this.contentWidth + 'em' );\r
-                                                       \r
-                                                       if( h === X.UI.Attr.AUTO ){\r
-                                                               this.contentHeight = h = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) ); // scrollHeight() ??\r
-                                                               //this.scrollHeight  = h + this.contentT + this.contentB;\r
-                                                               if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB;\r
-                                                               if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB;\r
-                                                       } else {\r
-                                                               //this.scrollHeight = h + this.contentT + this.contentB;\r
+                                                       w = _w = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'width', 'auto' )[ 'clientWidth' ]() / X_Node_CSS_getCharSize( xnode ) );\r
+\r
+                                                       if( this.maxContentWidth < w - this.boxSizingOffsetLR ){\r
+                                                               this.noWidth = false;\r
+                                                               w = this.maxContentWidth + this.boxSizingOffsetLR;\r
                                                        };\r
-                                                       \r
-                                                       this.lastContentHeight = h;\r
+                                                       if( w - this.boxSizingOffsetLR < this.minContentWidth ){\r
+                                                               this.noWidth = false;\r
+                                                               w = this.minContentWidth + this.boxSizingOffsetLR;\r
+                                                       };\r
+\r
+                                                       if( h === XUI_Attr_AUTO ){\r
+                                                               w !== _w && xnode[ 'css' ]( 'width', w + 'em' );\r
+                                                               h = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) );\r
+                                                               w !== _w && xnode[ 'css' ]( 'width', 'auto' );\r
+                                                       };\r
+\r
+                                                       this.lastContentWidth = this.contentWidth = w;\r
+\r
                                                } else\r
-                                               if( h === X.UI.Attr.AUTO ){\r
-                                                       console.log( 'chr ' + X_Node_CSS_getCharSize( xnode ) );\r
+                                               if( h === XUI_Attr_AUTO ){\r
                                                        if( w !== this.lastContentWidth ){\r
-                                                               xnode[ 'css' ]( 'width', w + 'em' );\r
+                                                               xnode[ 'css' ]( 'width', w + 'em' );                                                            \r
+                                                               this.lastContentWidth = w;\r
                                                                \r
-                                                               this.lastContentWidth  = w;\r
-                                                               this.contentHeight = h = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) ); // ie8 clientHeight, ff scrollHeight & clientHeight\r
-                                                               //this.scrollWidth       = w + this.contentL + this.contentR;\r
-                                                               //this.scrollHeight      = h + this.contentT + this.contentB;\r
-                                                               if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB;\r
-                                                               if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB;                                                           \r
+                                                               // ie8 clientHeight, ff scrollHeight & clientHeight\r
+                                                               h = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) );\r
                                                        } else {\r
-                                                               this.contentHeight = this.lastContentHeight = h =\r
-                                                                       this.lastContentHeight === -1 ? XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) ) : this.lastContentHeight;\r
-                                                               //this.scrollWidth   = w + this.contentL + this.contentR;\r
-                                                               //this.scrollHeight  = h + this.contentT + this.contentB;\r
+                                                               h = this.lastContentHeight === -1 ?\r
+                                                                               XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) ) :\r
+                                                                               this.lastContentHeight;\r
                                                        };\r
                                                } else\r
-                                               if( dirty !== X.UI.Dirty.LAYOUT ){\r
-                                                       console.log( 'chr ' + X_Node_CSS_getCharSize( xnode ) );\r
+                                               if( dirty !== XUI_Dirty.LAYOUT ){\r
                                                        this.contentWidth  = this.lastContentWidth  = w;\r
-                                                       this.contentHeight = this.lastContentHeight = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) );\r
-                                                       //this.scrollWidth   = this.contentWidth  + this.contentL + this.contentR;\r
-                                                       //this.scrollHeight  = this.contentHeight + this.contentT + this.contentB;\r
-                                               } else {\r
-                                                       //this.scrollWidth  = w + this.contentL + this.contentR;\r
-                                                       //this.scrollHeight = h + this.contentT + this.contentB;\r
-                                               };              \r
+                                                       h = XUI_AbstractUINode_ceil( xnode[ 'css' ]( 'height', 'auto' )[ 'scrollHeight' ]() / X_Node_CSS_getCharSize( xnode ) );\r
+                                               };\r
+                                               \r
+                                               if( this.maxContentHeight < h - this.boxSizingOffsetTB ){\r
+                                                       this.noHeight = false;\r
+                                                       h = this.maxContentHeight + this.boxSizingOffsetTB;\r
+                                               };\r
+                                               if( h - this.boxSizingOffsetTB < this.minContentHeight ){\r
+                                                       this.noHeight = false;\r
+                                                       h = this.minContentHeight + this.boxSizingOffsetTB;\r
+                                               };\r
+                                               \r
+                                               this.contentHeight = this.lastContentHeight = h;\r
+                                               \r
                                        } else {\r
                                                // コンテンツを持たないため基本のサイズは0\r
-                                               if( w === X.UI.Attr.AUTO ) this.contentWidth  = w = 0 < this.minContentWidth  ? this.minContentWidth  : 0;\r
-                                               if( h === X.UI.Attr.AUTO ) this.contentHeight = h = 0 < this.minContentHeight ? this.minContentHeight : 0;\r
-                                               //this.scrollWidth  = w + this.contentL + this.contentR;\r
-                                               //this.scrollHeight = h + this.contentT + this.contentB;\r
+                                               if( w === XUI_Attr_AUTO ) this.contentWidth  = w = 0 < this.minContentWidth  ? this.minContentWidth  : 0;\r
+                                               if( h === XUI_Attr_AUTO ) this.contentHeight = h = 0 < this.minContentHeight ? this.minContentHeight : 0;\r
+                                               this.noWidth = this.noHeight = false;\r
                                        };\r
                                        \r
                                        delete this.dirty;\r
                                        break;                  \r
-                               //case X.UI.Dirty.PAINT : // 再描画のみ必要\r
+                               //case XUI_Dirty.PAINT : // 再描画のみ必要\r
                                //      break;\r
                        };\r
                },\r
@@ -596,8 +606,8 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                 * 自身の contentWidth, contentHeight を元に AUTO な width, height を確定していく\r
                 */\r
                postMesure : function(){\r
-                       var     attrs = this.attrObject || this.attrClass.prototype || X.UI.AttrClass,\r
-                               box   = attrs[ X.UI.Attr.Support.sizing.No ],\r
+                       var     attrs = this.attrObject || this.attrClass.prototype || XUI_AttrClass,\r
+                               box   = attrs[ XUI_Attr_Support.sizing.No ],\r
                                contentW, contentH,\r
                                contentPlus,\r
                                paddingT, paddingR, paddingB, paddingL,\r
@@ -605,12 +615,12 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                min, max;\r
                                \r
                        // Width\r
-                       if( this.boxWidth === X.UI.Attr.AUTO ){\r
+                       if( this.boxWidth === XUI_Attr_AUTO ){\r
                                contentW = this.contentWidth;\r
-                               paddingR = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 1 ], contentW );                                 \r
-                               paddingL = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 3 ], contentW );                                 \r
-                               borderR  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No + 1 ], contentW );\r
-                               borderL  = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No + 3 ], contentW );\r
+                               paddingR = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.padding.No + 1 ], contentW );                                  \r
+                               paddingL = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.padding.No + 3 ], contentW );                                  \r
+                               borderR  = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.borderWidth.No + 1 ], contentW );\r
+                               borderL  = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.borderWidth.No + 3 ], contentW );\r
                                contentPlus = 0;\r
                                switch( box ){\r
                                        case 3 : // border-box\r
@@ -622,8 +632,8 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                \r
                                if( !this.constraintW ){\r
                                        contentW += contentPlus;\r
-                                       min = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.minWidth.No ], contentW );\r
-                                       max = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.maxWidth.No ], contentW );\r
+                                       min = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.minWidth.No ], contentW );\r
+                                       max = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.maxWidth.No ], contentW );\r
                                        if( contentW < min && contentPlus < min ){\r
                                                this.contentWidth = min - contentPlus;\r
                                        } else\r
@@ -636,12 +646,12 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                this.boxWidth = this.contentWidth + this.contentL + this.contentR;\r
                        };\r
                        // Height\r
-                       if( this.boxHeight === X.UI.Attr.AUTO ){\r
+                       if( this.boxHeight === XUI_Attr_AUTO ){\r
                                contentH    = this.contentHeight;\r
-                               paddingT    = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 0 ], contentH );// paddingTRBL の % 指定は 最大幅に対して TB でも幅に対して\r
-                               paddingB    = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.padding.No + 2 ], contentH );\r
-                               borderT     = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No  + 0 ], contentH );\r
-                               borderB     = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.borderWidth.No  + 2 ], contentH );\r
+                               paddingT    = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.padding.No + 0 ], contentH );// paddingTRBL の % 指定は 最大幅に対して TB でも幅に対して\r
+                               paddingB    = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.padding.No + 2 ], contentH );\r
+                               borderT     = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.borderWidth.No  + 0 ], contentH );\r
+                               borderB     = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.borderWidth.No  + 2 ], contentH );\r
                                contentPlus = 0;\r
                                switch( box ){\r
                                        case 3 : // border-box\r
@@ -652,8 +662,8 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                };\r
                                if( !this.constraintH ){\r
                                        contentH += contentPlus;\r
-                                       min = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.minHeight.No ], contentH );\r
-                                       max = XUI_AbstractUINode_calcValue( attrs[ X.UI.Attr.Support.maxHeight.No ], contentH );\r
+                                       min = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.minHeight.No ], contentH );\r
+                                       max = XUI_AbstractUINode_calcValue( attrs[ XUI_Attr_Support.maxHeight.No ], contentH );\r
                                        if( contentH < min && contentPlus < min ){\r
                                                this.contentHeight = min - contentPlus;\r
                                        } else\r
@@ -685,15 +695,15 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                 */\r
                listen : function( type, arg1, arg2, arg3 ){\r
                        var root, events, counter, f;\r
-                       if( X.UI.Event._START_POINTER <= type && type <= X.UI.Event._END_POINTER ){\r
+                       if( XUI_Event._START_POINTER <= type && type <= XUI_Event._END_POINTER ){\r
                                if( this.phase < 3 ){\r
                                        if( !( events = this.reserveEvents ) ) this.reserveEvents = events = [];\r
                                        events[ events.length ] = [ type, arg1, arg2, arg3 ];\r
                                        return this;\r
                                };\r
-                               if( X.UI.Event._START_XUI_EVENT < type && type < X.UI.Event._END_XUI_EVENT ){\r
+                               if( XUI_Event._START_XUI_EVENT < type && type < XUI_Event._END_XUI_EVENT ){\r
                                        if( !this.gesture ){\r
-                                               this.gesture = new X.UI.Gesture( this.rootData, this, type );\r
+                                               this.gesture = new Hammer( this.rootData, this, type );\r
                                        } else {\r
                                                this.gesture[ 'listen' ]( type );\r
                                        };\r
@@ -705,7 +715,7 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                                ++counter[ type ];\r
                                        } else {\r
                                                counter[ type ] = 1;                            \r
-                                               root.xnodeInteractiveLayer[ 'listen' ]( X.UI.Event.IdToName[ type ], X_UI_eventRellay );\r
+                                               root.xnodeInteractiveLayer[ 'listen' ]( XUI_Event.IdToName[ type ], X_UI_eventRellay );\r
                                        };\r
                                };\r
                        };\r
@@ -720,7 +730,7 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                },\r
                unlisten : function( type, arg1, arg2, arg3 ){\r
                        var root, events, i, ev, counter, f;\r
-                       if( X.UI.Event._START_POINTER <= type && type <= X.UI.Event._END_POINTER ){\r
+                       if( XUI_Event._START_POINTER <= type && type <= XUI_Event._END_POINTER ){\r
                                if( this.phase < 3 ){\r
                                        if( !( events = this.reserveEvents ) ) return this;\r
                                        for( i = events.length; i; ){\r
@@ -733,7 +743,7 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                        return this;\r
                                };\r
 \r
-                               if( X.UI.Event._START_XUI_EVENT < type && type < X.UI.Event._END_XUI_EVENT ){\r
+                               if( XUI_Event._START_XUI_EVENT < type && type < XUI_Event._END_XUI_EVENT ){\r
                                        this.gesture && this.gesture[ 'unlisten' ]( type );\r
                                } else {\r
                                        root    = this.rootData;\r
@@ -741,7 +751,7 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                                        if( !counter[ type ] ) return this;\r
                                        --counter[ type ];\r
                                        if( counter[ type ] === 0 ){\r
-                                               root.xnodeInteractiveLayer[ 'unlisten' ]( X.UI.Event.IdToName[ type ], X_UI_eventRellay );\r
+                                               root.xnodeInteractiveLayer[ 'unlisten' ]( XUI_Event.IdToName[ type ], X_UI_eventRellay );\r
                                                delete counter[ type ];\r
                                        };\r
                                };\r
@@ -758,12 +768,12 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
                \r
                dispatch : function( e ){\r
                        //console.log( e.type + ' ' + ( this[ '_listeners' ] && this[ '_listeners' ][ e.type ] ) );\r
-                       var xve  = X.UI.Event,\r
+                       var xve  = XUI_Event,\r
                                ret  = X_EventDispatcher_dispatch.call( this, e ),\r
                                type = e.type || e;\r
                        \r
                        // TODO captureEvent PointerEvent\r
-                       if( ret & X_Callback_MONOPOLY && !this.hitChildData && ( xve._POINTER_MOVE === type || xve._MOUSE_MOVE === type || xve.FILE_DRAG === type ) ){\r
+                       if( ret & X_Callback_CAPTURE_POINTER && !this.hitChildData && XUI_Event._POINTER_MOVE === type ){\r
                                this.rootData.monopolyNodeData = this;\r
                                return ret;\r
                        };\r
@@ -776,15 +786,15 @@ X.UI._AbstractUINode = X_EventDispatcher[ 'inherits' ](
 );\r
 \r
 function XUI_AbstractUINode_createCssText( that, name ){\r
-       var attrs      = that.attrObject || that.attrClass.prototype || X.UI.AttrClass,\r
+       var attrs      = that.attrObject || that.attrClass.prototype || XUI_AttrClass,\r
                def        = that.supportAttrs[ name ],\r
                no         = def.No,\r
                v          = attrs[ def.No ],\r
                type       = def[ 3 ],\r
                list       = def[ 4 ],\r
-               flag       = !!( type & X.UI.Attr.Type.BOOLEAN ),\r
-               combi      = !!( type & X.UI.Attr.Type.COMBI   ),\r
-               quartet    = !!( type & X.UI.Attr.Type.QUARTET );\r
+               flag       = !!( type & XUI_Attr_Type.BOOLEAN ),\r
+               combi      = !!( type & XUI_Attr_Type.COMBI   ),\r
+               quartet    = !!( type & XUI_Attr_Type.QUARTET );\r
 \r
        if( quartet ){\r
                if( attrs[ no + 1 ] === attrs[ no + 3 ] ){\r
@@ -823,18 +833,18 @@ function XUI_AbstractUINode_createCssText( that, name ){
 };\r
 \r
 function XUI_AbstractUINode_createCssValue( v, type, list ){\r
-       var length     = !!( type & X.UI.Attr.Type.LENGTH        ),\r
-               minusLen   = !!( type & X.UI.Attr.Type.MINUS_LENGTH  ),\r
-               percent    = !!( type & X.UI.Attr.Type.PERCENT       ),\r
-               minusPct   = !!( type & X.UI.Attr.Type.MINUS_PERCENT ),\r
-               numerical  = !!( type & X.UI.Attr.Type.NUMERICAL     ),\r
-               auto       = !!( type & X.UI.Attr.Type.AUTO          ),\r
-               color      = !!( type & X.UI.Attr.Type.COLOR         ),\r
-               url        = !!( type & X.UI.Attr.Type.URL           ),\r
-               fontName   = !!( type & X.UI.Attr.Type.FONT_NAME     );\r
+       var length     = !!( type & XUI_Attr_Type.LENGTH        ),\r
+               minusLen   = !!( type & XUI_Attr_Type.MINUS_LENGTH  ),\r
+               percent    = !!( type & XUI_Attr_Type.PERCENT       ),\r
+               minusPct   = !!( type & XUI_Attr_Type.MINUS_PERCENT ),\r
+               numerical  = !!( type & XUI_Attr_Type.NUMERICAL     ),\r
+               auto       = !!( type & XUI_Attr_Type.AUTO          ),\r
+               color      = !!( type & XUI_Attr_Type.COLOR         ),\r
+               url        = !!( type & XUI_Attr_Type.URL           ),\r
+               fontName   = !!( type & XUI_Attr_Type.FONT_NAME     );\r
        \r
        if( X_Type_isNumber( v ) ){\r
-               if( auto && v === X.UI.Attr.AUTO ) return 'auto';\r
+               if( auto && v === XUI_Attr_AUTO ) return 'auto';\r
                if( length || minusLen ) return v + 'em';\r
                if( numerical ) return v;\r
                if( list && list[ v ] ) return list[ v ];\r
@@ -877,7 +887,7 @@ function XUI_AbstractUINode_ceil( v ){
 \r
 X.UI.AbstractUINode = X_Class_create(\r
        'AbstractUINode',\r
-       X_Class.ABSTRACT | X_Class.SUPER_ACCESS,\r
+       X_Class.ABSTRACT,\r
        {\r
                parent : function(){\r
                        return X_Class_getPrivate( this ).parent;\r
@@ -918,7 +928,7 @@ X.UI.AbstractUINode = X_Class_create(
                                        };\r
                                };\r
                                // getter\r
-                               if( attrs = ( p.attrObject || p.attrClass.prototype || X.UI.AttrClass ) ){\r
+                               if( attrs = ( p.attrObject || p.attrClass.prototype || XUI_AttrClass ) ){\r
                                        def = p.supportAttrs[ nameOrObject ];\r
                                        return def && attrs[ def.No ];\r
                                };\r