for WinForms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision$</version>
// </file>
namespace ICSharpCode.TextEditor.Document
{
/// <summary>
/// An interface representing a portion of the current selection.
/// </summary>
public interface ISelection
{
TextLocation StartPosition { get; set; }
TextLocation EndPosition { get; set; }
int Offset { get; }
int EndOffset { get; }
int Length { get; }
/// <value>
/// Returns true, if the selection is rectangular
/// </value>
bool IsRectangularSelection { get; }
/// <value>
/// Returns true, if the selection is empty
/// </value>
bool IsEmpty { get; }
/// <value>
/// The text which is selected by this selection.
/// </value>
string SelectedText { get; }
bool ContainsOffset(int offset);
bool ContainsPosition(TextLocation position);
}
}