// // // // // $Revision$ // using System; namespace ICSharpCode.TextEditor.Gui.InsightWindow { public interface IInsightDataProvider { /// /// Tells the insight provider to prepare its data. /// /// The name of the edited file /// The text area in which the file is being edited void SetupDataProvider(string fileName, TextArea textArea); /// /// Notifies the insight provider that the caret offset has changed. /// /// Return true to close the insight window (e.g. when the /// caret was moved outside the region where insight is displayed for). /// Return false to keep the window open. bool CaretOffsetChanged(); /// /// Gets the text to display in the insight window. /// /// The number of the active insight entry. /// Multiple insight entries might be multiple overloads of the same method. /// The text to display, e.g. a multi-line string where /// the first line is the method definition, followed by a description. string GetInsightData(int number); /// /// Gets the number of available insight entries, e.g. the number of available /// overloads to call. /// int InsightDataCount { get; } /// /// Gets the index of the entry to initially select. /// int DefaultIndex { get; } } }