Example #1
0
        public override void OnGUI()
        {
            if (pendingSourceLocation != null)
            {
                textView = viewFactory.ViewForFile(pendingSourceLocation);
                int topOffset    = 25;
                int bottomOffset = 10;
                textView.ViewPort = new Rect(0, topOffset, ViewPort.width, ViewPort.height - topOffset - bottomOffset);
                textView.Document.Caret.SetPosition(pendingSourceLine, 0);
                currentDocument = pendingSourceLocation;
                title           = System.IO.Path.GetFileName(currentDocument);
                textView.EnsureCursorIsVisible();

                pendingSourceLocation = null;
            }

            if (textView == null)
            {
                return;
            }

            textView.OnGUI();
        }