Exemplo n.º 1
0
        void DrawLine(Rect lineRect, int row, int controlID)
        {
            var line = Line(row);

            DrawAdornments(line, lineRect);

            List <int> tabSizes;
            string     baseTextFormatted = Whitespace.FormatBaseText(line.Text, out tabSizes);
            string     renderText        = Whitespace.FormatRichText(line.RichText, tabSizes);

            LineStyle.Draw(lineRect, MissingEngineAPI.GUIContent_Temp(renderText), controlID);

            if (ShowCursor && row == CaretRow)
            {
                int graphicalCaretPos = Whitespace.ConvertToGraphicalCaretColumn(CaretColumn, line, tabSizes);
                LineStyle.DrawCursor(lineRect, MissingEngineAPI.GUIContent_Temp(baseTextFormatted), controlID, graphicalCaretPos);
            }
        }