aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2019-03-11 08:56:10 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2019-03-11 08:56:10 +0200
commit8d3a394993673df4b9fab8bee62f4ac8b25e1a5a (patch)
tree2eaa506392c229606e2989f7523a769555598055 /Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion
parentabc70316f80a9cb05b320828051bb7dcbfeaad1b (diff)
downloadTango-8d3a394993673df4b9fab8bee62f4ac8b25e1a5a.tar.gz
Tango-8d3a394993673df4b9fab8bee62f4ac8b25e1a5a.zip
Working on scripting engine.
Diffstat (limited to 'Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion')
-rw-r--r--Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/CompletionWindowBase.cs14
-rw-r--r--Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/ICompletionData.cs31
2 files changed, 25 insertions, 20 deletions
diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/CompletionWindowBase.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/CompletionWindowBase.cs
index e33ede203..7766d323a 100644
--- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/CompletionWindowBase.cs
+++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/CompletionWindowBase.cs
@@ -290,7 +290,7 @@ namespace Tango.Scripting.Editors.CodeCompletion
//sourceIsInitialized = true;
}
- private void SetPosition()
+ public void SetPosition()
{
if (document != null && this.StartOffset != this.TextArea.Caret.Offset)
{
@@ -301,6 +301,16 @@ namespace Tango.Scripting.Editors.CodeCompletion
SetPosition(this.TextArea.Caret.Position);
}
}
+
+ public void UpdatePositionFix()
+ {
+ SetPosition(this.TextArea.Caret.Position);
+ }
+
+ //public void UpdatePosition()
+ //{
+ // SetPosition(this.TextArea.Caret.Position);
+ //}
/// <inheritdoc/>
protected override void OnClosed(EventArgs e)
@@ -337,7 +347,7 @@ namespace Tango.Scripting.Editors.CodeCompletion
/// Updates the position of the CompletionWindow based on the parent TextView position and the screen working area.
/// It ensures that the CompletionWindow is completely visible on the screen.
/// </summary>
- protected void UpdatePosition()
+ public void UpdatePosition()
{
TextView textView = this.TextArea.TextView;
// PointToScreen returns device dependent units (physical pixels)
diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/ICompletionData.cs b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/ICompletionData.cs
index b0e9eeccb..9f16876b3 100644
--- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/ICompletionData.cs
+++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.Editors/CodeCompletion/ICompletionData.cs
@@ -3,6 +3,7 @@
using System;
using System.Windows.Media;
+using System.Windows.Media.Imaging;
using Tango.Scripting.Editors.Document;
using Tango.Scripting.Editors.Editing;
@@ -13,32 +14,26 @@ namespace Tango.Scripting.Editors.CodeCompletion
/// </summary>
public interface ICompletionData
{
- /// <summary>
- /// Gets the image.
- /// </summary>
- ImageSource Image { get; }
-
- /// <summary>
- /// Gets the text. This property is used to filter the list of visible elements.
- /// </summary>
- string Text { get; }
-
- /// <summary>
- /// The displayed content. This can be the same as 'Text', or a WPF UIElement if
- /// you want to display rich content.
- /// </summary>
- object Content { get; }
+ /// <summary>
+ /// Gets the image.
+ /// </summary>
+ BitmapSource Image { get; }
+
+ /// <summary>
+ /// Gets the text. This property is used to filter the list of visible elements.
+ /// </summary>
+ string Text { get; }
/// <summary>
/// Gets the description.
/// </summary>
- object Description { get; }
+ object Description { get; set; }
/// <summary>
/// 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.
/// </summary>
- double Priority { get; }
+ double Priority { get; set; }
/// <summary>
/// Perform the completion.
@@ -49,6 +44,6 @@ namespace Tango.Scripting.Editors.CodeCompletion
/// <param name="insertionRequestEventArgs">The EventArgs used for the insertion request.
/// These can be TextCompositionEventArgs, KeyEventArgs, MouseEventArgs, depending on how
/// the insertion was triggered.</param>
- void Complete(TextArea textArea, ISegment completionSegment, EventArgs insertionRequestEventArgs);
+ void Complete(ScriptEditor editor);
}
}