Code

Added missing (and very important) file.
[inkscape.git] / src / extension / implementation / implementation.h
index ca4f120699195f7b735440b5d3bbec44f7246b63..9de70dce76ca536fa9b4e8ecd0caa793bd554425 100644 (file)
@@ -1,6 +1,6 @@
 /*
     Author:  Ted Gould <ted@gould.cx>
-    Copyright (c) 2003-2005
+    Copyright (c) 2003-2005,2007
 
     This code is licensed under the GNU GPL.  See COPYING for details.
  
@@ -21,6 +21,7 @@
 #include "libnr/nr-forward.h"
 #include "libnr/nr-point.h"
 #include "xml/node.h"
+#include <2geom/forward.h>
 
 namespace Inkscape {
 namespace Extension {
@@ -29,14 +30,15 @@ namespace Implementation {
 /** \brief  A cache for the document and this implementation */
 class ImplementationDocumentCache {
        /** \brief  The document that this instance is working on */
-       SPDocument * _doc;
+       Inkscape::UI::View::View * _view;
 public:
-       ImplementationDocumentCache (SPDocument * doc) :
-                       _doc(doc)
+       ImplementationDocumentCache (Inkscape::UI::View::View * view) :
+                       _view(view)
        {
                return;
        };
        virtual ~ImplementationDocumentCache ( ) { return; };
+       Inkscape::UI::View::View const * view ( ) { return _view; };
 };
 
 /**
@@ -55,7 +57,7 @@ public:
     virtual bool load(Inkscape::Extension::Extension *module);
 
     virtual void unload(Inkscape::Extension::Extension *module);
-       ImplementationDocumentCache * newDocCache (SPDocument * doc);
+       virtual ImplementationDocumentCache * newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::View * doc);
 
     /** Verify any dependencies. */
     virtual bool check(Inkscape::Extension::Extension *module);
@@ -73,8 +75,8 @@ public:
 
     /* ----- Output functions ----- */
     /** Find out information about the file. */
-    virtual Gtk::Widget *prefs_output(Inkscape::Extension::Output *module, ImplementationDocumentCache * docCache);
-    virtual void save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *filename, ImplementationDocumentCache * docCache);
+    virtual Gtk::Widget *prefs_output(Inkscape::Extension::Output *module);
+    virtual void save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *filename);
 
     /* ----- Effect functions ----- */
     /** Find out information about the file. */
@@ -98,20 +100,20 @@ public:
 
     /* ----- Rendering methods ----- */
     virtual unsigned bind(Inkscape::Extension::Print *module,
-                          NRMatrix const *transform,
+                          Geom::Matrix const *transform,
                           float opacity);
     virtual unsigned release(Inkscape::Extension::Print *module);
     virtual unsigned comment(Inkscape::Extension::Print *module, const char * comment);
     virtual unsigned fill(Inkscape::Extension::Print *module,
-                          NRBPath const *bpath,
-                          NRMatrix const *ctm,
+                          Geom::PathVector const &pathv,
+                          Geom::Matrix const *ctm,
                           SPStyle const *style,
                           NRRect const *pbox,
                           NRRect const *dbox,
                           NRRect const *bbox);
     virtual unsigned stroke(Inkscape::Extension::Print *module,
-                            NRBPath const *bpath,
-                            NRMatrix const *transform,
+                            Geom::PathVector const &pathv,
+                            Geom::Matrix const *transform,
                             SPStyle const *style,
                             NRRect const *pbox,
                             NRRect const *dbox,
@@ -121,11 +123,11 @@ public:
                            unsigned int w,
                            unsigned int h,
                            unsigned int rs,
-                           NRMatrix const *transform,
+                           Geom::Matrix const *transform,
                            SPStyle const *style);
     virtual unsigned text(Inkscape::Extension::Print *module,
                           char const *text,
-                          NR::Point p,
+                          Geom::Point p,
                           SPStyle const *style);
     virtual void     processPath(Inkscape::XML::Node * node);
 };