// // // // // $Revision$ // using System; using ICSharpCode.NRefactory; namespace ICSharpCode.SharpDevelop.Editor { public class ToolTipRequestEventArgs : EventArgs { /// /// Gets whether the tool tip request was handled. /// public bool Handled { get; set; } /// /// Gets the editor causing the request. /// public ITextEditor Editor { get; private set; } /// /// Gets whether the mouse was inside the document bounds. /// public bool InDocument { get; set; } /// /// The mouse position, in document coordinates. /// public Location LogicalPosition { get; set; } /// /// Gets/Sets the content to show as a tooltip. /// public object ContentToShow { get; set; } /// /// Sets the tooltip to be shown. /// public void SetToolTip(object content) { if (content == null) throw new ArgumentNullException("content"); this.Handled = true; this.ContentToShow = content; } public ToolTipRequestEventArgs(ITextEditor editor) { if (editor == null) throw new ArgumentNullException("editor"); this.Editor = editor; this.InDocument = true; } } }