diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-22 21:57:39 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-09-01 13:24:17 +0200 |
| commit | bede92e519bb638b95e3e306575788052f0bedfe (patch) | |
| tree | 96eeaa2c008b8ba9d0e1bf71d0746d250e76d677 /src/LayoutingQueueItem.cs | |
| parent | a4555b5e71ff4fc8ed89396d02218694230d1292 (diff) | |
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
Diffstat (limited to 'src/LayoutingQueueItem.cs')
| -rw-r--r-- | src/LayoutingQueueItem.cs | 43 |
1 files changed, 27 insertions, 16 deletions
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<LayoutingQueueItem> processedLQIs = new List<LayoutingQueueItem>(); - 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<LayoutingQueueItem> triggeredLQIs = new List<LayoutingQueueItem>(); + 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<LayoutingQueueItem>(); - 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<LayoutingQueueItem>{ + public List<LayoutingQueueItem> GetRootLQIs(){ + return this.Where (lqi => lqi.wasTriggeredBy == null).ToList (); + } + } + #endif } |