private static void AdjustDepth()
    {
        var panel   = UnityEditor.Selection.activeTransform.GetComponent <UIPanel>();
        var widgets = GetPanelWidgets(panel, false);

        DepthCalculatorBindingAlgorithm.BindToWidgets(widgets);
        UnityEditor.Undo.RecordObjects(widgets, "AdjustDepth");
        DepthCalculationAlgorithm.CalculateDepthForWidgets(widgets);
        foreach (var w in widgets)
        {
            var c = w.GetComponent <DepthCalculator>();
            if (c != null)
            {
                NGUITools.Destroy(c);
            }
        }
    }
    private static void Bind()
    {
        var panel = UnityEditor.Selection.activeTransform.GetComponent <UIPanel>();

        DepthCalculatorBindingAlgorithm.BindToWidgets(GetPanelWidgets(panel, false));
    }