//
//
//
//
// $Revision$
//
namespace ICSharpCode.TextEditor.Document
{
///
/// Interface to describe a sequence of characters that can be edited.
///
public interface ITextBufferStrategy
{
///
/// The current length of the sequence of characters that can be edited.
///
int Length {
get;
}
///
/// Inserts a string of characters into the sequence.
///
///
/// offset where to insert the string.
///
///
/// text to be inserted.
///
void Insert(int offset, string text);
///
/// Removes some portion of the sequence.
///
///
/// offset of the remove.
///
///
/// number of characters to remove.
///
void Remove(int offset, int length);
///
/// Replace some portion of the sequence.
///
///
/// offset.
///
///
/// number of characters to replace.
///
///
/// text to be replaced with.
///
void Replace(int offset, int length, string text);
///
/// Fetches a string of characters contained in the sequence.
///
///
/// Offset into the sequence to fetch
///
///
/// number of characters to copy.
///
string GetText(int offset, int length);
///
/// Returns a specific char of the sequence.
///
///
/// Offset of the char to get.
///
char GetCharAt(int offset);
///
/// This method sets the stored content.
///
///
/// The string that represents the character sequence.
///
void SetContent(string text);
}
}