Author: jackson
Date: 2007-11-09 10:25:53 -0500 (Fri, 09 Nov 2007)
New Revision: 89321
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/type.cpp
trunk/moon/src/type.cpp.in
trunk/moon/src/type.h
trunk/moon/src/type.h.in
Log:
* type.cpp|h.in: Add an accesor for the ContentProperty name.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-11-09 15:15:45 UTC (rev 89320)
+++ trunk/moon/src/ChangeLog 2007-11-09 15:25:53 UTC (rev 89321)
@@ -1,5 +1,9 @@
2007-11-09 Jackson Harper <[EMAIL PROTECTED]>
+ * type.cpp|h.in: Add an accesor for the ContentProperty name.
+
+2007-11-09 Jackson Harper <[EMAIL PROTECTED]>
+
* xaml.cpp: Rework to allow unparented properties. createFromXaml
("<Canvas.Background><SolidColorBrush></Canvas.Background") will
basically ignore the property and will return the SolidColorBrush
Modified: trunk/moon/src/type.cpp
===================================================================
--- trunk/moon/src/type.cpp 2007-11-09 15:15:45 UTC (rev 89320)
+++ trunk/moon/src/type.cpp 2007-11-09 15:25:53 UTC (rev 89321)
@@ -226,6 +226,18 @@
return create_inst ();
}
+const char *
+Type::GetContentPropertyName ()
+{
+ if (content_property)
+ return content_property;
+
+ if (parent == Type::INVALID)
+ return NULL;
+
+ return Find (parent)->GetContentPropertyName ();
+}
+
void
Type::Shutdown ()
{
Modified: trunk/moon/src/type.cpp.in
===================================================================
--- trunk/moon/src/type.cpp.in 2007-11-09 15:15:45 UTC (rev 89320)
+++ trunk/moon/src/type.cpp.in 2007-11-09 15:25:53 UTC (rev 89321)
@@ -221,6 +221,18 @@
return create_inst ();
}
+const char *
+Type::GetContentPropertyName ()
+{
+ if (content_property)
+ return content_property;
+
+ if (parent == Type::INVALID)
+ return NULL;
+
+ return Find (parent)->GetContentPropertyName ();
+}
+
void
Type::Shutdown ()
{
Modified: trunk/moon/src/type.h
===================================================================
--- trunk/moon/src/type.h 2007-11-09 15:15:45 UTC (rev 89320)
+++ trunk/moon/src/type.h 2007-11-09 15:25:53 UTC (rev 89321)
@@ -185,7 +185,6 @@
Type::Kind parent;
Type::Kind type;
char *name;
- const char *content_property;
bool value_type;
void RegisterEvent (const char *event_name);
@@ -194,6 +193,7 @@
int GetEventBase ();
DependencyObject *CreateInstance ();
+ const char *GetContentPropertyName ();
static void Shutdown ();
private:
@@ -207,6 +207,7 @@
int local_event_count;
int type_event_count; /* local_event_base + local_event_count */
create_inst_func *create_inst;
+ const char *content_property;
};
G_BEGIN_DECLS
Modified: trunk/moon/src/type.h.in
===================================================================
--- trunk/moon/src/type.h.in 2007-11-09 15:15:45 UTC (rev 89320)
+++ trunk/moon/src/type.h.in 2007-11-09 15:25:53 UTC (rev 89321)
@@ -67,7 +67,6 @@
Type::Kind parent;
Type::Kind type;
char *name;
- const char *content_property;
bool value_type;
void RegisterEvent (const char *event_name);
@@ -76,6 +75,7 @@
int GetEventBase ();
DependencyObject *CreateInstance ();
+ const char *GetContentPropertyName ();
static void Shutdown ();
private:
@@ -89,6 +89,7 @@
int local_event_count;
int type_event_count; /* local_event_base + local_event_count */
create_inst_func *create_inst;
+ const char *content_property;
};
G_BEGIN_DECLS
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches