private void OnGUI()
		{
			Rect rect = new Rect(0f, 0f, base.position.width / 2f, base.position.height);
			Rect rect2 = new Rect(base.position.width / 2f, 0f, base.position.width / 2f, base.position.height);
			if (this.m_TreeViewTest == null)
			{
				this.m_BackendData = new TreeViewTest.BackendData();
				this.m_BackendData.GenerateData(1000000);
				bool lazy = false;
				this.m_TreeViewTest = new TreeViewTest(this, lazy);
				this.m_TreeViewTest.Init(rect, this.m_BackendData);
				lazy = true;
				this.m_TreeViewTest2 = new TreeViewTest(this, lazy);
				this.m_TreeViewTest2.Init(rect2, this.m_BackendData);
			}
			this.m_TreeViewTest.OnGUI(rect);
			this.m_TreeViewTest2.OnGUI(rect2);
			EditorGUI.DrawRect(new Rect(rect.xMax - 1f, 0f, 2f, base.position.height), new Color(0.4f, 0.4f, 0.4f, 0.8f));
		}
        private void OnGUI()
        {
            Rect rect  = new Rect(0f, 0f, base.position.width / 2f, base.position.height);
            Rect rect2 = new Rect(base.position.width / 2f, 0f, base.position.width / 2f, base.position.height);

            if (this.m_TreeViewTest == null)
            {
                this.m_BackendData = new TreeViewTest.BackendData();
                this.m_BackendData.GenerateData(1000000);
                bool lazy = false;
                this.m_TreeViewTest = new TreeViewTest(this, lazy);
                this.m_TreeViewTest.Init(rect, this.m_BackendData);
                lazy = true;
                this.m_TreeViewTest2 = new TreeViewTest(this, lazy);
                this.m_TreeViewTest2.Init(rect2, this.m_BackendData);
            }
            this.m_TreeViewTest.OnGUI(rect);
            this.m_TreeViewTest2.OnGUI(rect2);
            EditorGUI.DrawRect(new Rect(rect.xMax - 1f, 0f, 2f, base.position.height), new Color(0.4f, 0.4f, 0.4f, 0.8f));
        }
Esempio n. 3
0
        public void Init(Rect rect, TreeViewTest.BackendData backendData)
        {
            if (this.m_TreeView != null)
            {
                return;
            }
            this.m_BackendData = backendData;
            TreeViewState treeViewState = new TreeViewState();

            treeViewState.columnWidths = new float[]
            {
                250f,
                90f,
                93f,
                98f,
                74f,
                78f
            };
            this.m_TreeView = new TreeView(this.m_EditorWindow, treeViewState);
            ITreeViewGUI        gui      = new TreeViewTest.TestGUI(this.m_TreeView);
            ITreeViewDragging   dragging = new TreeViewTest.TestDragging(this.m_TreeView, this.m_BackendData);
            ITreeViewDataSource data;

            if (this.m_Lazy)
            {
                data = new TreeViewTest.LazyTestDataSource(this.m_TreeView, this.m_BackendData);
            }
            else
            {
                data = new TreeViewTest.TestDataSource(this.m_TreeView, this.m_BackendData);
            }
            this.m_TreeView.Init(rect, data, gui, dragging);
            this.m_ColumnHeader = new TreeViewTest.TreeViewColumnHeader();
            this.m_ColumnHeader.columnWidths   = treeViewState.columnWidths;
            this.m_ColumnHeader.minColumnWidth = 30f;
            TreeViewTest.TreeViewColumnHeader expr_D5 = this.m_ColumnHeader;
            expr_D5.columnRenderer = (Action <int, Rect>)Delegate.Combine(expr_D5.columnRenderer, new Action <int, Rect>(this.OnColumnRenderer));
        }
Esempio n. 4
0
 public TestDragging(TreeView treeView, TreeViewTest.BackendData data) : base(treeView)
 {
     this.m_BackendData = data;
 }
Esempio n. 5
0
 public TestDataSource(TreeView treeView, TreeViewTest.BackendData data) : base(treeView)
 {
     this.m_Backend = data;
     this.FetchData();
 }
Esempio n. 6
0
 public TestDragging(TreeView treeView, TreeViewTest.BackendData data) : base(treeView)
 {
     this.m_BackendData = data;
 }
Esempio n. 7
0
 public TestDataSource(TreeView treeView, TreeViewTest.BackendData data) : base(treeView)
 {
     this.m_Backend = data;
     this.FetchData();
 }
Esempio n. 8
0
		public void Init(Rect rect, TreeViewTest.BackendData backendData)
		{
			if (this.m_TreeView != null)
			{
				return;
			}
			this.m_BackendData = backendData;
			TreeViewState treeViewState = new TreeViewState();
			treeViewState.columnWidths = new float[]
			{
				250f,
				90f,
				93f,
				98f,
				74f,
				78f
			};
			this.m_TreeView = new TreeView(this.m_EditorWindow, treeViewState);
			ITreeViewGUI gui = new TreeViewTest.TestGUI(this.m_TreeView);
			ITreeViewDragging dragging = new TreeViewTest.TestDragging(this.m_TreeView, this.m_BackendData);
			ITreeViewDataSource data;
			if (this.m_Lazy)
			{
				data = new TreeViewTest.LazyTestDataSource(this.m_TreeView, this.m_BackendData);
			}
			else
			{
				data = new TreeViewTest.TestDataSource(this.m_TreeView, this.m_BackendData);
			}
			this.m_TreeView.Init(rect, data, gui, dragging);
			this.m_ColumnHeader = new TreeViewTest.TreeViewColumnHeader();
			this.m_ColumnHeader.columnWidths = treeViewState.columnWidths;
			this.m_ColumnHeader.minColumnWidth = 30f;
			TreeViewTest.TreeViewColumnHeader expr_D5 = this.m_ColumnHeader;
			expr_D5.columnRenderer = (Action<int, Rect>)Delegate.Combine(expr_D5.columnRenderer, new Action<int, Rect>(this.OnColumnRenderer));
		}