Author: spouliot
Date: 2007-06-06 14:06:15 -0400 (Wed, 06 Jun 2007)
New Revision: 78777

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/runtime.cpp
   trunk/moon/src/runtime.h
   trunk/moon/src/shape.cpp
   trunk/moon/src/shape.h
Log:
2007-06-06  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * shape.cpp|h, runtime.cpp|h: Remove the (now) useless 
        set_prop_from_str methods since everything they handled is now
        moved into DependencyProperty.



Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-06-06 17:55:56 UTC (rev 78776)
+++ trunk/moon/src/ChangeLog    2007-06-06 18:06:15 UTC (rev 78777)
@@ -1,3 +1,9 @@
+2007-06-06  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * shape.cpp|h, runtime.cpp|h: Remove the (now) useless 
+       set_prop_from_str methods since everything they handled is now
+       moved into DependencyProperty.
+
 2007-06-06  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * shape.cpp|h: Use DependencyProperty for Shape Fill and Stroke 

Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp  2007-06-06 17:55:56 UTC (rev 78776)
+++ trunk/moon/src/runtime.cpp  2007-06-06 18:06:15 UTC (rev 78777)
@@ -199,17 +199,6 @@
        item->SetValue (UIElement::RenderTransformProperty, transform);
 }
 
-void
-FrameworkElement::set_prop_from_str (const char *prop, const char *value)
-{
-       if (!g_strcasecmp (prop, "width"))
-               framework_element_set_width (this, strtod (value, NULL));
-       else if (!g_strcasecmp (prop, "height"))
-               framework_element_set_height (this, strtod (value, NULL));
-
-       // FIXME: call UIElement::set_prop_from_str
-}
-
 double
 framework_element_get_height (FrameworkElement *framework_element)
 {
@@ -441,21 +430,6 @@
 }
 
 void
-UIElement::set_prop_from_str (const char *prop, const char *value)
-{
-
-}
-
-/**
- * This is just a temp setup for debugging/demoing
- **/
-void
-Canvas::set_prop_from_str (const char *prop, const char *value)
-{
-
-}
-
-void
 Canvas::render (Surface *s, int x, int y, int width, int height)
 {
        GSList *il;

Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h    2007-06-06 17:55:56 UTC (rev 78776)
+++ trunk/moon/src/runtime.h    2007-06-06 18:06:15 UTC (rev 78777)
@@ -498,12 +498,6 @@
        virtual void getbounds () = 0;
 
        //
-       // set_prop_from_str
-       //  takes a string value for a XAML property name and a string
-       //  representing the value.
-       virtual void set_prop_from_str (const char *pname, const char *vname);
-
-       //
        // get_xform_for
        //   Obtains the affine transform for the given child, this is
        //   implemented by containers
@@ -558,8 +552,6 @@
  public:
        virtual Point getxformorigin () { return Point (0, 0); }
 
-       virtual void set_prop_from_str (const char *pname, const char *vname);
-
        virtual void render (Surface *s, int x, int y, int width, int height);
        virtual void getbounds ();
        virtual void update_xform ();
@@ -583,8 +575,6 @@
        static DependencyProperty* WidthProperty;
 
        FrameworkElement () {} 
-
-       virtual void set_prop_from_str (const char *prop, const char *value);
 };
 
 double framework_element_get_height    (FrameworkElement *framework_element);

Modified: trunk/moon/src/shape.cpp
===================================================================
--- trunk/moon/src/shape.cpp    2007-06-06 17:55:56 UTC (rev 78776)
+++ trunk/moon/src/shape.cpp    2007-06-06 18:06:15 UTC (rev 78777)
@@ -138,21 +138,6 @@
        cairo_new_path (s->cairo);
 }
 
-void
-Shape::set_prop_from_str (const char *prop, const char *value)
-{
-       if (!g_strcasecmp ("fill", prop)) {
-               SolidColorBrush *fill = new SolidColorBrush ();
-               solid_color_brush_set_color (fill, color_from_str (value));
-               shape_set_fill (this, fill);
-       } else if (!g_strcasecmp ("stroke", prop)) {
-               SolidColorBrush *stroke =  new SolidColorBrush ();
-               solid_color_brush_set_color (stroke, color_from_str (value));
-               shape_set_stroke (this, stroke);
-       } else
-               FrameworkElement::set_prop_from_str (prop, value);
-}
-
 Brush*
 shape_get_fill (Shape *shape)
 {
@@ -377,17 +362,6 @@
        cairo_rectangle (s->cairo, 0, 0, w, h);
 }
 
-void
-Rectangle::set_prop_from_str (const char *prop, const char *value)
-{
-       if (!g_strcasecmp (prop, "radiusx"))
-               rectangle_set_radius_x (this, strtod (value, NULL));
-       else if (!g_strcasecmp (prop, "radiusy"))
-               rectangle_set_radius_y (this, strtod (value, NULL));
-       else
-               Shape::set_prop_from_str (prop, value);
-}
-
 Point
 Rectangle::getxformorigin ()
 {
@@ -441,21 +415,6 @@
        cairo_line_to (s->cairo, line_get_x2 (this), line_get_y2 (this));
 }
 
-void
-Line::set_prop_from_str (const char *prop, const char *value)
-{
-       if (!g_strcasecmp (prop, "x1"))
-               line_set_x1 (this, strtod (value, NULL));
-       else if (!g_strcasecmp (prop, "y1"))
-               line_set_y1 (this, strtod (value, NULL));
-       else if (!g_strcasecmp (prop, "x2"))
-               line_set_x2 (this, strtod (value, NULL));
-       else if (!g_strcasecmp (prop, "y2"))
-               line_set_y2 (this, strtod (value, NULL));
-       else
-               Shape::set_prop_from_str (prop, value);
-}
-
 Point
 Line::getxformorigin ()
 {

Modified: trunk/moon/src/shape.h
===================================================================
--- trunk/moon/src/shape.h      2007-06-06 17:55:56 UTC (rev 78776)
+++ trunk/moon/src/shape.h      2007-06-06 18:06:15 UTC (rev 78777)
@@ -56,8 +56,6 @@
        // if they are both set.   It will also be called to compute the 
bounding box.
        //
        virtual void Draw (Surface *s) = 0;
-
-       virtual void set_prop_from_str (const char *prop, const char *value);
 };
 
 Brush          *shape_get_fill                 (Shape *shape);
@@ -105,8 +103,6 @@
 
        void Draw (Surface *s);
 
-       virtual void set_prop_from_str (const char *prop, const char *value);
-
        virtual Point getxformorigin ();
 };
 Rectangle *rectangle_new          ();
@@ -129,8 +125,6 @@
        
        void Draw (Surface *s);
 
-       virtual void set_prop_from_str (const char *prop, const char *value);
-
        virtual Point getxformorigin ();
 };
 Line *line_new  ();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to