public void Init(Rect rect, AudioProfilerGroupViewBackend backend) { if (this.m_HeaderStyle == null) { this.m_HeaderStyle = new GUIStyle("OL title"); } this.m_HeaderStyle.alignment = TextAnchor.MiddleLeft; if (this.m_TreeView == null) { this.m_Backend = backend; if (this.m_TreeViewState.columnWidths == null) { int num = AudioProfilerGroupInfoHelper.GetLastColumnIndex() + 1; this.m_TreeViewState.columnWidths = new float[num]; for (int i = 2; i < num; i++) { this.m_TreeViewState.columnWidths[i] = (((i != 2) && (i != 3)) && ((i < 11) || (i > 0x10))) ? ((float)60) : ((float)0x4b); } this.m_TreeViewState.columnWidths[0] = 140f; this.m_TreeViewState.columnWidths[1] = 140f; } this.m_TreeView = new TreeViewController(this.m_EditorWindow, this.m_TreeViewState); ITreeViewGUI gui = new AudioProfilerGroupViewGUI(this.m_TreeView); ITreeViewDataSource data = new AudioProfilerDataSource(this.m_TreeView, this.m_Backend); this.m_TreeView.Init(rect, data, gui, null); this.m_ColumnHeader = new AudioProfilerGroupViewColumnHeader(this.m_TreeViewState, this.m_Backend); this.m_ColumnHeader.columnWidths = this.m_TreeViewState.columnWidths; this.m_ColumnHeader.minColumnWidth = 30f; this.m_TreeView.selectionChangedCallback = (Action <int[]>)Delegate.Combine(this.m_TreeView.selectionChangedCallback, new Action <int[]>(this.OnTreeSelectionChanged)); } }
public AudioProfilerGroupViewColumnHeader(AudioProfilerGroupTreeViewState state, AudioProfilerGroupViewBackend backend) { this.m_TreeViewState = state; this.m_Backend = backend; this.minColumnWidth = 10f; this.dragWidth = 6f; }
public AudioProfilerDataSource(TreeViewController treeView, AudioProfilerGroupViewBackend backend) : base(treeView) { this.m_Backend = backend; this.m_Backend.OnUpdate = new AudioProfilerGroupViewBackend.DataUpdateDelegate(this.FetchData); base.showRootItem = false; base.rootIsCollapsable = false; this.FetchData(); }