[hyena] implement geo primitives, more canvas logic
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] implement geo primitives, more canvas logic
- Date: Wed, 26 May 2010 02:32:30 +0000 (UTC)
commit e73abf361cb942e5c68f587aa13bcdf1e441afa1
Author: Aaron Bockover <abockover novell com>
Date: Sun Jan 24 00:43:53 2010 -0500
implement geo primitives, more canvas logic
This is another big refactor going forward with the new data view.
We've got tons of mixed int/double/gdk/cairo code, and I'm tired of
it. There are cases where we need the precision of Cairo (double)
but the flexibility of Gdk (int) rectangle classes for instance.
As the grid progresses to essentially a canvas API, and will continue
to do so, modeled after the lovely Silverlight layout system, I've
implemented our own geometry primitives and ported the data view
parts to use these primitives:
- Point
- Rect
- Size
- Thickness
These provide similar API as Silverlight, with a few additions pulled
in from managed GDK.
Additionally, the album item has been further simplified by implementing
full Measure, Arrange, and Render support.
Finally, data binding has been moved into the layout itself, since
data binding should (and now does) occur during the arrange phase,
not the render phase.
src/Hyena/Hyena.Data/BaseListModel.cs | 5 +++++
src/Hyena/Hyena.Data/IListModel.cs | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/Hyena/Hyena.Data/BaseListModel.cs b/src/Hyena/Hyena.Data/BaseListModel.cs
index 9694784..221ec4e 100644
--- a/src/Hyena/Hyena.Data/BaseListModel.cs
+++ b/src/Hyena/Hyena.Data/BaseListModel.cs
@@ -73,6 +73,11 @@ namespace Hyena.Data
public abstract int Count { get; }
+ public virtual object GetItem (int index)
+ {
+ return this[index];
+ }
+
public virtual Selection Selection {
get { return selection; }
}
diff --git a/src/Hyena/Hyena.Data/IListModel.cs b/src/Hyena/Hyena.Data/IListModel.cs
index 3bb8629..1d0a773 100644
--- a/src/Hyena/Hyena.Data/IListModel.cs
+++ b/src/Hyena/Hyena.Data/IListModel.cs
@@ -42,6 +42,8 @@ namespace Hyena.Data
int Count { get; }
bool CanReorder { get; }
+
+ object GetItem (int index);
}
public interface IListModel<T> : IListModel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]