// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under MIT license (for details please see \doc\license.txt) using System; using System.Collections.Generic; using System.Threading.Tasks; namespace ICSharpCode.Editor { /* /// /// Interface for text editors. /// public interface ITextEditor : IServiceProvider { /// /// Gets the document that is being edited. /// IDocument Document { get; } /// /// Gets an object that represents the caret inside this text editor. /// ITextEditorCaret Caret { get; } /// /// Sets the caret to the specified line/column and brings the caret into view. /// void JumpTo(int line, int column); /// /// Gets the start offset of the selection. /// int SelectionStart { get; } /// /// Gets the length of the selection. /// int SelectionLength { get; } /// /// Gets/Sets the selected text. /// string SelectedText { get; set; } /// /// Sets the selection. /// /// Start offset of the selection /// Length of the selection void Select(int selectionStart, int selectionLength); /// /// Shows the specified linked elements, and allows the user to edit them. /// /// /// Returns true when the user has finished editing the elements and pressed Return; /// or false when editing is aborted for any reason. /// /// /// The user can also edit other parts of the document (or other documents) while in link mode. /// In case of success (true return value), this method will update the offsets of the linked elements /// to reflect the changes done by the user. /// If the text editor does not support link mode, it will immediately return false. /// // Task ShowLinkedElements(IEnumerable linkedElements); } */ /// /// Represents the caret in a text editor. /// public interface ITextEditorCaret { /// /// Gets/Sets the caret offset; /// int Offset { get; set; } /// /// Gets/Sets the caret line number. /// Line numbers are counted starting from 1. /// int Line { get; set; } /// /// Gets/Sets the caret column number. /// Column numbers are counted starting from 1. /// int Column { get; set; } /// /// Gets/sets the caret location. /// TextLocation Location { get; set; } /// /// Is raised whenever the location of the caret has changed. /// event EventHandler LocationChanged; } }