Пример #1
0
 public TextViewDocument(ITextDocument document, ICaret caret, IClassifier classifier, IClassificationStyler classificationStyler)
 {
     _document = document;
     _classifier = classifier;
     _classificationStyler = classificationStyler;
     Buffer.Changed += OnBufferChange;
     Caret = caret;
 }
Пример #2
0
 public TextViewDocument(ITextDocument document, ICaret caret, IClassifier classifier, IClassificationStyler classificationStyler)
 {
     _document                      = document;
     _classifier                    = classifier;
     _classificationStyler          = classificationStyler;
     _classificationStyler.Changed += (Sender, Args) => RemoveCachedLinesFrom(0);
     Buffer.Changed                += OnBufferChange;
     Caret = caret;
 }
		public TextViewDocument(ITextDocument document, ICaret caret, IClassifier classifier, IClassificationStyler classificationStyler)
		{
			_document = document;
			_classifier = classifier;
			_classificationStyler = classificationStyler;
			_classificationStyler.Changed += (Sender, Args) => RemoveCachedLinesFrom(0);
			Buffer.Changed += OnBufferChange;
			Caret = caret;
		}
Пример #4
0
        public SettingsDialog(ITextView textView)
        {
            _settings             = textView.Settings;
            _mouseCursorsRegions  = textView.MouseCursorsRegions;
            _mouseCursors         = textView.MouseCursors;
            _fontManager          = textView.FontManager;
            _classificationStyler = textView.Document.ClassificationStyler;
            _appearance           = textView.Appearance;

            _colorSchemeIndex          = new IntSetting("ColorSchemeIndex", 0, _settings);
            _colorSchemeIndex.Changed += (sender, args) => SetClassificationColors();

            _fontSizes      = _fontManager.GetCurrentFontSizes();
            _fontSizesNames = _fontSizes.Select(size => new GUIContent(size.ToString())).ToArray();
            SetClassificationColors();
        }
		public SettingsDialog(ITextView textView)
		{
			_settings = textView.Settings;
			_mouseCursorsRegions = textView.MouseCursorsRegions;
			_mouseCursors = textView.MouseCursors;
			_fontManager = textView.FontManager;
			_classificationStyler = textView.Document.ClassificationStyler;
			_appearance = textView.Appearance;

			_colorSchemeIndex = new IntSetting("ColorSchemeIndex", 0, _settings);
			_colorSchemeIndex.Changed += (sender, args) => SetClassificationColors();

			_fontSizes = _fontManager.GetCurrentFontSizes();
			_fontSizesNames = _fontSizes.Select(size => new GUIContent(size.ToString())).ToArray();
			SetClassificationColors();
		}