Button, CheckBox, RadioButton, ComboBox, Expandable,
-MessageBox, Popper, Slider, Spinner, TextBox, Window {
+MessageBox, Popper, Slider, Spinner, TextBox {
Focusable = true;
Height = Fit;
}
Foreground = Black;
}
Window {
+ Focusable = true;
MinimumSize=50,50;
- Width = Fit;
+ Width = 150;
+ Height = 150;
}
\ No newline at end of file
ComputeChildrenPositions ();
//if no layouting remains in queue for item, registre for redraw
- if (RegisteredLayoutings == LayoutingType.None && bmp==null)
- this.AddToRedrawList ();
+ if (RegisteredLayoutings == LayoutingType.None && bmp == null)
+ RegisterForGraphicUpdate ();
return true;
}
if (Interface.CurrentInterface.XmlLoading)
return;
+ loadDefaultValues ();
}
public GraphicObject (Rectangle _bounds)
{
{
Interface.RegisterForGraphicUpdate (this);
}
- internal bool IsInRedrawList = false;
- /// <summary>
- /// Add clipping region in redraw list of interface, dont update cached object content
- /// </summary>
- internal void AddToRedrawList ()
- {
- Interface.AddToRedrawList (this);
- }
#region Layouting
[XmlIgnore]public int LayoutingTries {
//if no layouting remains in queue for item, registre for redraw
if (this.registeredLayoutings == LayoutingType.None && bmp == null)
- this.AddToRedrawList ();
+ RegisterForGraphicUpdate ();
return true;
}
ComputeChildrenPositions ();
//if no layouting remains in queue for item, registre for redraw
- if (RegisteredLayoutings == LayoutingType.None && bmp==null)
- this.AddToRedrawList ();
+ if (RegisteredLayoutings == LayoutingType.None && bmp == null)
+ this.RegisterForGraphicUpdate ();
return true;
}
}
//if no layouting remains in queue for item, registre for redraw
- if (RegisteredLayoutings == LayoutingType.None && bmp==null)
- this.AddToRedrawList ();
+ if (RegisteredLayoutings == LayoutingType.None && bmp == null)
+ RegisterForGraphicUpdate ();
return true;
}
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.
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;
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
get { return _redrawClip; }
set { _redrawClip = value; }
}
- public List<GraphicObject> RedrawList {
- get { return _gobjsToRedraw; }
- set { _gobjsToRedraw = value; }
- }
public void AddWidget(GraphicObject g)
{
g.Parent = this;