// 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 ICSharpCode.AvalonEdit;
using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.CSharp;
namespace ICSharpCode.ILSpy.Debugger.Tooltips
{
public class ToolTipRequestEventArgs : EventArgs
{
///
/// Gets whether the tool tip request was handled.
///
public bool Handled { get; set; }
///
/// Gets the editor causing the request.
///
public TextEditor 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 TextLocation 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(TextEditor editor)
{
if (editor == null)
throw new ArgumentNullException("editor");
this.Editor = editor;
this.InDocument = true;
}
}
}