// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.Windows.Media; using ICSharpCode.AvalonEdit.Document; using ICSharpCode.AvalonEdit.Editing; namespace ICSharpCode.AvalonEdit.CodeCompletion { /// /// Describes an entry in the . /// public interface ICompletionData { /// /// Gets the image. /// ImageSource Image { get; } /// /// Gets the text. This property is used to filter the list of visible elements. /// string Text { get; } /// /// The displayed content. This can be the same as 'Text', or a WPF UIElement if /// you want to display rich content. /// object Content { get; } /// /// Gets the description. /// object Description { get; } /// /// Gets the priority. This property is used in the selection logic. You can use it to prefer selecting those items /// which the user is accessing most frequently. /// double Priority { get; } /// /// Perform the completion. /// /// The text area on which completion is performed. /// The text segment that was used by the completion window if /// the user types (segment between CompletionWindow.StartOffset and CompletionWindow.EndOffset). /// The EventArgs used for the insertion request. /// These can be TextCompositionEventArgs, KeyEventArgs, MouseEventArgs, depending on how /// the insertion was triggered. void Complete(TextArea textArea, ISegment completionSegment, EventArgs insertionRequestEventArgs); } }