public TextView(ITextViewDocument document, ITextViewAppearance appearance, ITextViewAdornments adornments) { _appearance = appearance; _adornments = adornments; _document = document; _selection = new Selection(document.Caret); _document.Caret.Moved += EnsureCursorIsVisible; }
public LineNumberMargin(ITextView textView) { _appearance = textView.Appearance; _buffer = textView.Document.Buffer; _buffer.Changed += (sender, args) => CalculateWidth(); CalculateWidth(); }
public LineNumberMargin(ITextView textView, BoolSetting visibilitySetting) { _appearance = textView.Appearance; _appearance.Changed += (sender, args) => CalculateWidth(); _buffer = textView.Document.Buffer; _buffer.Changed += (sender, args) => CalculateWidth(); CalculateWidth(); _visibilitySetting = visibilitySetting; }
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 TextView( ITextViewDocument document, ITextViewAppearance appearance, ITextViewAdornments adornments, IMouseCursors mouseCursors, IMouseCursorRegions mouseCursorRegions, ITextViewWhitespace whitespace, ISettings settings, IFontManager fontManager) { _appearance = appearance; _adornments = adornments; _document = document; _mouseCursors = mouseCursors; _mouseCursorsRegions = mouseCursorRegions; _whitespace = whitespace; _settings = settings; _fontManager = fontManager; _selection = new Selection(document.Caret); _document.Caret.Moved += EnsureCursorIsVisible; }