diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-05 01:34:39 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-05 01:34:39 +0100 |
| commit | 8220ddcbd825364c3e817696a393319e24f0fa85 (patch) | |
| tree | fe28a94ec5675dcd3d328e5989255b46dfb9d906 /src/LayoutingQueueItem.cs | |
| parent | e72a5709781c52d0db3468c43313bdba0a5c530d (diff) | |
removed interface ILayoutable and derive Interfrace class from GraphicObject which could be split into a simpler layoutable obj and another oneRemovedILayoutable
Diffstat (limited to 'src/LayoutingQueueItem.cs')
| -rw-r--r-- | src/LayoutingQueueItem.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/LayoutingQueueItem.cs b/src/LayoutingQueueItem.cs index 95bc6bb7..3c5ceb3e 100644 --- a/src/LayoutingQueueItem.cs +++ b/src/LayoutingQueueItem.cs @@ -45,7 +45,7 @@ namespace Crow public struct LayoutingQueueItem { /// <summary> Instance of widget to be layouted</summary> - public ILayoutable Layoutable; + public GraphicObject Layoutable; /// <summary> Bitfield containing the element of the layout to performs (x|y|width|height)</summary> public LayoutingType LayoutType; /// <summary> Unsuccessfull UpdateLayout and requeueing count </summary> @@ -72,7 +72,7 @@ namespace Crow #endif #region CTOR - public LayoutingQueueItem (LayoutingType _layoutType, ILayoutable _graphicObject) + public LayoutingQueueItem (LayoutingType _layoutType, GraphicObject _graphicObject) { LayoutType = _layoutType; Layoutable = _graphicObject; @@ -100,17 +100,18 @@ namespace Crow } #if DEBUG_LAYOUTING LQITime.Start(); + Debug.WriteLine ("LAYOUTING: " + this.ToString ()); #endif LayoutingTries++; if (!Layoutable.UpdateLayout (LayoutType)) { if (LayoutingTries < Interface.MaxLayoutingTries) { Layoutable.RegisteredLayoutings |= LayoutType; - (Layoutable as GraphicObject).CurrentInterface.LayoutingQueue.Enqueue (this); + Layoutable.CurrentInterface.LayoutingQueue.Enqueue (this); } else if (DiscardCount < Interface.MaxDiscardCount) { LayoutingTries = 0; DiscardCount++; Layoutable.RegisteredLayoutings |= LayoutType; - (Layoutable as GraphicObject).CurrentInterface.DiscardQueue.Enqueue (this); + Layoutable.CurrentInterface.DiscardQueue.Enqueue (this); } #if DEBUG_LAYOUTING else |