Code

Merge and cleanup of GSoC C++-ification project.
[inkscape.git] / src / sp-object-repr.cpp
index aa59fcb911ecf3f14287d60a2293e7d9a2ee38fe..475a57521c3780306c877c6cd5864733803a6150 100644 (file)
@@ -1,10 +1,9 @@
-#define __SP_OBJECT_REPR_C__
-
 /*
  * Object type dictionary and build frontend
  *
  * Authors:
  *   Lauris Kaplinski <lauris@kaplinski.com>
+ *   Abhishek Sharma
  *
  * Copyright (C) 1999-2003 Lauris Kaplinski
  *
@@ -26,7 +25,7 @@
 #include "persp3d.h"
 #include "sp-ellipse.h"
 #include "sp-star.h"
-#include "sp-stop-fns.h"
+#include "sp-stop.h"
 #include "sp-spiral.h"
 #include "sp-offset.h"
 #include "sp-line.h"
 #include "sp-flowdiv.h"
 #include "sp-flowregion.h"
 #include "sp-flowtext.h"
-#include "sp-font.h"
-#include "sp-glyph.h"
-#include "sp-missing-glyph.h"
-#include "sp-glyph-kerning.h"
+#include "sp-script.h"
+#include "config.h"
+
+#ifdef ENABLE_SVG_FONTS
+    #include "sp-font.h"
+    #include "sp-font-face.h"
+    #include "sp-glyph.h"
+    #include "sp-missing-glyph.h"
+    #include "sp-glyph-kerning.h"
+#endif
+
 #include "sp-style-elem.h"
 #include "sp-switch.h"
 #include "color-profile-fns.h"
 #include "xml/repr.h"
 #include "sp-filter.h"
 #include "sp-gaussian-blur.h"
-#include "sp-feblend.h"
-#include "sp-fecolormatrix.h"
-#include "sp-fecomponenttransfer.h"
-#include "sp-fecomponenttransfer-funcnode.h"
-#include "sp-fecomposite.h"
-#include "sp-feconvolvematrix.h"
-#include "sp-fediffuselighting.h"
-#include "sp-fedistantlight.h"
-#include "sp-fedisplacementmap.h"
-#include "sp-feflood.h"
-#include "sp-feimage.h"
-#include "sp-femerge.h"
-#include "sp-femorphology.h"
-#include "sp-feoffset.h"
-#include "sp-fepointlight.h"
-#include "sp-fespecularlighting.h"
-#include "sp-fespotlight.h"
-#include "sp-fetile.h"
-#include "sp-feturbulence.h"
-#include "sp-femergenode.h"
+#include "filters/blend.h"
+#include "filters/colormatrix.h"
+#include "filters/componenttransfer.h"
+#include "filters/componenttransfer-funcnode.h"
+#include "filters/composite.h"
+#include "filters/convolvematrix.h"
+#include "filters/diffuselighting.h"
+#include "filters/distantlight.h"
+#include "filters/displacementmap.h"
+#include "filters/flood.h"
+#include "filters/image.h"
+#include "filters/merge.h"
+#include "filters/morphology.h"
+#include "filters/offset.h"
+#include "filters/pointlight.h"
+#include "filters/specularlighting.h"
+#include "filters/spotlight.h"
+#include "filters/tile.h"
+#include "filters/turbulence.h"
+#include "filters/mergenode.h"
 #include "live_effects/lpeobject.h"
+#include "sp-title.h"
+#include "sp-desc.h"
 
 
 enum NameType { REPR_NAME, SODIPODI_TYPE };
@@ -98,7 +106,7 @@ sp_object_repr_build_tree(SPDocument *document, Inkscape::XML::Node *repr)
     g_assert(newobj != NULL);
     SPObject *const object = SP_OBJECT(newobj);
     g_assert(object != NULL);
-    sp_object_invoke_build(object, document, repr, FALSE);
+    object->invoke_build(document, repr, FALSE);
 
     return object;
 }
@@ -131,6 +139,7 @@ populate_dtables()
         { "svg:color-profile", COLORPROFILE_TYPE },
         { "svg:clipPath", SP_TYPE_CLIPPATH },
         { "svg:defs", SP_TYPE_DEFS },
+        { "svg:desc", SP_TYPE_DESC },
         { "svg:ellipse", SP_TYPE_ELLIPSE },
         { "svg:filter", SP_TYPE_FILTER },
         /* Note: flow* elements are proposed additions for SVG 1.2, they aren't in
@@ -143,11 +152,14 @@ populate_dtables()
         { "svg:flowRegionExclude", SP_TYPE_FLOWREGIONEXCLUDE },
         { "svg:flowRoot", SP_TYPE_FLOWTEXT },
         { "svg:flowSpan", SP_TYPE_FLOWTSPAN },
+#ifdef ENABLE_SVG_FONTS
         { "svg:font", SP_TYPE_FONT },
+        { "svg:font-face", SP_TYPE_FONTFACE },
         { "svg:glyph", SP_TYPE_GLYPH },
         { "svg:missing-glyph", SP_TYPE_MISSING_GLYPH },
         { "svg:hkern", SP_TYPE_HKERN },
         { "svg:vkern", SP_TYPE_VKERN },
+#endif
         { "svg:g", SP_TYPE_GROUP },
         { "svg:feBlend", SP_TYPE_FEBLEND },
         { "svg:feColorMatrix", SP_TYPE_FECOLORMATRIX },
@@ -186,12 +198,14 @@ populate_dtables()
         { "svg:radialGradient", SP_TYPE_RADIALGRADIENT },
         { "svg:rect", SP_TYPE_RECT },
         { "svg:stop", SP_TYPE_STOP },
+        { "svg:script", SP_TYPE_SCRIPT },
         { "svg:svg", SP_TYPE_ROOT },
         { "svg:style", SP_TYPE_STYLE_ELEM },
         { "svg:switch", SP_TYPE_SWITCH },
         { "svg:symbol", SP_TYPE_SYMBOL },
         { "svg:text", SP_TYPE_TEXT },
         { "svg:textPath", SP_TYPE_TEXTPATH },
+        { "svg:title", SP_TYPE_TITLE },
         { "svg:tref", SP_TYPE_TREF },
         { "svg:tspan", SP_TYPE_TSPAN },
         { "svg:use", SP_TYPE_USE },
@@ -275,4 +289,4 @@ sp_object_type_register(gchar const *name, GType const gtype)
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :