summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df5a7a1)
raw | patch | inline | side by side (parent: df5a7a1)
author | gouldtj <gouldtj@users.sourceforge.net> | |
Tue, 30 Oct 2007 19:29:49 +0000 (19:29 +0000) | ||
committer | gouldtj <gouldtj@users.sourceforge.net> | |
Tue, 30 Oct 2007 19:29:49 +0000 (19:29 +0000) |
Wow, that wasn't as hard as I thought it would be. Changing away from SPDocument. Sounded like a good idea, but we
need to be able to get selections in the document cache.
need to be able to get selections in the document cache.
index f7caf125d8b93d5d0f3739d0ee568b04ebd2f599..2c1c832ae4085fc12a174e1bfb60d19fa44ed3e9 100644 (file)
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
sigc::signal<void> * changeSignal = new sigc::signal<void>;
Gtk::Widget * controls;
- SPDesktop * spdesktop = (SPDesktop *)doc;
- Implementation::ImplementationDocumentCache * docCache = imp->newDocCache(this, spdesktop->doc());
+ Implementation::ImplementationDocumentCache * docCache = imp->newDocCache(this, doc);
controls = imp->prefs_effect(this, doc, changeSignal, docCache);
ExecutionEnv executionEnv(this, doc, controls, changeSignal, NULL, docCache);
index 21df42b9dd023dead7a1ec5a7747237b19c93699..0dbb32b11c4a23fbd92164c1c40726a8cedce9ea 100644 (file)
ExecutionEnv::genDocCache (void) {
if (_docCache == NULL) {
printf("Gen Doc Cache\n");
- SPDesktop * spdesktop = (SPDesktop *)_doc;
- Implementation::ImplementationDocumentCache * _docCache = _effect->get_imp()->newDocCache(_effect, spdesktop->doc());
+ Implementation::ImplementationDocumentCache * _docCache = _effect->get_imp()->newDocCache(_effect, _doc);
}
return;
}
diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp
index acec99041de7a9faf9d9f58d4c2aa56289d731b3..9ad60fef21ba6f8557204228cc59941782d15dd1 100644 (file)
/*
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.
to reimplement it to do something useful.
*/
ImplementationDocumentCache *
-Implementation::newDocCache (Inkscape::Extension::Extension * ext, SPDocument * doc) {
+Implementation::newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::View * view) {
return NULL;
}
diff --git a/src/extension/implementation/implementation.h b/src/extension/implementation/implementation.h
index bd380c07eaf2cbb8ea8e9208c6052c917da1be70..ad1bbf1d2fff70f3364ec21d65b94fa24fb20083 100644 (file)
/*
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.
/** \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; };
- SPDocument const * doc ( ) { return _doc; };
+ Inkscape::UI::View::View const * view ( ) { return _view; };
};
/**
virtual bool load(Inkscape::Extension::Extension *module);
virtual void unload(Inkscape::Extension::Extension *module);
- ImplementationDocumentCache * newDocCache (Inkscape::Extension::Extension * ext, SPDocument * doc);
+ ImplementationDocumentCache * newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::View * doc);
/** Verify any dependencies. */
virtual bool check(Inkscape::Extension::Extension *module);
diff --git a/src/extension/internal/bitmap/imagemagick.h b/src/extension/internal/bitmap/imagemagick.h
index 3060ddd33f6c3ce6950f56428ff378ad6d3d2528..1fb79f826e4d0be1b09319c264bacb4c698937a8 100644 (file)
class ImageMagickDocCache: public Inkscape::Extension::Implementation::ImplementationDocumentCache {
public:
- ImageMagickDocCache(SPDocument * doc) : Inkscape::Extension::Implementation::ImplementationDocumentCache(doc) { };
+ ImageMagickDocCache(Inkscape::UI::View::View * view) : Inkscape::Extension::Implementation::ImplementationDocumentCache(view) { };
~ImageMagickDocCache ( ) { };
};