UnityEditor.DockArea.AddDefaultItemsToMenu C# (CSharp) Method

AddDefaultItemsToMenu() protected method

protected AddDefaultItemsToMenu ( GenericMenu menu, EditorWindow view ) : void
menu GenericMenu
view EditorWindow
return void
        protected override void AddDefaultItemsToMenu(GenericMenu menu, EditorWindow view)
        {
            if (menu.GetItemCount() != 0)
            {
                menu.AddSeparator(string.Empty);
            }
            if (base.parent.window.showMode == ShowMode.MainWindow)
            {
                menu.AddItem(EditorGUIUtility.TextContent("Maximize"), !(base.parent is SplitView), new GenericMenu.MenuFunction2(this.Maximize), view);
            }
            else
            {
                menu.AddDisabledItem(EditorGUIUtility.TextContent("Maximize"));
            }
            menu.AddItem(EditorGUIUtility.TextContent("Close Tab"), false, new GenericMenu.MenuFunction2(this.Close), view);
            menu.AddSeparator(string.Empty);
            System.Type[] paneTypes = base.GetPaneTypes();
            GUIContent content = EditorGUIUtility.TextContent("Add Tab");
            foreach (System.Type type in paneTypes)
            {
                if (type != null)
                {
                    GUIContent content2;
                    content2 = new GUIContent(EditorWindow.GetLocalizedTitleContentFromType(type)) {
                        text = content.text + "/" + content2.text
                    };
                    menu.AddItem(content2, false, new GenericMenu.MenuFunction2(this.AddTabToHere), type);
                }
            }
        }