Author: jackson
Date: 2007-06-06 19:15:56 -0400 (Wed, 06 Jun 2007)
New Revision: 78793
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/geometry.cpp
trunk/moon/src/runtime.cpp
trunk/moon/src/runtime.h
trunk/moon/src/transform.h
Log:
* runtime.h:
* transform.h: Need to register this base DependencyObject for
* the
xaml parser.
* geometry.cpp: use correct value kind for registering
* properties
* runtime.cpp: Don't be strict about the type with properties
* that
derive from DependencyObject, we can't be too strict here,
because
of inheritance the registered type BRUSH could be set to
SOLIDCOLORBRUSH
- register some properties with the correct type
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-06-06 23:08:13 UTC (rev 78792)
+++ trunk/moon/src/ChangeLog 2007-06-06 23:15:56 UTC (rev 78793)
@@ -1,5 +1,17 @@
2007-06-06 Jackson Harper <[EMAIL PROTECTED]>
+ * runtime.h:
+ * transform.h: Need to register this base DependencyObject for the
+ xaml parser.
+ * geometry.cpp: use correct value kind for registering properties
+ * runtime.cpp: Don't be strict about the type with properties that
+ derive from DependencyObject, we can't be too strict here, because
+ of inheritance the registered type BRUSH could be set to
+ SOLIDCOLORBRUSH
+ - register some properties with the correct type
+
+2007-06-06 Jackson Harper <[EMAIL PROTECTED]>
+
* animation.cpp|h:
* runtime.h: Staring to add triggers
* shape.cpp: Use brush as our property kind
Modified: trunk/moon/src/geometry.cpp
===================================================================
--- trunk/moon/src/geometry.cpp 2007-06-06 23:08:13 UTC (rev 78792)
+++ trunk/moon/src/geometry.cpp 2007-06-06 23:15:56 UTC (rev 78793)
@@ -434,7 +434,7 @@
{
/* Geometry fields */
Geometry::FillRuleProperty = DependencyObject::Register
(Value::GEOMETRY, "FillRule", new Value (FillRuleEvenOdd));
- Geometry::TransformProperty = DependencyObject::Register
(Value::GEOMETRY, "Transform", Value::DEPENDENCY_OBJECT);
+ Geometry::TransformProperty = DependencyObject::Register
(Value::GEOMETRY, "Transform", Value::TRANSFORM);
/* GeometryGroup fields */
GeometryGroup::ChildrenProperty = DependencyObject::Register
(Value::GEOMETRYGROUP, "Children", Value::DEPENDENCY_OBJECT);
Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp 2007-06-06 23:08:13 UTC (rev 78792)
+++ trunk/moon/src/runtime.cpp 2007-06-06 23:15:56 UTC (rev 78793)
@@ -548,8 +548,10 @@
DependencyObject::SetValue (DependencyProperty *property, Value value)
{
g_return_if_fail (property != NULL);
- g_return_if_fail (property->value_type == value.k);
+ if (property->value_type < Value::DEPENDENCY_OBJECT)
+ g_return_if_fail (property->value_type == value.k);
+
Value *current_value = (Value*)g_hash_table_lookup (current_values,
property->name);
if (current_value == NULL || *current_value != value.k) {
@@ -559,7 +561,7 @@
if (value.k == Value::STRING)
copy->u.s = g_strdup (value.u.s);
- if (current_value != NULL && current_value->k ==
Value::DEPENDENCY_OBJECT){
+ if (current_value != NULL && current_value->k >=
Value::DEPENDENCY_OBJECT){
DependencyObject *dob =
current_value->u.dependency_object;
for (GSList *l = dob->attached_list; l; l = l->next) {
@@ -572,7 +574,7 @@
}
}
- if (value.k == Value::DEPENDENCY_OBJECT){
+ if (value.k >= Value::DEPENDENCY_OBJECT){
DependencyObject *dob = value.u.dependency_object;
Attachee *att = new Attachee ();
att->dob = this;
@@ -857,7 +859,7 @@
namescope_init ()
{
global_NameScope = new NameScope ();
- NameScope::NameScopeProperty = DependencyObject::Register
(Value::NAMESCOPE, "NameScope", Value::DEPENDENCY_OBJECT);
+ NameScope::NameScopeProperty = DependencyObject::Register
(Value::NAMESCOPE, "NameScope", Value::NAMESCOPE);
}
DependencyProperty* FrameworkElement::HeightProperty;
@@ -885,7 +887,7 @@
void
item_init ()
{
- UIElement::RenderTransformProperty = DependencyObject::Register
(Value::UIELEMENT, "RenderTransform", Value::DEPENDENCY_OBJECT);
+ UIElement::RenderTransformProperty = DependencyObject::Register
(Value::UIELEMENT, "RenderTransform", Value::TRANSFORM);
}
void
Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h 2007-06-06 23:08:13 UTC (rev 78792)
+++ trunk/moon/src/runtime.h 2007-06-06 23:15:56 UTC (rev 78793)
@@ -168,6 +168,7 @@
PANEL,
CANVAS,
TIMELINE,
+ TRANSFORM,
ROTATETRANSFORM,
SCALETRANSFORM,
TRANSLATETRANSFORM,
Modified: trunk/moon/src/transform.h
===================================================================
--- trunk/moon/src/transform.h 2007-06-06 23:08:13 UTC (rev 78792)
+++ trunk/moon/src/transform.h 2007-06-06 23:15:56 UTC (rev 78793)
@@ -9,7 +9,7 @@
class Transform : public DependencyObject {
protected:
- Transform () { }
+ Transform () { SetObjectType (Value::TRANSFORM); }
public:
virtual void OnPropertyChanged (DependencyProperty *prop);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches