From bede92e519bb638b95e3e306575788052f0bedfe Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Mon, 22 Aug 2016 21:57:39 +0200 Subject: Move Debug LQIs lists to CurrentInterface LQIs visualizer ItemTemplate expandable may use 'self' keywork modifié : CrowIDE/CrowIDE.csproj modifié : CrowIDE/src/CrowIDE.cs nouveau fichier : CrowIDE/src/Extensions.cs modifié : CrowIDE/src/ImlVisualEditor.cs nouveau fichier : CrowIDE/ui/LQIsExplorer.crow nouveau fichier : CrowIDE/ui/bindingExpITemp.crow nouveau fichier : CrowIDE/ui/bindingExplorer.crow modifié : Templates/DirectoryView.template modifié : Templates/Window.template modifié : src/GraphicObjects/GraphicObject.cs modifié : src/GraphicObjects/Wrapper.cs modifié : src/Interface.cs modifié : src/ItemTemplate.cs modifié : src/LayoutingQueueItem.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/LayoutingQueueItem.cs | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) (limited to 'src/LayoutingQueueItem.cs') diff --git a/src/LayoutingQueueItem.cs b/src/LayoutingQueueItem.cs index 6de5be7b..5ec454c5 100644 --- a/src/LayoutingQueueItem.cs +++ b/src/LayoutingQueueItem.cs @@ -51,17 +51,25 @@ namespace Crow public int LayoutingTries, DiscardCount; #if DEBUG_LAYOUTING - public static List processedLQIs = new List(); - public static LayoutingQueueItem[] MultipleRunsLQIs { - get { return processedLQIs.Where(l=>l.LayoutingTries>2 || l.DiscardCount > 0).ToArray(); } - } - public static LayoutingQueueItem currentLQI = null; public Stopwatch LQITime = new Stopwatch(); - public List triggeredLQIs = new List(); + public LQIList triggeredLQIs = new LQIList(); public LayoutingQueueItem wasTriggeredBy = null; public GraphicObject graphicObject { get { return Layoutable as GraphicObject; } } + public string Name { + get { return graphicObject.Name; } + } + public string FullName { + get { return graphicObject.ToString(); } + } + public Measure Width { + get { return graphicObject.Width; } + } + public Measure Height { + get { return graphicObject.Height; } + } + public bool HasTriggeredLQIs { get { return triggeredLQIs.Count > 0; }} public Rectangle Slot, NewSlot; #endif @@ -72,12 +80,11 @@ namespace Crow Layoutable = _graphicObject; Layoutable.RegisteredLayoutings |= LayoutType; #if DEBUG_LAYOUTING - if (graphicObject.CurrentDrawLQIs == null) - graphicObject.CurrentDrawLQIs = new List(); - graphicObject.CurrentDrawLQIs.Add(this); - if (currentLQI != null){ - wasTriggeredBy = currentLQI; - currentLQI.triggeredLQIs.Add(this); + GraphicObject g = graphicObject; + g.CurrentInterface.curLQIs.Add(this); + if (g.CurrentInterface.currentLQI != null){ + wasTriggeredBy = g.CurrentInterface.currentLQI; + g.CurrentInterface.currentLQI.triggeredLQIs.Add(this); } #endif } @@ -93,13 +100,11 @@ namespace Crow return; } #if DEBUG_LAYOUTING - currentLQI = this; - processedLQIs.Add(this); LQITime.Start(); #endif + LayoutingTries++; if (!Layoutable.UpdateLayout (LayoutType)) { if (LayoutingTries < Interface.MaxLayoutingTries) { - LayoutingTries++; Layoutable.RegisteredLayoutings |= LayoutType; (Layoutable as GraphicObject).CurrentInterface.LayoutingQueue.Enqueue (this); } else if (DiscardCount < Interface.MaxDiscardCount) { @@ -114,7 +119,6 @@ namespace Crow #endif } #if DEBUG_LAYOUTING - currentLQI = null; LQITime.Stop(); #endif } @@ -138,5 +142,12 @@ namespace Crow #endif } } + #if DEBUG_LAYOUTING + public class LQIList : List{ + public List GetRootLQIs(){ + return this.Where (lqi => lqi.wasTriggeredBy == null).ToList (); + } + } + #endif } -- cgit v1.3.1-4-g156e From 906de17554fd6f9e83d08ff2b1c5fa7113b8ed8e Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Tue, 23 Aug 2016 11:21:35 +0200 Subject: adapt when DEBUG_LAYOUTING not set --- src/Interface.cs | 2 ++ src/LayoutingQueueItem.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/LayoutingQueueItem.cs') diff --git a/src/Interface.cs b/src/Interface.cs index 0c1cd766..1659c0ea 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -329,6 +329,8 @@ namespace Crow // get { return curUpdateLQIs.Where(l=>l.LayoutingTries>2 || l.DiscardCount > 0).ToArray(); } // } public LayoutingQueueItem currentLQI = null; + #else + public List LQIs = null;//still create the var for CrowIDE #endif public void Update(){ if (mouseRepeatCount > 0) { diff --git a/src/LayoutingQueueItem.cs b/src/LayoutingQueueItem.cs index 5ec454c5..3b19efc9 100644 --- a/src/LayoutingQueueItem.cs +++ b/src/LayoutingQueueItem.cs @@ -142,12 +142,12 @@ namespace Crow #endif } } - #if DEBUG_LAYOUTING public class LQIList : List{ + #if DEBUG_LAYOUTING public List GetRootLQIs(){ return this.Where (lqi => lqi.wasTriggeredBy == null).ToList (); } + #endif } - #endif } -- cgit v1.3.1-4-g156e From 9c0f77e860a1852ee7de381a82118e6d8c7fb819 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Sat, 22 Oct 2016 14:04:54 +0200 Subject: File dialog derived from Window, not functional modifié : Default.style modifié : Templates/FileDialog.template nouveau fichier : Tests/Interfaces/Unsorted/testFileDialog.crow supprimé : Tests/Interfaces/Unsorted/testFileDialog.goml modifié : Tests/Tests.csproj modifié : src/GraphicObjects/FileDialog.cs divers modifié : src/GraphicObjects/HueSelector.cs modifié : src/LayoutingQueueItem.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Default.style | 6 + Templates/FileDialog.template | 91 ++++++++++---- Tests/Interfaces/Unsorted/testFileDialog.crow | 3 + Tests/Interfaces/Unsorted/testFileDialog.goml | 3 - Tests/Tests.csproj | 6 +- src/GraphicObjects/FileDialog.cs | 175 ++++++++++++-------------- src/GraphicObjects/HueSelector.cs | 6 +- src/LayoutingQueueItem.cs | 2 + 8 files changed, 170 insertions(+), 122 deletions(-) create mode 100644 Tests/Interfaces/Unsorted/testFileDialog.crow delete mode 100644 Tests/Interfaces/Unsorted/testFileDialog.goml (limited to 'src/LayoutingQueueItem.cs') diff --git a/Default.style b/Default.style index 9376a37f..553be982 100644 --- a/Default.style +++ b/Default.style @@ -63,6 +63,12 @@ Window { Width = 150; Height = 150; } +FileDialog { + Focusable = true; + MinimumSize=50,50; + Width = 500; + Height = 300; +} Border { Foreground = Gray; } diff --git a/Templates/FileDialog.template b/Templates/FileDialog.template index c8a10c8d..905fee44 100644 --- a/Templates/FileDialog.template +++ b/Templates/FileDialog.template @@ -1,24 +1,73 @@ - - - - - - - - - - -