public Caret CreateCaret(TextView textView) { if (textView.Caret == null) { // The caret will add itself to the view. return(new DefaultCaretPrimitive(textView, EditorOptionsFactoryService.GetOptions(textView.AdvancedTextView))); } return(textView.Caret); }
public Selection CreateSelection(TextView textView) { if (textView.Selection == null) { // The selection will add itself to the view. return(new DefaultSelectionPrimitive(textView, EditorOptionsFactoryService.GetOptions(textView.AdvancedTextView))); } return(textView.Selection); }
public TextPoint CreateTextPoint(TextBuffer textBuffer, int position) { return(new DefaultTextPointPrimitive( textBuffer, position, TextSearchService, EditorOptionsFactoryService.GetOptions(textBuffer.AdvancedTextBuffer), TextStructureNavigatorSelectorService.GetTextStructureNavigator(textBuffer.AdvancedTextBuffer), this)); }
public DisplayTextPoint CreateDisplayTextPoint(TextView textView, int position) { return(new DefaultDisplayTextPointPrimitive(textView, position, EditorOptionsFactoryService.GetOptions(textView.AdvancedTextView))); }
/// <summary> /// Piggybacks an EolAdornment manager on top of a text view that has been /// created in order to provide end of line markers for that views. /// </summary> /// <param name="textView"> /// The <see cref="IWpfTextView" /> to adorn with end of /// line markers. /// </param> public void TextViewCreated(IWpfTextView textView) { var options = EditorOptionsFactoryService.GetOptions(textView); EolAdornment.Attach(textView, options, FormatMapService, EolOptions); }