public TopMarkers(ProfileAnalyzerWindow profileAnalyzerWindow, Draw2D draw2D, Color backgroundColor, Color textColor)
 {
     m_ProfileAnalyzerWindow = profileAnalyzerWindow;
     m_2D = draw2D;
     m_BackgroundColor = backgroundColor;
     m_TextColor       = textColor;
 }
 internal void DeleteTmpFiles()
 {
     if (ProfileAnalyzerWindow.FileInTempDir(FilePath))
     {
         File.Delete(FilePath);
     }
 }
Example #3
0
        void CreateTable(ProfileAnalyzerWindow profileAnalyzerWindow, List <string> threadNames, List <string> threadUINames, ThreadSelection threadSelection)
        {
            if (m_ThreadTreeViewState == null)
            {
                m_ThreadTreeViewState = new TreeViewState();
            }

            int  sortedColumn;
            bool sortAscending;

            if (m_ThreadMulticolumnHeaderState == null)
            {
                m_ThreadMulticolumnHeaderState = ThreadTable.CreateDefaultMultiColumnHeaderState(700);
                sortedColumn  = (int)ThreadTable.MyColumns.GroupName;
                sortAscending = true;
            }
            else
            {
                // Remember last sort key
                sortedColumn  = m_ThreadMulticolumnHeaderState.sortedColumnIndex;
                sortAscending = m_ThreadMulticolumnHeaderState.columns[sortedColumn].sortedAscending;
            }

            var multiColumnHeader = new MultiColumnHeader(m_ThreadMulticolumnHeaderState);

            multiColumnHeader.SetSorting(sortedColumn, sortAscending);
            multiColumnHeader.ResizeToFit();
            m_ThreadTable = new ThreadTable(m_ThreadTreeViewState, multiColumnHeader, threadNames, threadUINames, threadSelection);
        }
Example #4
0
 void SetData(ProfileAnalyzerWindow profileAnalyzerWindow, ThreadSelection threadSelection, List <string> threadNames, List <string> threadUINames)
 {
     m_ProfileAnalyzerWindow   = profileAnalyzerWindow;
     m_OriginalThreadSelection = threadSelection;
     m_ThreadNames             = threadNames;
     m_ThreadUINames           = threadUINames;
     CreateTable(profileAnalyzerWindow, threadNames, threadUINames, threadSelection);
 }
        static public ThreadSelectionWindow Open(float screenX, float screenY, ProfileAnalyzerWindow profileAnalyzerWindow, ThreadSelection threadSelection, List <string> threadNames, List <string> threadUINames)
        {
            ThreadSelectionWindow window = GetWindow <ThreadSelectionWindow>("Threads");

            window.position = new Rect(screenX, screenY, 400, 500);
            window.SetData(profileAnalyzerWindow, threadSelection, threadNames, threadUINames);
            window.Show();

            return(window);
        }
        public TopMarkers(ProfileAnalyzerWindow profileAnalyzerWindow, Draw2D draw2D, Color backgroundColor, Color textColor)
        {
            m_ProfileAnalyzerWindow = profileAnalyzerWindow;
            m_2D = draw2D;
            m_BackgroundColor = backgroundColor;
            m_TextColor       = textColor;

            m_CurrentSettings = new Settings(new RangeSettings(null, 0, null, null, TimingOptions.TimingOption.Time, 0), 0, 0, false, false);
            m_TimeRangeDirty  = true;
        }
        void CreateTable(ProfileAnalyzerWindow profileAnalyzerWindow, List <string> threadNames, List <string> threadUINames, ThreadSelection threadSelection)
        {
            if (m_ThreadTreeViewState == null)
            {
                m_ThreadTreeViewState = new TreeViewState();
            }

            m_ThreadMulticolumnHeaderState = ThreadTable.CreateDefaultMultiColumnHeaderState(700);

            var multiColumnHeader = new MultiColumnHeader(m_ThreadMulticolumnHeaderState);

            multiColumnHeader.SetSorting((int)ThreadTable.MyColumns.ThreadName, true);
            multiColumnHeader.ResizeToFit();
            m_ThreadTable = new ThreadTable(m_ThreadTreeViewState, multiColumnHeader, threadNames, threadUINames, threadSelection);
        }
Example #8
0
        public ProfileTable(TreeViewState state, MultiColumnHeader multicolumnHeader, ProfileAnalysis model, ProfileAnalyzerWindow profileAnalyzerWindow) : base(state, multicolumnHeader)
        {
            m_Model = model;
            m_ProfileAnalyzerWindow = profileAnalyzerWindow;

            m_MaxColumns = Enum.GetValues(typeof(MyColumns)).Length;
            Assert.AreEqual(m_SortOptions.Length, m_MaxColumns, "Ensure number of sort options are in sync with number of MyColumns enum values");

            // Custom setup
            rowHeight = kRowHeights;
            showAlternatingRowBackgrounds = true;
            showBorder           = true;
            customFoldoutYOffset = (kRowHeights - EditorGUIUtility.singleLineHeight) * 0.5f; // center foldout in the row since we also center content. See RowGUI
            // extraSpaceBeforeIconAndLabel = 0;
            multicolumnHeader.sortingChanged        += OnSortingChanged;
            multicolumnHeader.visibleColumnsChanged += OnVisibleColumnsChanged;

            Reload();
        }
Example #9
0
        static public ProfileAnalyzerExportWindow Open(float screenX, float screenY, ProfileDataView profileSingleView, ProfileDataView profileLeftView, ProfileDataView profileRightView, ProfileAnalyzerWindow profileAnalyzerWindow)
        {
            ProfileAnalyzerExportWindow window = GetWindow <ProfileAnalyzerExportWindow>("Export");

            window.minSize  = new Vector2(200, 140);
            window.position = new Rect(screenX, screenY, 200, 140);
            window.m_ProfileAnalyzerWindow = profileAnalyzerWindow;
            window.SetData(profileSingleView, profileLeftView, profileRightView);
            window.Show();

            return(window);
        }