コード例 #1
0
 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;
		}
コード例 #3
0
 private ITextViewMargins MarginsFor(TextView textView)
 {
     return TextViewMarginsFactory.MarginsFor(textView);
 }