Inheritance: LazyTreeViewDataSource
        private void Init()
        {
            if (this.m_TreeViewState == null)
            {
                this.m_TreeViewState = new TreeViewState();
            }
            this.m_TreeView = new TreeView((EditorWindow)this, this.m_TreeViewState);
            this.m_TreeView.itemDoubleClickedCallback        += new System.Action <int>(this.TreeViewItemDoubleClicked);
            this.m_TreeView.selectionChangedCallback         += new System.Action <int[]>(this.TreeViewSelectionChanged);
            this.m_TreeView.onGUIRowCallback                 += new System.Action <int, Rect>(this.OnGUIAssetCallback);
            this.m_TreeView.dragEndedCallback                += new System.Action <int[], bool>(this.OnDragEndedCallback);
            this.m_TreeView.contextClickItemCallback         += new System.Action <int>(this.ItemContextClick);
            this.m_TreeView.contextClickOutsideItemsCallback += new System.Action(this.ContextClickOutsideItems);
            this.m_TreeView.deselectOnUnhandledMouseDown      = true;
            GameObjectTreeViewDataSource treeViewDataSource = new GameObjectTreeViewDataSource(this.m_TreeView, this.m_CurrenRootInstanceID, false, false);
            GameObjectsTreeViewDragging  treeViewDragging   = new GameObjectsTreeViewDragging(this.m_TreeView);
            GameObjectTreeViewGUI        objectTreeViewGui  = new GameObjectTreeViewGUI(this.m_TreeView, false);

            this.m_TreeView.Init(this.treeViewRect, (ITreeViewDataSource)treeViewDataSource, (ITreeViewGUI)objectTreeViewGui, (ITreeViewDragging)treeViewDragging);
            treeViewDataSource.searchMode   = (int)this.m_SearchMode;
            treeViewDataSource.searchString = this.m_SearchFilter;
            this.m_AllowAlphaNumericalSort  = EditorPrefs.GetBool("AllowAlphaNumericHierarchy", false) || InternalEditorUtility.inBatchMode;
            this.SetUpSortMethodLists();
            this.m_TreeView.ReloadData();
        }
示例#2
0
        private void Init()
        {
            if (this.m_TreeView != null)
            {
                return;
            }
            if (this.m_TreeViewState == null)
            {
                this.m_TreeViewState = new TreeViewState();
            }
            this.m_TreeView = new TreeView(this, this.m_TreeViewState);
            TreeView expr_3A = this.m_TreeView;

            expr_3A.itemDoubleClickedCallback = (Action <int>)Delegate.Combine(expr_3A.itemDoubleClickedCallback, new Action <int>(this.TreeViewItemDoubleClicked));
            TreeView expr_61 = this.m_TreeView;

            expr_61.selectionChangedCallback = (Action <int[]>)Delegate.Combine(expr_61.selectionChangedCallback, new Action <int[]>(this.TreeViewSelectionChanged));
            TreeView expr_88 = this.m_TreeView;

            expr_88.onGUIRowCallback = (Action <int, Rect>)Delegate.Combine(expr_88.onGUIRowCallback, new Action <int, Rect>(this.OnGUIAssetCallback));
            TreeView expr_AF = this.m_TreeView;

            expr_AF.dragEndedCallback = (Action <int[], bool>)Delegate.Combine(expr_AF.dragEndedCallback, new Action <int[], bool>(this.OnDragEndedCallback));
            this.m_TreeView.deselectOnUnhandledMouseDown = true;
            GameObjectTreeViewDataSource gameObjectTreeViewDataSource = new GameObjectTreeViewDataSource(this.m_TreeView, 0, false, false);
            GameObjectsTreeViewDragging  dragging = new GameObjectsTreeViewDragging(this.m_TreeView);
            GameObjectTreeViewGUI        gui      = new GameObjectTreeViewGUI(this.m_TreeView, false);

            this.m_TreeView.Init(this.treeViewRect, gameObjectTreeViewDataSource, gui, dragging);
            gameObjectTreeViewDataSource.searchMode   = (int)this.m_SearchMode;
            gameObjectTreeViewDataSource.searchString = this.m_SearchFilter;
            this.m_AllowAlphaNumericalSort            = (EditorPrefs.GetBool("AllowAlphaNumericHierarchy", false) || InternalEditorUtility.inBatchMode);
            this.SetUpSortMethodLists();
            this.m_TreeView.ReloadData();
        }
 private void ResizeItemList(int count)
 {
     this.AllocateBackingArrayIfNeeded();
     if (this.m_VisibleRows.Count != count)
     {
         GameObjectTreeViewDataSource.Resize(this.m_VisibleRows, count);
     }
 }
 private void InitializeFull()
 {
     if (SceneHierarchyWindow.debug)
     {
         GameObjectTreeViewDataSource.Log("Init full (" + (object)this.m_RowCount + ")");
     }
     this.InitializeRows(this.CreateHierarchyProperty(), 0, this.m_RowCount - 1);
 }
        private void InitializeFull()
        {
            if (SceneHierarchyWindow.debug)
            {
                GameObjectTreeViewDataSource.Log("Init full (" + this.m_RowCount + ")");
            }
            HierarchyProperty hierarchyProperty = this.CreateHierarchyProperty();

            this.m_RowCount = hierarchyProperty.CountRemaining(this.m_TreeView.state.expandedIDs.ToArray());
            this.ResizeItemList(this.m_RowCount);
            hierarchyProperty.Reset();
            this.InitializeRows(hierarchyProperty, 0, this.m_RowCount - 1);
        }
