]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsImage.h
Remove obsolete (and false) comment.
[lyx.git] / src / graphics / GraphicsImage.h
index 08dfd40391ac9d18ef432c9088628a84f0eaee9a..6722b87bc03f20637a8450dd7732b58ae5d5c69b 100644 (file)
 #ifndef GRAPHICSIMAGE_H
 #define GRAPHICSIMAGE_H
 
-#include "Dimension.h"
-
-#include <boost/function.hpp>
-#include <boost/signal.hpp>
-
-#include <vector>
-
 namespace lyx {
 
 namespace support { class FileName; }
@@ -41,16 +34,6 @@ class Params;
 
 class Image {
 public:
-       /** This is to be connected to a function that will return a new
-        *  instance of a viable derived class.
-        */
-       static boost::function<Image *()> newImage;
-
-       ///
-       typedef std::vector<std::string> FormatList;
-       /// Return the list of loadable formats.
-       static boost::function<FormatList()> loadableFormats;
-
        ///
        virtual ~Image() {}
 
@@ -66,47 +49,22 @@ public:
        /// Is the image drawable ?
        virtual bool isDrawable() const = 0;
 
-       /** At the end of the loading process inform the outside world
-        *  by emitting a signal
-        */
-       typedef boost::signal<void(bool)> SignalType;
-       ///
-       SignalType finishedLoading;
-
        /** Start loading the image file.
         *  The caller should expect this process to be asynchronous and
         *  so should connect to the "finished" signal above.
         */
-       virtual void load(support::FileName const & filename) = 0;
+       virtual bool load(support::FileName const & filename) = 0;
 
        /** Generate the pixmap.
         *  Uses the params to decide on color, grayscale etc.
         *  Returns true if the pixmap is created.
         */
        virtual bool setPixmap(Params const & params) = 0;
-
-       /// Clip the image using params.
-       virtual void clip(Params const & params) = 0;
-
-       /// Rotate the image using params.
-       virtual void rotate(Params const & params) = 0;
-
-       /// Scale the image using params.
-       virtual void scale(Params const & params) = 0;
-
-protected:
-       /// Must define default c-tor explicitly as we define a copy c-tor.
-       Image() {}
-       /// Don't copy the signal finishedLoading
-       Image(Image const &) {}
-
-       /** Uses the params to ascertain the dimensions of the scaled image.
-        *  Returned as Dimension(width, height, 0 descend).
-        *  If something goes wrong, returns make_pair(getWidth(), getHeight(), 0)
-        */
-       Dimension scaledDimension(Params const & params) const;
 };
 
+/// Only way to create a new Image.
+/// Implemented in the frontend.
+Image * newImage();
 
 } // namespace graphics
 } // namespace lyx