aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects')
-rw-r--r--src/GraphicObjects/Border.cs2
-rw-r--r--src/GraphicObjects/GenericStack.cs26
-rw-r--r--src/GraphicObjects/GraphicObject.cs95
-rw-r--r--src/GraphicObjects/Grid.cs6
-rw-r--r--src/GraphicObjects/Group.cs16
-rw-r--r--src/GraphicObjects/ILayoutable.cs4
-rw-r--r--src/GraphicObjects/Image.cs8
-rw-r--r--src/GraphicObjects/Label.cs24
-rw-r--r--src/GraphicObjects/NumericControl.cs10
-rw-r--r--src/GraphicObjects/PrivateContainer.cs12
-rw-r--r--src/GraphicObjects/ScrollBar.cs2
-rw-r--r--src/GraphicObjects/Scroller.cs4
-rw-r--r--src/GraphicObjects/Slider.cs4
-rw-r--r--src/GraphicObjects/Splitter.cs2
-rw-r--r--src/GraphicObjects/TabItem.cs2
-rw-r--r--src/GraphicObjects/TabView.cs12
-rw-r--r--src/GraphicObjects/TextBox.cs4
-rw-r--r--src/GraphicObjects/TextRun.cs8
-rw-r--r--src/GraphicObjects/Trend.cs16
19 files changed, 127 insertions, 130 deletions
diff --git a/src/GraphicObjects/Border.cs b/src/GraphicObjects/Border.cs
index be08a7d8..c6355726 100644
--- a/src/GraphicObjects/Border.cs
+++ b/src/GraphicObjects/Border.cs
@@ -21,7 +21,7 @@ namespace Crow
get { return _borderWidth; }
set {
_borderWidth = value;
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue("White")]
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs
index 2a1da6c3..897343b3 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.RegisteredLayoutings.HasFlag (LayoutingType.Width))
+ if (c.QueuedLayoutings.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.RegisteredLayoutings.HasFlag (LayoutingType.Height))
+ if (c.QueuedLayoutings.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.RegisterForLayouting (LayoutingType.Y);
+ c.EnqueueForLayouting (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.RegisterForLayouting (LayoutingType.X);
+ c.EnqueueForLayouting (LayoutingType.X);
}
}
bmp = null;
@@ -115,7 +115,7 @@ namespace Crow
public override bool UpdateLayout (LayoutingType layoutType)
{
- RegisteredLayoutings &= (~layoutType);
+ QueuedLayoutings &= (~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].RegisteredLayoutings.HasFlag (LayoutingType.Width))
+ if (Children [i].QueuedLayoutings.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].RegisteredLayoutings.HasFlag (LayoutingType.Height))
+ if (Children [i].QueuedLayoutings.HasFlag (LayoutingType.Height))
return false;
cptChildren++;
if (Children [i].Height == 0) {
@@ -205,8 +205,8 @@ namespace Crow
ComputeChildrenPositions ();
//if no layouting remains in queue for item, registre for redraw
- if (RegisteredLayoutings == LayoutingType.None && bmp==null)
- this.RegisterForRedraw ();
+ if (QueuedLayoutings == 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.RegisterForLayouting (LayoutingType.Width);
- this.RegisterForLayouting (LayoutingType.ArrangeChildren);
+ this.EnqueueForLayouting (LayoutingType.Width);
+ this.EnqueueForLayouting (LayoutingType.ArrangeChildren);
}
break;
case LayoutingType.Height:
if (Orientation == Orientation.Vertical) {
if (this.Bounds.Height < 0)
- this.RegisterForLayouting (LayoutingType.Height);
- this.RegisterForLayouting (LayoutingType.ArrangeChildren);
+ this.EnqueueForLayouting (LayoutingType.Height);
+ this.EnqueueForLayouting (LayoutingType.ArrangeChildren);
}
break;
}
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 2bce3349..1909b07d 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -57,7 +57,7 @@ namespace Crow
#endregion
#region private fields
- LayoutingType registeredLayoutings = LayoutingType.None;
+ LayoutingType queuedLayoutings = LayoutingType.None;
ILayoutable logicalParent;
ILayoutable _parent;
string _name = "unamed";
@@ -101,12 +101,13 @@ namespace Crow
/// IDEA is to add a ScreenCoordinates function that use only lastPaintedSlots
/// </summary>
public Rectangle LastPaintedSlot;
+ public LayoutingType RegisteredLayoutings = LayoutingType.None;
public object Tag;
public byte[] bmp;
#endregion
#region ILayoutable
- [XmlIgnore]public LayoutingType RegisteredLayoutings { get { return registeredLayoutings; } set { registeredLayoutings = value; } }
+ [XmlIgnore]public LayoutingType QueuedLayoutings { get { return queuedLayoutings; } set { queuedLayoutings = value; } }
//TODO: it would save the recurent cost of a cast in event bubbling if parent type was GraphicObject
// or we could add to the interface the mouse events
/// <summary>
@@ -317,7 +318,7 @@ namespace Crow
return;
_background = value;
NotifyValueChanged ("Background", _background);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue("White")]
@@ -328,7 +329,7 @@ namespace Crow
return;
_foreground = value;
NotifyValueChanged ("Foreground", _foreground);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue("droid,10")]
@@ -339,7 +340,7 @@ namespace Crow
return;
_font = value;
NotifyValueChanged ("Font", _font);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(0.0)]
@@ -350,7 +351,7 @@ namespace Crow
return;
_cornerRadius = value;
NotifyValueChanged ("CornerRadius", _cornerRadius);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(0)]
@@ -361,7 +362,7 @@ namespace Crow
return;
_margin = value;
NotifyValueChanged ("Margin", _margin);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(true)]
@@ -381,12 +382,12 @@ namespace Crow
Interface.CurrentInterface.hoverWidget = null;
if (Parent is GraphicObject)
- Parent.RegisterForLayouting (LayoutingType.Sizing);
+ (Parent as GraphicObject).RegisterForLayouting (LayoutingType.Sizing);
if (Parent is GenericStack)
- Parent.RegisterForLayouting (LayoutingType.ArrangeChildren);
- RegisterForLayouting (LayoutingType.Sizing);
+ (Parent as GraphicObject).RegisterForLayouting (LayoutingType.ArrangeChildren);
- RegisterForRedraw ();
+ RegisterForLayouting (LayoutingType.Sizing);
+ RegisterForGraphicUpdate ();
NotifyValueChanged ("Visible", _isVisible);
}
@@ -628,27 +629,25 @@ namespace Crow
Clipping.AddRectangle (clip + ClientRectangle.Position);
Parent.RegisterClip (clip + Slot.Position + ClientRectangle.Position);
}
+ public bool IsQueueForGraphicUpdate = false;
/// <summary>
/// Clear chached object and add clipping region in redraw list of interface
/// </summary>
- public virtual void registerForGraphicUpdate ()
+ public void RegisterForGraphicUpdate ()
{
- bmp = null;
- RegisterForRedraw ();
+ Interface.RegisterForGraphicUpdate (this);
}
- public bool IsQueuedForRedraw = false;
+ public void RegisterForLayouting(LayoutingType lt)
+ {
+ Interface.RegisterForLayouting (this, lt);
+ }
+ internal bool IsInRedrawList = false;
/// <summary>
/// Add clipping region in redraw list of interface, dont update cached object content
/// </summary>
- public virtual void RegisterForRedraw ()
+ internal void AddToRedrawList ()
{
- if (IsQueuedForRedraw)
- return;
- if (Interface.CurrentInterface == null)
- return;
- lock(Interface.CurrentInterface.RenderMutex)
- Interface.CurrentInterface.gobjsToRedraw.Add (this);
- IsQueuedForRedraw = true;
+ Interface.AddToRedrawList (this);
}
#region Layouting
@@ -665,7 +664,7 @@ namespace Crow
}
public virtual bool ArrangeChildren { get { return false; } }
- public virtual void RegisterForLayouting(LayoutingType layoutType){
+ public virtual void EnqueueForLayouting(LayoutingType layoutType){
if (Parent == null)
return;
//dont set position for stretched item
@@ -682,7 +681,7 @@ namespace Crow
(Parent as GraphicObject).ChildrenLayoutingConstraints (ref layoutType);
//prevent queueing same LayoutingType for this
- layoutType &= (~RegisteredLayoutings);
+ layoutType &= (~QueuedLayoutings);
if (layoutType == LayoutingType.None)
return;
@@ -691,19 +690,17 @@ namespace Crow
Debug.WriteLine ("REGLayout => {1}->{0}", layoutType, this.ToString());
#endif
- lock (Interface.LayoutingQueue) {
- //enqueue LQI LayoutingTypes separately
- if (layoutType.HasFlag (LayoutingType.Width))
- Interface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.Width, this));
- if (layoutType.HasFlag (LayoutingType.Height))
- Interface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.Height, this));
- if (layoutType.HasFlag (LayoutingType.X))
- Interface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.X, this));
- if (layoutType.HasFlag (LayoutingType.Y))
- Interface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.Y, this));
- if (layoutType.HasFlag (LayoutingType.ArrangeChildren))
- Interface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.ArrangeChildren, this));
- }
+ //enqueue LQI LayoutingTypes separately
+ if (layoutType.HasFlag (LayoutingType.Width))
+ Interface.CurrentInterface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.Width, this));
+ if (layoutType.HasFlag (LayoutingType.Height))
+ Interface.CurrentInterface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.Height, this));
+ if (layoutType.HasFlag (LayoutingType.X))
+ Interface.CurrentInterface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.X, this));
+ if (layoutType.HasFlag (LayoutingType.Y))
+ Interface.CurrentInterface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.Y, this));
+ if (layoutType.HasFlag (LayoutingType.ArrangeChildren))
+ Interface.CurrentInterface.LayoutingQueue.Enqueue (new LayoutingQueueItem (LayoutingType.ArrangeChildren, this));
}
/// <summary> trigger dependant sizing component update </summary>
@@ -715,10 +712,10 @@ namespace Crow
switch (layoutType) {
case LayoutingType.Width:
- this.RegisterForLayouting (LayoutingType.X);
+ EnqueueForLayouting (LayoutingType.X);
break;
case LayoutingType.Height:
- this.RegisterForLayouting (LayoutingType.Y);
+ EnqueueForLayouting (LayoutingType.Y);
break;
}
LayoutChanged.Raise (this, new LayoutingEventArgs (layoutType));
@@ -731,14 +728,14 @@ namespace Crow
public virtual bool UpdateLayout (LayoutingType layoutType)
{
//unset bit, it would be reset if LQI is re-queued
- registeredLayoutings &= (~layoutType);
+ queuedLayoutings &= (~layoutType);
switch (layoutType) {
case LayoutingType.X:
if (Bounds.X == 0) {
- if (Parent.RegisteredLayoutings.HasFlag (LayoutingType.Width) ||
- RegisteredLayoutings.HasFlag (LayoutingType.Width))
+ if (Parent.QueuedLayoutings.HasFlag (LayoutingType.Width) ||
+ QueuedLayoutings.HasFlag (LayoutingType.Width))
return false;
switch (HorizontalAlignment) {
@@ -767,8 +764,8 @@ namespace Crow
case LayoutingType.Y:
if (Bounds.Y == 0) {
- if (Parent.RegisteredLayoutings.HasFlag (LayoutingType.Height) ||
- RegisteredLayoutings.HasFlag (LayoutingType.Height))
+ if (Parent.QueuedLayoutings.HasFlag (LayoutingType.Height) ||
+ QueuedLayoutings.HasFlag (LayoutingType.Height))
return false;
switch (VerticalAlignment) {
@@ -799,7 +796,7 @@ namespace Crow
Slot.Width = Width;
else if (Width < 0) {
Slot.Width = measureRawSize (LayoutingType.Width);
- }else if (Parent.RegisteredLayoutings.HasFlag (LayoutingType.Width))
+ }else if (Parent.QueuedLayoutings.HasFlag (LayoutingType.Width))
return false;
else
Slot.Width = Parent.ClientRectangle.Width;
@@ -824,7 +821,7 @@ namespace Crow
Slot.Height = Height;
else if (Height < 0){
Slot.Height = measureRawSize (LayoutingType.Height);
- }else if (Parent.RegisteredLayoutings.HasFlag (LayoutingType.Height))
+ }else if (Parent.QueuedLayoutings.HasFlag (LayoutingType.Height))
return false;
else
Slot.Height = Parent.ClientRectangle.Height;
@@ -847,8 +844,8 @@ namespace Crow
}
//if no layouting remains in queue for item, registre for redraw
- if (this.registeredLayoutings == LayoutingType.None && bmp == null)
- this.RegisterForRedraw ();
+ if (this.queuedLayoutings == LayoutingType.None && bmp == null)
+ this.AddToRedrawList ();
return true;
}
diff --git a/src/GraphicObjects/Grid.cs b/src/GraphicObjects/Grid.cs
index 281f4ae0..e13690a7 100644
--- a/src/GraphicObjects/Grid.cs
+++ b/src/GraphicObjects/Grid.cs
@@ -128,15 +128,15 @@ namespace Crow
public override bool UpdateLayout (LayoutingType layoutType)
{
- RegisteredLayoutings &= (~layoutType);
+ QueuedLayoutings &= (~layoutType);
if (layoutType == LayoutingType.ArrangeChildren) {
ComputeChildrenPositions ();
//if no layouting remains in queue for item, registre for redraw
- if (RegisteredLayoutings == LayoutingType.None && bmp==null)
- this.RegisterForRedraw ();
+ if (QueuedLayoutings == LayoutingType.None && bmp==null)
+ this.AddToRedrawList ();
return true;
}
diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs
index 869ec113..3b2c1380 100644
--- a/src/GraphicObjects/Group.cs
+++ b/src/GraphicObjects/Group.cs
@@ -162,14 +162,14 @@ namespace Crow
foreach (GraphicObject c in Children) {
if (!c.Visible)
continue;
- c.RegisterForLayouting (LayoutingType.X | LayoutingType.Width);
+ c.EnqueueForLayouting (LayoutingType.X | LayoutingType.Width);
}
break;
case LayoutingType.Height:
foreach (GraphicObject c in Children) {
if (!c.Visible)
continue;
- c.RegisterForLayouting (LayoutingType.Y | LayoutingType.Height); }
+ c.EnqueueForLayouting (LayoutingType.Y | LayoutingType.Height); }
break;
}
}
@@ -182,14 +182,14 @@ namespace Crow
maxChildrenWidth = g.Slot.Width;
largestChild = g;
if (this.Bounds.Width < 0)
- this.RegisterForLayouting (LayoutingType.Width);
+ this.EnqueueForLayouting (LayoutingType.Width);
} else if (g == largestChild) {
largestChild = null;
maxChildrenWidth = 0;
if (this.Bounds.Width < 0)
- this.RegisterForLayouting (LayoutingType.Width);
+ this.EnqueueForLayouting (LayoutingType.Width);
}
break;
case LayoutingType.Height:
@@ -197,14 +197,14 @@ namespace Crow
maxChildrenHeight = g.Slot.Height;
tallestChild = g;
if (this.Bounds.Height < 0)
- this.RegisterForLayouting (LayoutingType.Height);
+ this.EnqueueForLayouting (LayoutingType.Height);
} else if (g == tallestChild) {
tallestChild = null;
maxChildrenHeight = 0;
if (this.Bounds.Height < 0)
- this.RegisterForLayouting (LayoutingType.Height);
+ this.EnqueueForLayouting (LayoutingType.Height);
}
break;
}
@@ -226,7 +226,7 @@ namespace Crow
for (int i = 0; i < Children.Count; i++) {
if (!Children [i].Visible)
continue;
- if (children [i].RegisteredLayoutings.HasFlag (LayoutingType.Width))
+ if (children [i].QueuedLayoutings.HasFlag (LayoutingType.Width))
continue;
if (Children [i].Slot.Width > maxChildrenWidth) {
maxChildrenWidth = Children [i].Slot.Width;
@@ -243,7 +243,7 @@ namespace Crow
for (int i = 0; i < Children.Count; i++) {
if (!Children [i].Visible)
continue;
- if (children [i].RegisteredLayoutings.HasFlag (LayoutingType.Height))
+ if (children [i].QueuedLayoutings.HasFlag (LayoutingType.Height))
continue;
if (Children [i].Slot.Height > maxChildrenHeight) {
maxChildrenHeight = Children [i].Slot.Height;
diff --git a/src/GraphicObjects/ILayoutable.cs b/src/GraphicObjects/ILayoutable.cs
index a8df3ae0..77f9409b 100644
--- a/src/GraphicObjects/ILayoutable.cs
+++ b/src/GraphicObjects/ILayoutable.cs
@@ -18,8 +18,8 @@ namespace Crow
Rectangle getBounds();
bool ArrangeChildren { get; }
- LayoutingType RegisteredLayoutings { get; set; }
- void RegisterForLayouting(LayoutingType layoutType);
+ LayoutingType QueuedLayoutings { get; set; }
+ void EnqueueForLayouting(LayoutingType layoutType);
void RegisterClip(Rectangle clip);
bool UpdateLayout(LayoutingType layoutType);
diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs
index 8f02a19e..61b6e059 100644
--- a/src/GraphicObjects/Image.cs
+++ b/src/GraphicObjects/Image.cs
@@ -23,7 +23,7 @@ namespace Crow
if (_pic == null)
return;
_pic.Scaled = scaled;
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
bool keepProps;
@@ -38,7 +38,7 @@ namespace Crow
if (_pic == null)
return;
_pic.KeepProportions = keepProps;
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute("Path")]
@@ -65,7 +65,7 @@ namespace Crow
get { return _svgSub; }
set {
_svgSub = value;
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
@@ -85,7 +85,7 @@ namespace Crow
_pic = new BmpPicture ();
_pic.LoadImage (path);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
RegisterForLayouting (LayoutingType.Sizing);
}
#endregion
diff --git a/src/GraphicObjects/Label.cs b/src/GraphicObjects/Label.cs
index fa2d5828..ebc18f76 100644
--- a/src/GraphicObjects/Label.cs
+++ b/src/GraphicObjects/Label.cs
@@ -61,7 +61,7 @@ namespace Crow
return;
selColor = value;
NotifyValueChanged ("SelectionBackground", selColor);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue("White")]
@@ -72,7 +72,7 @@ namespace Crow
return;
selFontColor = value;
NotifyValueChanged ("SelectionForeground", selFontColor);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(Alignment.Left)]
@@ -83,8 +83,8 @@ namespace Crow
if (value == _textAlignment)
return;
_textAlignment = value;
- registerForGraphicUpdate ();
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
NotifyValueChanged ("TextAlignment", _textAlignment);
}
}
@@ -95,7 +95,7 @@ namespace Crow
if (horizontalStretch == value)
return;
horizontalStretch = value;
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
NotifyValueChanged ("HorizontalStretch", horizontalStretch);
}
}
@@ -129,7 +129,7 @@ namespace Crow
lines = getLines;
- this.registerForGraphicUpdate ();
+ this.RegisterForGraphicUpdate ();
this.RegisterForLayouting (LayoutingType.Sizing);
NotifyValueChanged ("Text", _text);
}
@@ -144,7 +144,7 @@ namespace Crow
return;
_multiline = value;
NotifyValueChanged ("Multiline", _multiline);
- registerForGraphicUpdate();
+ RegisterForGraphicUpdate();
}
}
[XmlAttributeAttribute()][DefaultValue(0)]
@@ -561,7 +561,7 @@ namespace Crow
SelBegin = new Point(0,0);
SelRelease = new Point (lines.LastOrDefault ().Length, lines.Count-1);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
public override void onUnfocused (object sender, EventArgs e)
{
@@ -569,7 +569,7 @@ namespace Crow
SelBegin = -1;
SelRelease = -1;
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
public override void onMouseMove (object sender, MouseMoveEventArgs e)
{
@@ -580,7 +580,7 @@ namespace Crow
updatemouseLocalPos (e.Position);
- registerForGraphicUpdate();
+ RegisterForGraphicUpdate();
}
public override void onMouseDown (object sender, MouseButtonEventArgs e)
{
@@ -589,7 +589,7 @@ namespace Crow
SelBegin = -1;
SelRelease = -1;
SelectionInProgress = true;
- registerForGraphicUpdate();//TODO:should put it in properties
+ RegisterForGraphicUpdate();//TODO:should put it in properties
}
//done at the end to set 'hasFocus' value after testing it
@@ -604,7 +604,7 @@ namespace Crow
updatemouseLocalPos (e.Position);
SelectionInProgress = false;
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
#endregion
/// <summary>
diff --git a/src/GraphicObjects/NumericControl.cs b/src/GraphicObjects/NumericControl.cs
index eb01815f..0f74eb2d 100644
--- a/src/GraphicObjects/NumericControl.cs
+++ b/src/GraphicObjects/NumericControl.cs
@@ -30,7 +30,7 @@ namespace Crow
minValue = value;
NotifyValueChanged ("Minimum", minValue);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(100.0)]
@@ -43,7 +43,7 @@ namespace Crow
maxValue = value;
NotifyValueChanged ("Maximum", maxValue);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(1.0)]
@@ -56,7 +56,7 @@ namespace Crow
smallStep = value;
NotifyValueChanged ("SmallIncrement", smallStep);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(5.0)]
@@ -69,7 +69,7 @@ namespace Crow
bigStep = value;
NotifyValueChanged ("LargeIncrement", bigStep);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(0.0)]
@@ -89,7 +89,7 @@ namespace Crow
_actualValue = value;
NotifyValueChanged("Value", _actualValue);
- registerForGraphicUpdate();
+ RegisterForGraphicUpdate();
}
}
#endregion
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs
index 3a3d9067..1aa39633 100644
--- a/src/GraphicObjects/PrivateContainer.cs
+++ b/src/GraphicObjects/PrivateContainer.cs
@@ -95,10 +95,10 @@ namespace Crow
if (child == null)
return base.measureRawSize (lt);
if (lt == LayoutingType.Width)
- return child.RegisteredLayoutings.HasFlag(LayoutingType.Width) ?
+ return child.QueuedLayoutings.HasFlag(LayoutingType.Width) ?
-1 : child.Slot.Size.Width + 2 * Margin;
else
- return child.RegisteredLayoutings.HasFlag(LayoutingType.Height) ?
+ return child.QueuedLayoutings.HasFlag(LayoutingType.Height) ?
-1 : child.Slot.Size.Height + 2 * Margin;
}
public override bool UpdateLayout (LayoutingType layoutType)
@@ -127,13 +127,13 @@ namespace Crow
case LayoutingType.Width:
if (child != null) {
if (child.Visible)
- child.RegisterForLayouting (LayoutingType.X | LayoutingType.Width);
+ child.EnqueueForLayouting (LayoutingType.X | LayoutingType.Width);
}
break;
case LayoutingType.Height:
if (child != null) {
if (child.Visible)
- child.RegisterForLayouting (LayoutingType.Y | LayoutingType.Height);
+ child.EnqueueForLayouting (LayoutingType.Y | LayoutingType.Height);
}
break;
}
@@ -148,11 +148,11 @@ namespace Crow
break;
case LayoutingType.Width:
if (this.Bounds.Width < 0)
- this.RegisterForLayouting (LayoutingType.Width);
+ this.EnqueueForLayouting (LayoutingType.Width);
break;
case LayoutingType.Height:
if (this.Bounds.Height < 0)
- this.RegisterForLayouting (LayoutingType.Height);
+ this.EnqueueForLayouting (LayoutingType.Height);
break;
}
}
diff --git a/src/GraphicObjects/ScrollBar.cs b/src/GraphicObjects/ScrollBar.cs
index d1ef12a3..ea75d6d1 100644
--- a/src/GraphicObjects/ScrollBar.cs
+++ b/src/GraphicObjects/ScrollBar.cs
@@ -28,7 +28,7 @@ namespace Crow
return;
_orientation = value;
NotifyValueChanged ("Orientation", _orientation);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
public void onScrollBack (object sender, MouseButtonEventArgs e)
diff --git a/src/GraphicObjects/Scroller.cs b/src/GraphicObjects/Scroller.cs
index 58a0f245..83b65103 100644
--- a/src/GraphicObjects/Scroller.cs
+++ b/src/GraphicObjects/Scroller.cs
@@ -70,7 +70,7 @@ namespace Crow
else
_scrollX = value;
NotifyValueChanged("ScrollX", _scrollX);
- RegisterForRedraw();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute][DefaultValue(0.0)]
@@ -88,7 +88,7 @@ namespace Crow
else
_scrollY = value;
NotifyValueChanged("ScrollY", _scrollY);
- RegisterForRedraw();
+ RegisterForGraphicUpdate ();
}
}
diff --git a/src/GraphicObjects/Slider.cs b/src/GraphicObjects/Slider.cs
index a96f2a40..26720b1d 100644
--- a/src/GraphicObjects/Slider.cs
+++ b/src/GraphicObjects/Slider.cs
@@ -47,7 +47,7 @@ namespace Crow
if (_cursorColor == value)
return;
_cursorColor = value;
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
NotifyValueChanged ("CursorColor", _cursorColor);
}
}
@@ -59,7 +59,7 @@ namespace Crow
return;
_cursorSize = value;
RegisterForLayouting (LayoutingType.Sizing);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
NotifyValueChanged ("CursorSize", _cursorSize);
}
}
diff --git a/src/GraphicObjects/Splitter.cs b/src/GraphicObjects/Splitter.cs
index 9372f1bc..6a1f2254 100644
--- a/src/GraphicObjects/Splitter.cs
+++ b/src/GraphicObjects/Splitter.cs
@@ -42,7 +42,7 @@ namespace Crow
thickness = value;
NotifyValueChanged ("Thickness", thickness);
RegisterForLayouting (LayoutingType.Sizing);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
#region GraphicObject override
diff --git a/src/GraphicObjects/TabItem.cs b/src/GraphicObjects/TabItem.cs
index c2d863af..9fd8180d 100644
--- a/src/GraphicObjects/TabItem.cs
+++ b/src/GraphicObjects/TabItem.cs
@@ -91,7 +91,7 @@ namespace Crow
NotifyValueChanged ("TabOffset", tabOffset);
RegisterForLayouting (LayoutingType.X);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue("TabItem")]
diff --git a/src/GraphicObjects/TabView.cs b/src/GraphicObjects/TabView.cs
index 97ac4c64..7ae5e3d3 100644
--- a/src/GraphicObjects/TabView.cs
+++ b/src/GraphicObjects/TabView.cs
@@ -77,7 +77,7 @@ namespace Crow
(Children [selectedTab] as TabItem).IsSelected = true;
NotifyValueChanged ("SelectedTab", selectedTab);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
int tabThickness;
@@ -126,7 +126,7 @@ namespace Crow
public override bool ArrangeChildren { get { return true; } }
public override bool UpdateLayout (LayoutingType layoutType)
{
- RegisteredLayoutings &= (~layoutType);
+ QueuedLayoutings &= (~layoutType);
if (layoutType == LayoutingType.ArrangeChildren) {
int curOffset = Spacing;
@@ -136,19 +136,19 @@ namespace Crow
TabItem ti = Children [i] as TabItem;
ti.TabOffset = curOffset;
if (Orientation == Orientation.Horizontal) {
- if (ti.TabTitle.RegisteredLayoutings.HasFlag (LayoutingType.Width))
+ if (ti.TabTitle.QueuedLayoutings.HasFlag (LayoutingType.Width))
return false;
curOffset += ti.TabTitle.Slot.Width + Spacing;
} else {
- if (ti.TabTitle.RegisteredLayoutings.HasFlag (LayoutingType.Height))
+ if (ti.TabTitle.QueuedLayoutings.HasFlag (LayoutingType.Height))
return false;
curOffset += ti.TabTitle.Slot.Height + Spacing;
}
}
//if no layouting remains in queue for item, registre for redraw
- if (RegisteredLayoutings == LayoutingType.None && bmp==null)
- this.RegisterForRedraw ();
+ if (QueuedLayoutings == LayoutingType.None && bmp==null)
+ this.AddToRedrawList ();
return true;
}
diff --git a/src/GraphicObjects/TextBox.cs b/src/GraphicObjects/TextBox.cs
index 7907eb42..14cc1830 100644
--- a/src/GraphicObjects/TextBox.cs
+++ b/src/GraphicObjects/TextBox.cs
@@ -34,7 +34,7 @@ namespace Crow
set
{
base.HasFocus = value;
- registerForGraphicUpdate();
+ RegisterForGraphicUpdate();
}
}
[XmlAttributeAttribute()][DefaultValue(true)]
@@ -201,7 +201,7 @@ namespace Crow
RegisterForLayouting (LayoutingType.Width);
if (Height < 0)
RegisterForLayouting (LayoutingType.Height);
- registerForGraphicUpdate();
+ RegisterForGraphicUpdate();
}
#endregion
}
diff --git a/src/GraphicObjects/TextRun.cs b/src/GraphicObjects/TextRun.cs
index 0fa463af..15f024af 100644
--- a/src/GraphicObjects/TextRun.cs
+++ b/src/GraphicObjects/TextRun.cs
@@ -55,7 +55,7 @@ namespace Crow
if (horizontalStretch == value)
return;
horizontalStretch = value;
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
NotifyValueChanged ("HorizontalStretch", horizontalStretch);
}
}
@@ -82,7 +82,7 @@ namespace Crow
if (_text == value)
return;
- registerForGraphicUpdate();
+ RegisterForGraphicUpdate();
this.RegisterForLayouting (LayoutingType.Sizing);
@@ -101,7 +101,7 @@ namespace Crow
set
{
_multiline = value;
- registerForGraphicUpdate();
+ RegisterForGraphicUpdate();
}
}
[XmlAttributeAttribute()][DefaultValue(false)]
@@ -113,7 +113,7 @@ namespace Crow
if (wordWrap == value)
return;
wordWrap = value;
- registerForGraphicUpdate();
+ RegisterForGraphicUpdate();
}
}
diff --git a/src/GraphicObjects/Trend.cs b/src/GraphicObjects/Trend.cs
index 4813f3d6..e9ff4c06 100644
--- a/src/GraphicObjects/Trend.cs
+++ b/src/GraphicObjects/Trend.cs
@@ -41,7 +41,7 @@ namespace Crow
values.Add (_value);
while (values.Count > nbValues)
values.RemoveAt (0);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
public Trend ()
@@ -61,7 +61,7 @@ namespace Crow
nbValues = value;
NotifyValueChanged ("NbValues", minValue);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(0.0)]
@@ -73,7 +73,7 @@ namespace Crow
minValue = value;
NotifyValueChanged ("Minimum", minValue);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(100.0)]
@@ -86,7 +86,7 @@ namespace Crow
maxValue = value;
NotifyValueChanged ("Maximum", maxValue);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(20.0)]
@@ -97,7 +97,7 @@ namespace Crow
return;
lowThreshold = value;
NotifyValueChanged ("LowThreshold", lowThreshold);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue(80.0)]
@@ -108,7 +108,7 @@ namespace Crow
return;
highThreshold = value;
NotifyValueChanged ("HighThreshold", highThreshold);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue("DarkRed")]
@@ -119,7 +119,7 @@ namespace Crow
return;
lowThresholdFill = value;
NotifyValueChanged ("LowThresholdFill", lowThresholdFill);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
[XmlAttributeAttribute()][DefaultValue("DarkGreen")]
@@ -130,7 +130,7 @@ namespace Crow
return;
highThresholdFill = value;
NotifyValueChanged ("HighThresholdFill", highThresholdFill);
- registerForGraphicUpdate ();
+ RegisterForGraphicUpdate ();
}
}
protected override void onDraw (Cairo.Context gr)