diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-01 09:44:59 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-08-01 09:44:59 +0200 |
| commit | fd5b776826028a0c12a92f11d1daf4065d4c6024 (patch) | |
| tree | 4ef60fb0469ffedb57069734085f067643a60cf8 /src/Interface.cs | |
| parent | e7e29bdec8dff7c328c2ff39893159b7f8e5282c (diff) | |
add fixed width and height to default win style.
modifié : Default.style
Remove redundant drawing Queue (redrawingList)
modifié : src/GraphicObjects/GenericStack.cs
modifié : src/GraphicObjects/GraphicObject.cs
modifié : src/GraphicObjects/Grid.cs
modifié : src/GraphicObjects/TabView.cs
modifié : src/Interface.cs
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index 02b6efaf..dee5e146 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -102,15 +102,6 @@ namespace Crow g.IsQueueForGraphicUpdate = true; } } - public static void AddToRedrawList(GraphicObject g) - { - if (g.IsInRedrawList) - return; - if (Interface.CurrentInterface == null) - return; - Interface.CurrentInterface.RedrawList.Add (g); - g.IsInRedrawList = true; - } #region default values loading helpers /// Default values of properties from GraphicObjects are retrieve from XML Attributes. @@ -298,7 +289,6 @@ namespace Crow public static Interface CurrentInterface; Rectangles _redrawClip = new Rectangles();//should find another way to access it from child - List<GraphicObject> _gobjsToRedraw = new List<GraphicObject>(); Context ctx; Surface surf; @@ -434,24 +424,16 @@ namespace Crow GraphicObject g = CurrentInterface.GraphicUpdateQueue.Dequeue (); g.bmp = null; g.IsQueueForGraphicUpdate = false; - AddToRedrawList (g); - } - } - //Debug.WriteLine ("otd:" + gobjsToRedraw.Count.ToString () + "-"); - //final redraw clips should be added only when layout is completed among parents, - //that's why it take place in a second pass - foreach (GraphicObject p in RedrawList) { - try { - p.IsInRedrawList = false; - if (p.Parent == null) - continue; - p.Parent.RegisterClip (p.LastPaintedSlot); - p.Parent.RegisterClip (p.getSlot ()); - } catch (Exception ex) { - Debug.WriteLine ("Error Register Clip: " + ex.ToString ()); + try { + if (g.Parent == null) + continue; + g.Parent.RegisterClip (g.LastPaintedSlot); + g.Parent.RegisterClip (g.getSlot ()); + } catch (Exception ex) { + Debug.WriteLine ("Error Register Clip: " + ex.ToString ()); + } } } - RedrawList.Clear (); #if MEASURE_TIME clippingTime.Stop (); #endif @@ -519,10 +501,6 @@ namespace Crow get { return _redrawClip; } set { _redrawClip = value; } } - public List<GraphicObject> RedrawList { - get { return _gobjsToRedraw; } - set { _gobjsToRedraw = value; } - } public void AddWidget(GraphicObject g) { g.Parent = this; |