From 2b6d20f81ec25698e39f2b1efac2574340aafcdd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Fri, 9 Apr 2021 04:51:37 +0200 Subject: TG recursive lock check, IObsList clear evt, sample Editor xml syntax, command IList, CommandBase class --- Samples/DebugLogAnalyzer/src/Editor.cs | 44 ---------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 Samples/DebugLogAnalyzer/src/Editor.cs (limited to 'Samples/DebugLogAnalyzer/src/Editor.cs') diff --git a/Samples/DebugLogAnalyzer/src/Editor.cs b/Samples/DebugLogAnalyzer/src/Editor.cs deleted file mode 100644 index 315a5a9d..00000000 --- a/Samples/DebugLogAnalyzer/src/Editor.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2013-2019 Bruyère Jean-Philippe -// -// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) - -using System; -using Glfw; -using Crow.Text; - -namespace Crow -{ - public class Editor : TextBox { - public override void onKeyDown(object sender, KeyEventArgs e) - { - TextSpan selection = Selection; - if (e.Key == Key.Tab && !selection.IsEmpty) { - int lineStart = lines.GetLocation (selection.Start).Line; - int lineEnd = lines.GetLocation (selection.End).Line; - - if (IFace.Shift) { - for (int l = lineStart; l <= lineEnd; l++) { - if (Text[lines[l].Start] == '\t') - update (new TextChange (lines[l].Start, 1, "")); - else if (Char.IsWhiteSpace (Text[lines[l].Start])) { - int i = 1; - while (i < lines[l].Length && i < Interface.TAB_SIZE && Char.IsWhiteSpace (Text[i])) - i++; - update (new TextChange (lines[l].Start, i, "")); - } - } - - }else{ - for (int l = lineStart; l <= lineEnd; l++) - update (new TextChange (lines[l].Start, 0, "\t")); - } - - selectionStart = new CharLocation (lineStart, 0); - CurrentLoc = new CharLocation (lineEnd, lines[lineEnd].Length); - - return; - } - base.onKeyDown(sender, e); - } - } -} \ No newline at end of file -- cgit v1.3.1-4-g156e