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);
    }
    //Get Generic
    public static GenericType.Component Generic(ButtonType.Component button)
    {
        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 = "Button";

        //Data
        gen.data.name       = button.data.name;
        gen.data.active     = button.data.active;
        gen.data.GUIcontent = button.data.GUIcontent;
        //GUIContent

        // Geometry Generic
        gen.geometry.depth     = button.geometry.depth;
        gen.geometry.body.rect = button.geometry.buttonBody.rect;

        //Geometry xpecific
        gen.geometry.buttonBody = button.geometry.buttonBody;
        // gen.geometry.buttonBody.rect = button.geometry.buttonBody.rect;
        // gen.geometry.buttonBody.size = button.geometry.buttonBody.size;



        // Structure
        gen.structure.tabParent    = button.structure.tabParent;
        gen.structure.childrenTabs = button.structure.childrenTabs;
        // gen.structure.children = button.structure.children;

        // Style

        gen.style.bodySkinFollowBranch = button.style.bodySkinFollowBranch;
        gen.style.bodySkin             = button.style.bodySkin;



        return(gen);
    }
    //Get Generic
    public static GenericType.Component Generic(TabType.Component tab)
    {
        if (tab == null)
        {
            return(null);
        }
        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 = "Tab";

        //Data
        gen.data.name   = tab.data.name;
        gen.data.active = tab.data.active;
        gen.data.type   = tab.data.type;
        //gen.data.globalParams = tab.data.globalParams;

        // Full Geometries

        gen.geometry.tabHeader        = tab.geometry.tabHeader;
        gen.geometry.tabHeaderContent = tab.geometry.tabHeaderContent;
        gen.geometry.tabContainer     = tab.geometry.tabContainer;
        gen.geometry.tabBody          = tab.geometry.tabBody;
        gen.geometry.tabContent       = tab.geometry.tabContent;

        // Generic geometry
        gen.geometry.depth              = tab.geometry.depth;
        gen.geometry.header.rect        = tab.geometry.tabHeader.rect;
        gen.geometry.headerContent.rect = tab.geometry.tabHeaderContent.rect;
        gen.geometry.container.rect     = tab.geometry.tabContainer.rect;
        gen.geometry.body.rect          = tab.geometry.tabBody.rect;
        gen.geometry.content.rect       = tab.geometry.tabContent.rect;



        // Structure
        gen.structure.tabParent    = tab.structure.tabParent;
        gen.structure.childrenTabs = tab.structure.childrenTabs;
        //    gen.structure.childrenButtons = tab.structure.childrenButtons;
        //     gen.structure.childrenTextAreas = tab.structure.childrenTextAreas;
        gen.structure.children = tab.structure.children;

        // Style
        gen.style.headerSkinFollowBranch    = tab.style.headerSkinFollowBranch;
        gen.style.headerSkin                = tab.style.headerSkin;
        gen.style.headerContentSkin         = tab.style.headerContentSkin;
        gen.style.containerSkinFollowBranch = tab.style.containerSkinFollowBranch;
        gen.style.containerSkin             = tab.style.containerSkin;
        gen.style.bodySkinFollowBranch      = tab.style.bodySkinFollowBranch;
        gen.style.bodySkin    = tab.style.bodySkin;
        gen.style.contentSkin = tab.style.contentSkin;      //debug only



        return(gen);
    }