// // // // // $Revision$ // using System; using System.Drawing; namespace ICSharpCode.TextEditor { /// /// This enum describes all implemented request types /// public enum TextAreaUpdateType { WholeTextArea, SingleLine, SinglePosition, PositionToLineEnd, PositionToEnd, LinesBetween } /// /// This class is used to request an update of the textarea /// public class TextAreaUpdate { TextLocation position; TextAreaUpdateType type; public TextAreaUpdateType TextAreaUpdateType { get { return type; } } public TextLocation Position { get { return position; } } /// /// Creates a new instance of /// public TextAreaUpdate(TextAreaUpdateType type) { this.type = type; } /// /// Creates a new instance of /// public TextAreaUpdate(TextAreaUpdateType type, TextLocation position) { this.type = type; this.position = position; } /// /// Creates a new instance of /// public TextAreaUpdate(TextAreaUpdateType type, int startLine, int endLine) { this.type = type; this.position = new TextLocation(startLine, endLine); } /// /// Creates a new instance of /// public TextAreaUpdate(TextAreaUpdateType type, int singleLine) { this.type = type; this.position = new TextLocation(0, singleLine); } public override string ToString() { return String.Format("[TextAreaUpdate: Type={0}, Position={1}]", type, position); } } }