示例#6
0
 public override void BeginRowGUI()
 {
     if (this.DetectUserInput())
     {
         GameObjectTreeViewDataSource gameObjectTreeViewDataSource = (GameObjectTreeViewDataSource)this.m_TreeView.data;
         gameObjectTreeViewDataSource.EnsureFullyInitialized();
     }
     base.BeginRowGUI();
     if (this.showingStickyHeaders && Event.current.type != EventType.Repaint)
     {
         this.DoStickySceneHeaders();
     }
 }
示例#7
0
        public void SearchChanged()
        {
            GameObjectTreeViewDataSource gameObjectTreeViewDataSource = (GameObjectTreeViewDataSource)this.treeView.data;

            if (gameObjectTreeViewDataSource.searchMode == (int)base.searchMode && gameObjectTreeViewDataSource.searchString == this.m_SearchFilter)
            {
                return;
            }
            gameObjectTreeViewDataSource.searchMode   = (int)base.searchMode;
            gameObjectTreeViewDataSource.searchString = this.m_SearchFilter;
            if (this.m_SearchFilter == string.Empty)
            {
                this.treeView.Frame(Selection.activeInstanceID, true, false);
            }
            this.ReloadData();
        }
        public void SearchChanged()
        {
            GameObjectTreeViewDataSource data = (GameObjectTreeViewDataSource)this.treeView.data;

            if ((SearchableEditorWindow.SearchMode)data.searchMode == this.searchMode && data.searchString == this.m_SearchFilter)
            {
                return;
            }
            data.searchMode   = (int)this.searchMode;
            data.searchString = this.m_SearchFilter;
            if (this.m_SearchFilter == string.Empty)
            {
                this.treeView.Frame(Selection.activeInstanceID, true, false);
            }
            this.ReloadData();
        }
        private void InitializeMinimal()
        {
            int[]             expanded          = this.m_TreeView.state.expandedIDs.ToArray();
            HierarchyProperty hierarchyProperty = this.CreateHierarchyProperty();

            this.m_RowCount = hierarchyProperty.CountRemaining(expanded);
            this.ResizeItemList(this.m_RowCount);
            hierarchyProperty.Reset();
            if (SceneHierarchyWindow.debug)
            {
                GameObjectTreeViewDataSource.Log("Init minimal (" + this.m_RowCount + ")");
            }
            int firstRow;
            int lastRow;

            this.m_TreeView.gui.GetFirstAndLastRowVisible(out firstRow, out lastRow);
            this.InitializeRows(hierarchyProperty, firstRow, lastRow);
            this.m_RowsPartiallyInitialized = true;
        }
        private void Init()
        {
            if (this.m_TreeViewState == null)
            {
                this.m_TreeViewState = new TreeViewState();
            }
            this.m_TreeView = new TreeView(this, this.m_TreeViewState);
            TreeView expr_2E = this.m_TreeView;

            expr_2E.itemDoubleClickedCallback = (Action <int>)Delegate.Combine(expr_2E.itemDoubleClickedCallback, new Action <int>(this.TreeViewItemDoubleClicked));
            TreeView expr_55 = this.m_TreeView;

            expr_55.selectionChangedCallback = (Action <int[]>)Delegate.Combine(expr_55.selectionChangedCallback, new Action <int[]>(this.TreeViewSelectionChanged));
            TreeView expr_7C = this.m_TreeView;

            expr_7C.onGUIRowCallback = (Action <int, Rect>)Delegate.Combine(expr_7C.onGUIRowCallback, new Action <int, Rect>(this.OnGUIAssetCallback));
            TreeView expr_A3 = this.m_TreeView;

            expr_A3.dragEndedCallback = (Action <int[], bool>)Delegate.Combine(expr_A3.dragEndedCallback, new Action <int[], bool>(this.OnDragEndedCallback));
            TreeView expr_CA = this.m_TreeView;

            expr_CA.contextClickItemCallback = (Action <int>)Delegate.Combine(expr_CA.contextClickItemCallback, new Action <int>(this.ItemContextClick));
            TreeView expr_F1 = this.m_TreeView;

            expr_F1.contextClickOutsideItemsCallback     = (Action)Delegate.Combine(expr_F1.contextClickOutsideItemsCallback, new Action(this.ContextClickOutsideItems));
            this.m_TreeView.deselectOnUnhandledMouseDown = true;
            bool showRootNode          = false;
            bool rootNodeIsCollapsable = false;
            GameObjectTreeViewDataSource gameObjectTreeViewDataSource = new GameObjectTreeViewDataSource(this.m_TreeView, this.m_CurrenRootInstanceID, showRootNode, rootNodeIsCollapsable);
            GameObjectsTreeViewDragging  dragging = new GameObjectsTreeViewDragging(this.m_TreeView);
            GameObjectTreeViewGUI        gui      = new GameObjectTreeViewGUI(this.m_TreeView, false);

            this.m_TreeView.Init(this.treeViewRect, gameObjectTreeViewDataSource, gui, dragging);
            gameObjectTreeViewDataSource.searchMode   = (int)this.m_SearchMode;
            gameObjectTreeViewDataSource.searchString = this.m_SearchFilter;
            this.m_AllowAlphaNumericalSort            = (EditorPrefs.GetBool("AllowAlphaNumericHierarchy", false) || InternalEditorUtility.inBatchMode);
            this.SetUpSortMethodLists();
            this.m_TreeView.ReloadData();
        }
		private void Init()
		{
			if (this.m_TreeView != null)
			{
				return;
			}
			if (this.m_TreeViewState == null)
			{
				this.m_TreeViewState = new TreeViewState();
			}
			this.m_TreeView = new TreeView(this, this.m_TreeViewState);
			TreeView expr_3A = this.m_TreeView;
			expr_3A.itemDoubleClickedCallback = (Action<int>)Delegate.Combine(expr_3A.itemDoubleClickedCallback, new Action<int>(this.TreeViewItemDoubleClicked));
			TreeView expr_61 = this.m_TreeView;
			expr_61.selectionChangedCallback = (Action<int[]>)Delegate.Combine(expr_61.selectionChangedCallback, new Action<int[]>(this.TreeViewSelectionChanged));
			TreeView expr_88 = this.m_TreeView;
			expr_88.onGUIRowCallback = (Action<int, Rect>)Delegate.Combine(expr_88.onGUIRowCallback, new Action<int, Rect>(this.OnGUIAssetCallback));
			TreeView expr_AF = this.m_TreeView;
			expr_AF.dragEndedCallback = (Action<int[], bool>)Delegate.Combine(expr_AF.dragEndedCallback, new Action<int[], bool>(this.OnDragEndedCallback));
			this.m_TreeView.deselectOnUnhandledMouseDown = true;
			GameObjectTreeViewDataSource gameObjectTreeViewDataSource = new GameObjectTreeViewDataSource(this.m_TreeView, 0, false, false);
			GameObjectsTreeViewDragging dragging = new GameObjectsTreeViewDragging(this.m_TreeView);
			GameObjectTreeViewGUI gui = new GameObjectTreeViewGUI(this.m_TreeView, false);
			this.m_TreeView.Init(this.treeViewRect, gameObjectTreeViewDataSource, gui, dragging);
			gameObjectTreeViewDataSource.searchMode = (int)this.m_SearchMode;
			gameObjectTreeViewDataSource.searchString = this.m_SearchFilter;
			this.m_AllowAlphaNumericalSort = (EditorPrefs.GetBool("AllowAlphaNumericHierarchy", false) || InternalEditorUtility.inBatchMode);
			this.SetUpSortMethodLists();
			this.m_TreeView.ReloadData();
		}
 private void Init()
 {
   if (this.m_TreeViewState == null)
     this.m_TreeViewState = new TreeViewState();
   this.m_TreeView = new TreeView((EditorWindow) this, this.m_TreeViewState);
   this.m_TreeView.itemDoubleClickedCallback += new System.Action<int>(this.TreeViewItemDoubleClicked);
   this.m_TreeView.selectionChangedCallback += new System.Action<int[]>(this.TreeViewSelectionChanged);
   this.m_TreeView.onGUIRowCallback += new System.Action<int, Rect>(this.OnGUIAssetCallback);
   this.m_TreeView.dragEndedCallback += new System.Action<int[], bool>(this.OnDragEndedCallback);
   this.m_TreeView.contextClickItemCallback += new System.Action<int>(this.ItemContextClick);
   this.m_TreeView.contextClickOutsideItemsCallback += new System.Action(this.ContextClickOutsideItems);
   this.m_TreeView.deselectOnUnhandledMouseDown = true;
   GameObjectTreeViewDataSource treeViewDataSource = new GameObjectTreeViewDataSource(this.m_TreeView, this.m_CurrenRootInstanceID, false, false);
   GameObjectsTreeViewDragging treeViewDragging = new GameObjectsTreeViewDragging(this.m_TreeView);
   GameObjectTreeViewGUI objectTreeViewGui = new GameObjectTreeViewGUI(this.m_TreeView, false);
   this.m_TreeView.Init(this.treeViewRect, (ITreeViewDataSource) treeViewDataSource, (ITreeViewGUI) objectTreeViewGui, (ITreeViewDragging) treeViewDragging);
   treeViewDataSource.searchMode = (int) this.m_SearchMode;
   treeViewDataSource.searchString = this.m_SearchFilter;
   this.m_AllowAlphaNumericalSort = EditorPrefs.GetBool("AllowAlphaNumericHierarchy", false) || InternalEditorUtility.inBatchMode;
   this.SetUpSortMethodLists();
   this.m_TreeView.ReloadData();
 }