Author: rolf
Date: 2007-12-05 04:11:02 -0500 (Wed, 05 Dec 2007)
New Revision: 90736
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/animation.cpp
trunk/moon/src/collection.cpp
trunk/moon/src/dependencyobject.cpp
trunk/moon/src/dependencyobject.h
trunk/moon/src/xaml.cpp
Log:
* xaml.cpp, dependencyobject.h, collection.cpp, dependencyobject.cpp,
animation.cpp: Rename DependencyObject::parent/SetParent/GetParent
to logical_parent/SetLogicalParent/GetLogicalParent.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-12-05 09:09:38 UTC (rev 90735)
+++ trunk/moon/src/ChangeLog 2007-12-05 09:11:02 UTC (rev 90736)
@@ -1,3 +1,9 @@
+2007-12-05 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * xaml.cpp, dependencyobject.h, collection.cpp, dependencyobject.cpp,
+ animation.cpp: Rename DependencyObject::parent/SetParent/GetParent to
+ logical_parent/SetLogicalParent/GetLogicalParent.
+
2007-12-04 Larry Ewing <[EMAIL PROTECTED]>
* media.cpp (Image::Render): fix the conditions for the opacity
Modified: trunk/moon/src/animation.cpp
===================================================================
--- trunk/moon/src/animation.cpp 2007-12-05 09:09:38 UTC (rev 90735)
+++ trunk/moon/src/animation.cpp 2007-12-05 09:11:02 UTC (rev 90736)
@@ -397,7 +397,7 @@
return ((UIElement*)obj)->GetSurface();
}
else {
- obj = obj->GetParent();
+ obj = obj->GetLogicalParent();
return find_surface_recurse (obj);
}
}
Modified: trunk/moon/src/collection.cpp
===================================================================
--- trunk/moon/src/collection.cpp 2007-12-05 09:09:38 UTC (rev 90735)
+++ trunk/moon/src/collection.cpp 2007-12-05 09:11:02 UTC (rev 90736)
@@ -23,7 +23,7 @@
Collection::Node::Node (DependencyObject *dob, DependencyObject *parent)
{
dob->Attach (NULL, parent);
- dob->SetParent (parent);
+ dob->SetLogicalParent (parent);
dob->ref ();
obj = dob;
this->parent = parent;
@@ -32,7 +32,7 @@
Collection::Node::~Node ()
{
obj->Detach (NULL, parent);
- obj->SetParent (NULL);
+ obj->SetLogicalParent (NULL);
obj->unref ();
}
Modified: trunk/moon/src/dependencyobject.cpp
===================================================================
--- trunk/moon/src/dependencyobject.cpp 2007-12-05 09:09:38 UTC (rev 90735)
+++ trunk/moon/src/dependencyobject.cpp 2007-12-05 09:11:02 UTC (rev 90736)
@@ -306,7 +306,7 @@
//printf ("detaching from property %s\n", prop->name);
DependencyObject *obj = v->AsDependencyObject ();
obj->Detach (NULL, this_obj);
- obj->SetParent (NULL);
+ obj->SetLogicalParent (NULL);
}
}
@@ -351,12 +351,12 @@
if (current_value != NULL && current_value->GetKind () >=
Type::DEPENDENCY_OBJECT) {
DependencyObject *current_as_dep =
current_value->AsDependencyObject ();
if (current_as_dep)
- current_as_dep->SetParent (NULL);
+ current_as_dep->SetLogicalParent (NULL);
}
if (value != NULL && value->GetKind () >= Type::DEPENDENCY_OBJECT) {
DependencyObject *new_as_dep = value->AsDependencyObject ();
- new_as_dep->SetParent (this);
+ new_as_dep->SetLogicalParent (this);
}
if ((current_value == NULL && value != NULL) ||
@@ -511,7 +511,7 @@
{
current_values = g_hash_table_new_full (g_direct_hash, g_direct_equal,
NULL, free_value);
this->attached_list = NULL;
- this->parent = NULL;
+ this->logical_parent = NULL;
}
static void
@@ -610,8 +610,8 @@
if (rv)
return rv;
- else if (parent)
- return parent->FindName (name);
+ else if (logical_parent)
+ return logical_parent->FindName (name);
else {
Surface *surface = GetSurface ();
if (surface) {
@@ -632,8 +632,8 @@
if (scope)
return scope;
- if (parent)
- return parent->FindNameScope ();
+ if (logical_parent)
+ return logical_parent->FindNameScope ();
return NULL;
}
@@ -780,32 +780,32 @@
}
void
-DependencyObject::SetParent (DependencyObject *parent)
+DependencyObject::SetLogicalParent (DependencyObject *logical_parent)
{
#if DEBUG
// Check for circular families
- DependencyObject *current = parent;
+ DependencyObject *current = logical_parent;
while (current != NULL) {
g_assert (current != this);
- current = current->GetParent ();
+ current = current->GetLogicalParent ();
}
#endif
- this->parent = parent;
+ this->logical_parent = logical_parent;
}
DependencyObject*
-DependencyObject::GetParent ()
+DependencyObject::GetLogicalParent ()
{
- DependencyObject *res = parent;
+ DependencyObject *res = logical_parent;
while (res && Type::Find (res->GetObjectType ())->IsSubclassOf
(Type::COLLECTION))
- res = res->GetParent ();
+ res = res->GetLogicalParent ();
return res;
}
void
DependencyObject::NotifyParentOfPropertyChange (DependencyProperty *property,
bool only_exact_type)
{
- DependencyObject *current = GetParent ();
+ DependencyObject *current = GetLogicalParent ();
while (current != NULL) {
if (!only_exact_type || property->type ==
current->GetObjectType ()) {
@@ -813,7 +813,7 @@
if (only_exact_type && current->OnChildPropertyChanged
(property, this))
return;
}
- current = current->GetParent ();
+ current = current->GetLogicalParent ();
}
}
Modified: trunk/moon/src/dependencyobject.h
===================================================================
--- trunk/moon/src/dependencyobject.h 2007-12-05 09:09:38 UTC (rev 90735)
+++ trunk/moon/src/dependencyobject.h 2007-12-05 09:11:02 UTC (rev 90736)
@@ -198,8 +198,8 @@
return v ? v->AsString () : NULL;
}
- void SetParent (DependencyObject *parent);
- DependencyObject* GetParent ();
+ void SetLogicalParent (DependencyObject *logical_parent);
+ DependencyObject* GetLogicalParent ();
static void Shutdown ();
@@ -218,7 +218,7 @@
private:
GHashTable *current_values;
GSList *attached_list;
- DependencyObject *parent;
+ DependencyObject *logical_parent;
};
Modified: trunk/moon/src/xaml.cpp
===================================================================
--- trunk/moon/src/xaml.cpp 2007-12-05 09:09:38 UTC (rev 90735)
+++ trunk/moon/src/xaml.cpp 2007-12-05 09:11:02 UTC (rev 90736)
@@ -830,7 +830,7 @@
} else {
DependencyObject *parent = get_parent
(p->current_element);
if (parent) {
- inst->item->SetParent (parent);
+ inst->item->SetLogicalParent (parent);
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches