Browse Source

Texteditor now uses DeclarationViewWindow instead of ToolTip (part of SD2-498)

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@624 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Markus Palme 20 years ago
parent
commit
dc487c7331
  1. 18
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs

18
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs

@ -22,6 +22,7 @@ using System.Text; @@ -22,6 +22,7 @@ using System.Text;
using System.Xml;
using ICSharpCode.TextEditor.Actions;
using ICSharpCode.TextEditor.Document;
using ICSharpCode.TextEditor.Gui.CompletionWindow;
namespace ICSharpCode.TextEditor
{
@ -296,7 +297,7 @@ namespace ICSharpCode.TextEditor @@ -296,7 +297,7 @@ namespace ICSharpCode.TextEditor
// static because the mouse can only be in one text area and we don't want to have
// tooltips of text areas from inactive tabs floating around.
static ToolTip toolTip;
static DeclarationViewWindow toolTip;
static string oldToolTip;
bool toolTipSet;
@ -308,16 +309,18 @@ namespace ICSharpCode.TextEditor @@ -308,16 +309,18 @@ namespace ICSharpCode.TextEditor
public void SetToolTip(string text)
{
if (toolTip == null) toolTip = new ToolTip();
if (toolTip == null) toolTip = new DeclarationViewWindow(this.FindForm());
toolTipSet = (text != null);
if (oldToolTip == text)
return;
if (text == null) {
toolTip.Hide(this);
toolTip.Hide();
} else {
Point p = PointToClient(Control.MousePosition);
Point p = Control.MousePosition;
p.Offset(3, 3);
toolTip.Show(text, this, p);
toolTip.Location = p;
toolTip.Description = text;
toolTip.Show();
}
oldToolTip = text;
}
@ -472,8 +475,7 @@ namespace ICSharpCode.TextEditor @@ -472,8 +475,7 @@ namespace ICSharpCode.TextEditor
}
motherTextEditorControl.BeginUpdate();
switch (ch) {
default: // INSERT char
// INSERT char
if (!HandleKeyPress(ch)) {
switch (Caret.CaretMode) {
case CaretMode.InsertMode:
@ -487,8 +489,6 @@ namespace ICSharpCode.TextEditor @@ -487,8 +489,6 @@ namespace ICSharpCode.TextEditor
break;
}
}
break;
}
int currentLineNr = Caret.Line;
int delta = Document.FormattingStrategy.FormatLine(this, currentLineNr, Document.PositionToOffset(Caret.Position), ch);

Loading…
Cancel
Save