private void DrawSecondToolbar()
        {
            var rect = GUILayoutUtility.GetRect(0, 21);

            if (Event.current.type == EventType.Repaint)
            {
                SirenixGUIStyles.ToolbarBackground.Draw(rect, GUIContent.none, 0);
                SirenixEditorGUI.DrawBorders(rect, 0, 0, 0, 1);
            }

            var rect3 = rect.AlignRight(80);
            var rect2 = rect3.SubX(100).SetWidth(100);
            var rect1 = rect.SetXMax(rect2.xMin);

            EditorGUI.BeginChangeCheck();

            this.memberTypes = EnumSelector <MemberTypeFlags> .DrawEnumField(rect2, null, this.memberTypes, btnStyle);

            this.accessModifiers = EnumSelector <AccessModifierFlags> .DrawEnumField(rect3, null, this.accessModifiers, btnStyle);

            if (EditorGUI.EndChangeCheck())
            {
                EditorPrefs.SetInt(AccessModifierFlagsPrefKey, (int)this.accessModifiers);
                EditorPrefs.SetInt(MemberTypeFlagsPrefKey, (int)this.memberTypes);
            }


            this.DrawSearchField(rect1);
        }
        private void DrawTree()
        {
            if (this.targetType == null)
            {
                this.tree = null;
                return;
            }

            if (Event.current.type == EventType.Layout)
            {
                this.currMemberTypes     = this.memberTypes;
                this.currAccessModifiers = this.accessModifiers;
            }

            if (this.tree == null || this.tree.TargetType != this.targetType)
            {
                if (this.targetType.IsGenericType && !this.targetType.IsFullyConstructedGenericType())
                {
                    SirenixEditorGUI.ErrorMessageBox("Cannot statically inspect generic type definitions");
                    return;
                }

                this.tree = PropertyTree.CreateStatic(this.targetType);
            }

            var allowObsoleteMembers        = (this.currMemberTypes & MemberTypeFlags.Obsolete) == MemberTypeFlags.Obsolete;
            var allowObsoleteMembersContext = this.tree.SecretRootProperty.Context.GetGlobal("ALLOW_OBSOLETE_STATIC_MEMBERS", false);

            if (allowObsoleteMembersContext.Value != allowObsoleteMembers)
            {
                allowObsoleteMembersContext.Value = allowObsoleteMembers;
                this.tree.SecretRootProperty.RefreshSetup();
            }

            InspectorUtilities.BeginDrawPropertyTree(tree, false);

            foreach (var prop in tree.EnumerateTree(false))
            {
                if (this.DrawProperty(prop))
                {
                    if (prop.Info.PropertyType != PropertyType.Group && prop.Info.GetMemberInfo() != null && prop.Info.GetMemberInfo().DeclaringType != this.targetType)
                    {
                        prop.Draw(new GUIContent(prop.Info.GetMemberInfo().DeclaringType.GetNiceName() + " -> " + prop.NiceName));
                    }
                    else
                    {
                        prop.Draw();
                    }
                }
                else
                {
                    prop.Update();
                }
            }

            InspectorUtilities.EndDrawPropertyTree(tree);
        }