diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-05 20:41:26 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-05 20:41:26 +0100 |
| commit | 63e3afd99db6ec60e28c12c49c8d0ae9b5d7bd7b (patch) | |
| tree | 8fe8d583cc08b795304d8e918f04611747c8885e /src/GraphicObjects/GenericStack.cs | |
| parent | 3d9e22120b40a0a4eb470bc6ceb3de8879f74c8d (diff) | |
remove double buffered LayoutingQueue,use dirtyBmp for gl rendering
Diffstat (limited to 'src/GraphicObjects/GenericStack.cs')
| -rw-r--r-- | src/GraphicObjects/GenericStack.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index 897343b3..6dec8453 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -62,7 +62,7 @@ namespace Crow foreach (GraphicObject c in Children) { if (!c.Visible) continue; - if (c.QueuedLayoutings.HasFlag (LayoutingType.Width)) + if (c.RegisteredLayoutings.HasFlag (LayoutingType.Width)) return -1; tmp += c.Slot.Width + Spacing; } @@ -77,7 +77,7 @@ namespace Crow foreach (GraphicObject c in Children) { if (!c.Visible) continue; - if (c.QueuedLayoutings.HasFlag (LayoutingType.Height)) + if (c.RegisteredLayoutings.HasFlag (LayoutingType.Height)) return -1; tmp += c.Slot.Height + Spacing; } @@ -99,7 +99,7 @@ namespace Crow continue; c.Slot.X = d; d += c.Slot.Width + Spacing; - c.EnqueueForLayouting (LayoutingType.Y); + c.RegisterForLayouting (LayoutingType.Y); } } else { foreach (GraphicObject c in Children) { @@ -107,7 +107,7 @@ namespace Crow continue; c.Slot.Y = d; d += c.Slot.Height + Spacing; - c.EnqueueForLayouting (LayoutingType.X); + c.RegisterForLayouting (LayoutingType.X); } } bmp = null; @@ -115,7 +115,7 @@ namespace Crow public override bool UpdateLayout (LayoutingType layoutType) { - QueuedLayoutings &= (~layoutType); + RegisteredLayoutings &= (~layoutType); if (layoutType == LayoutingType.ArrangeChildren) { //allow 1 child to have size to 0 if stack has fixed or streched size policy, @@ -130,7 +130,7 @@ namespace Crow if (!Children [i].Visible) continue; //requeue Positionning if child is not layouted - if (Children [i].QueuedLayoutings.HasFlag (LayoutingType.Width)) + if (Children [i].RegisteredLayoutings.HasFlag (LayoutingType.Width)) return false; cptChildren++; if (Children [i].Width == 0) { @@ -169,7 +169,7 @@ namespace Crow for (int i = 0; i < Children.Count; i++) { if (!Children [i].Visible) continue; - if (Children [i].QueuedLayoutings.HasFlag (LayoutingType.Height)) + if (Children [i].RegisteredLayoutings.HasFlag (LayoutingType.Height)) return false; cptChildren++; if (Children [i].Height == 0) { @@ -205,7 +205,7 @@ namespace Crow ComputeChildrenPositions (); //if no layouting remains in queue for item, registre for redraw - if (QueuedLayoutings == LayoutingType.None && bmp==null) + if (RegisteredLayoutings == LayoutingType.None && bmp==null) this.AddToRedrawList (); return true; @@ -223,15 +223,15 @@ namespace Crow case LayoutingType.Width: if (Orientation == Orientation.Horizontal) { if (this.Bounds.Width < 0) - this.EnqueueForLayouting (LayoutingType.Width); - this.EnqueueForLayouting (LayoutingType.ArrangeChildren); + this.RegisterForLayouting (LayoutingType.Width); + this.RegisterForLayouting (LayoutingType.ArrangeChildren); } break; case LayoutingType.Height: if (Orientation == Orientation.Vertical) { if (this.Bounds.Height < 0) - this.EnqueueForLayouting (LayoutingType.Height); - this.EnqueueForLayouting (LayoutingType.ArrangeChildren); + this.RegisterForLayouting (LayoutingType.Height); + this.RegisterForLayouting (LayoutingType.ArrangeChildren); } break; } |