aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/OpenTKGameWindow.cs
diff options
context:
space:
mode:
authorj-p <jp.bruyere@live.be>2015-05-02 09:22:03 +0200
committerj-p <jp.bruyere@live.be>2015-05-02 09:22:03 +0200
commit2a48f25993b48535eb84f0e83e4dd7c064ed6e49 (patch)
tree809bc55854f13cb031d26129e7db24076119bca0 /src/OpenTKGameWindow.cs
parent79224ffe3efe06a99cb5dfb183f16a5427504b2a (diff)
parent40392cc3bcaee5b67d85b0aabfd42d2881823bd6 (diff)
Merge pull request #3 from jpbruyere/LayoutingQueue
Layouting queue
Diffstat (limited to 'src/OpenTKGameWindow.cs')
-rwxr-xr-xsrc/OpenTKGameWindow.cs104
1 files changed, 24 insertions, 80 deletions
diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs
index 644c65c8..86d8d312 100755
--- a/src/OpenTKGameWindow.cs
+++ b/src/OpenTKGameWindow.cs
@@ -78,6 +78,8 @@ namespace go
{
g.Parent = this;
GraphicObjects.Add (g);
+
+ g.RegisterForLayouting ((int)LayoutingType.Sizing);
}
public void DeleteWidget(GraphicObject g)
{
@@ -224,14 +226,18 @@ namespace go
GraphicObject[] invGOList = new GraphicObject[GraphicObjects.Count];
GraphicObjects.CopyTo (invGOList,0);
invGOList = invGOList.Reverse ().ToArray ();
-
- foreach (GraphicObject p in invGOList) {
- if (p.Visible) {
- layoutTime.Start ();
- while(!p.LayoutIsValid)
- p.UpdateLayout ();
- layoutTime.Stop ();
- }
+//
+// foreach (GraphicObject p in invGOList) {
+// if (p.Visible) {
+// layoutTime.Start ();
+// while(!p.LayoutIsValid)
+// p.UpdateLayout ();
+// layoutTime.Stop ();
+// }
+// }
+ while (Interface.LayoutingQueue.Count > 0) {
+ LayoutingQueueItem lqi = Interface.LayoutingQueue.Dequeue ();
+ lqi.ProcessLayouting ();
}
//Debug.WriteLine ("otd:" + gobjsToRedraw.Count.ToString () + "-");
@@ -457,6 +463,16 @@ namespace go
#region ILayoutable implementation
+ public void RegisterForLayouting (int layoutType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void UpdateLayout (LayoutingType layoutType)
+ {
+ throw new NotImplementedException ();
+ }
+
public Rectangle ContextCoordinates (Rectangle r)
{
return r;
@@ -513,79 +529,7 @@ namespace go
return ClientRectangle;
}
- public bool WIsValid {
- get {
- return true;
- }
- set {
- throw new NotImplementedException ();
- }
- }
- public bool HIsValid {
- get {
- return true;
- }
- set {
- throw new NotImplementedException ();
- }
- }
- public bool XIsValid {
- get {
- return true;
- }
- set {
- throw new NotImplementedException ();
- }
- }
- public bool YIsValid {
- get {
- return true;
- }
- set {
- throw new NotImplementedException ();
- }
- }
- public virtual void InvalidateLayout ()
- {
-// foreach (GraphicObject g in GraphicObjects) {
-// g.InvalidateLayout ();
-// }
- }
-// public Rectangle rectInScreenCoord (Rectangle r)
-// {
-// throw new NotImplementedException ();
-// }
-// public Rectangle renderBoundsInContextCoordonate {
-// get { return ClientRectangle; }
-// }
-// public Rectangle ClientBoundsInContextCoordonate {
-// get {
-// throw new NotImplementedException ();
-// }
-// }
-// public Rectangle renderBoundsInBackendSurfaceCoordonate {
-// get { return ClientRectangle; }
-// }
-// public Rectangle ClientBoundsInBackendSurfaceCoordonate {
-// get {
-// throw new NotImplementedException ();
-// }
-// set {
-// throw new NotImplementedException ();
-// }
-// }
-// public Rectangle ScreenCoordBounds {
-// get { return ClientRectangle; }
-// }
-// public Rectangle ScreenCoordClientBounds {
-// get {
-// throw new NotImplementedException ();
-// }
-// set {
-// throw new NotImplementedException ();
-// }
-// }
#endregion
}
} \ No newline at end of file