Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1516 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
4 changed files with 154 additions and 31 deletions
@ -0,0 +1,74 @@
@@ -0,0 +1,74 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Christian Hornung" email="c-hornung@gmx.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
|
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.TextEditor; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor |
||||
{ |
||||
/// <summary>
|
||||
/// Describes an object being able to provide tooltip information for
|
||||
/// the text editor.
|
||||
/// </summary>
|
||||
public interface ITextAreaToolTipProvider |
||||
{ |
||||
/// <summary>
|
||||
/// Gets tooltip information for the specified position in the text area,
|
||||
/// if available.
|
||||
/// </summary>
|
||||
/// <returns><c>null</c>, if no tooltip information is available at this position, otherwise a ToolTipInfo object containing the tooltip information to be displayed.</returns>
|
||||
ToolTipInfo GetToolTipInfo(TextArea textArea, ToolTipRequestEventArgs e); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Contains information about a tooltip to be shown on the text area.
|
||||
/// </summary>
|
||||
public class ToolTipInfo |
||||
{ |
||||
object toolTipObject; |
||||
|
||||
/// <summary>
|
||||
/// Gets the tool tip text to be displayed.
|
||||
/// May be <c>null</c>.
|
||||
/// </summary>
|
||||
public string ToolTipText { |
||||
get { |
||||
return this.toolTipObject as string; |
||||
} |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Gets the DebuggerGridControl to be shown as tooltip.
|
||||
/// May be <c>null</c>.
|
||||
/// </summary>
|
||||
public DebuggerGridControl ToolTipControl { |
||||
get { |
||||
return this.toolTipObject as DebuggerGridControl; |
||||
} |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ToolTipInfo"/> class.
|
||||
/// </summary>
|
||||
/// <param name="toolTipText">The tooltip text to be displayed.</param>
|
||||
public ToolTipInfo(string toolTipText) |
||||
{ |
||||
this.toolTipObject = toolTipText; |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ToolTipInfo"/> class.
|
||||
/// </summary>
|
||||
/// <param name="toolTipControl">The DebuggerGridControl to be shown as tooltip.</param>
|
||||
public ToolTipInfo(DebuggerGridControl toolTipControl) |
||||
{ |
||||
this.toolTipObject = toolTipControl; |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue