public static GenericType.Component Generic(TextareaType.Component textarea)
    {
        GenericType.Component gen       = new GenericType.Component();
        GenericType.Data      data      = new GenericType.Data();
        GenericType.Geometry  geometry  = new GenericType.Geometry();
        GenericType.Structure structure = new GenericType.Structure();
        GenericType.Style     style     = new GenericType.Style();

        gen.data      = data;
        gen.geometry  = geometry;
        gen.structure = structure;
        gen.style     = style;

        //generic type
        gen.type = "Textarea";
        //Data
        gen.data.name       = textarea.data.name;
        gen.data.active     = textarea.data.active;
        gen.data.GUIcontent = textarea.data.GUIContent;


        // Geometry rects
        gen.geometry.depth = textarea.geometry.depth;

        //Generic
        gen.geometry.body.rect    = textarea.geometry.textareaBody.rect;
        gen.geometry.content.rect = textarea.geometry.textareaContent.rect;


        //Xpecific
        gen.geometry.textareaBody    = textarea.geometry.textareaBody;
        gen.geometry.textareaContent = textarea.geometry.textareaContent;



        // Structure
        gen.structure.tabParent = textarea.structure.tabParent;


        // Style

        gen.style.bodySkinFollowBranch    = textarea.style.bodySkinFollowBranch;
        gen.style.bodySkin                = textarea.style.bodySkin;
        gen.style.contentSkinFollowBranch = textarea.style.contentSkinFollowBranch;

        gen.style.contentSkin = textarea.style.contentSkin;  //



        return(gen);
    }
    public static Size getContentSize(TextareaComponent _textarea)
    {
        TextareaType.Component textarea = _textarea.textarea;
        Size size     = new Size(0, 0);
        Size bodySize = new GenericGeometry.GenericSize(_textarea).size;



        size.w = bodySize.w;
        size.h = textarea.style.bodySkin.textArea.CalcHeight(textarea.data.GUIContent, size.w);
        //size.h = b.textArea.CalcHeight(textarea.data.GUIContent, size.w);


        // size.w = textarea.style.contentSkin.textArea.CalcSize(textarea.data.GUIContent).x;
        // size.h = new GenericGeometry.GenericSize(_textarea).size.h;


        return(size);
    }