示例#1
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));
        }
示例#2
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));
		}