private ITextView ForFile(IFile file) { var document = DocumentFactory.DocumentForFile(file); var textView = new TextView(document, AppearanceProvider.AppearanceFor(document), Adornments); textView.Margins = MarginsFor(textView); return textView; }
public ITextView CreateView(TextViewCreationOptions options) { var file = options.File ?? TransientTextFile(); var document = DocumentFor(file); var settings = SettingsProvider.GetSettings(Preferences); var fontManager = FontManagerProvider.GetFontManager(settings); var textView = new TextView(document, AppearanceFor(document, fontManager), Adornments, MouseCursors, MouseCursorRegions, WhiteSpace(settings), settings, fontManager); textView.Margins = options.Margins ?? DefaultMarginsFor(textView); return textView; }
private ITextViewMargins MarginsFor(TextView textView) { return TextViewMarginsFactory.MarginsFor(textView); }