[hyena] Allow relative invalidations



commit 813e66c1587cf904bb64058c1fad67c6f2b412b5
Author: Aaron Bockover <abockover novell com>
Date:   Sat Jan 23 14:54:56 2010 -0500

    Allow relative invalidations

 src/Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs b/src/Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs
index 2925b43..a224723 100644
--- a/src/Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs
+++ b/src/Hyena.Gui/Hyena.Data.Gui/DataViewChild.cs
@@ -38,7 +38,7 @@ namespace Hyena.Data.Gui
         public DataViewLayout ParentLayout { get; set; }
         public int ModelRowIndex { get; set; }
 
-        public override void Invalidate (Gdk.Rectangle area)
+        protected override void OnInvalidate (Gdk.Rectangle area)
         {
             ParentLayout.View.QueueDirtyRegion (area);
         }
@@ -130,10 +130,16 @@ namespace Hyena.Data.Gui
         public abstract void Render (CellContext context);
         public abstract Gdk.Size Measure ();
 
-        public virtual void Invalidate (Gdk.Rectangle area)
+        protected virtual void OnInvalidate (Gdk.Rectangle area)
         {
         }
 
+        public void Invalidate (Gdk.Rectangle area)
+        {
+            area.Offset (Allocation.X, Allocation.Y);
+            OnInvalidate (area);
+        }
+
         public void Invalidate ()
         {
             Invalidate (Allocation);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]