]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/PreviewImage.h
#9376 prepare use of Length in lyxrc - move the class Length to support
[lyx.git] / src / graphics / PreviewImage.h
index 1289fde12f12cc841cdcfdde55bcd76ec8dfebd6..6b5ac7e66cd1d1e0495a0b84a5aa37570fa7adfd 100644 (file)
 #ifndef PREVIEWIMAGE_H
 #define PREVIEWIMAGE_H
 
-#include "support/std_string.h"
-#include <boost/scoped_ptr.hpp>
-
-class InsetOld;
+#include "support/strfwd.h"
 
 namespace lyx {
+
+namespace support { class FileName; }
+
+class Dimension;
+
 namespace graphics {
 
+class Cache;
 class PreviewLoader;
 class Image;
 
@@ -29,31 +32,31 @@ public:
         *  descent = height * (1 - ascent_frac)
         */
        PreviewImage(PreviewLoader & parent,
-                    string const & latex_snippet,
-                    string const & bitmap_file,
+                    std::string const & latex_snippet,
+                    support::FileName const & bitmap_file,
                     double ascent_frac);
        ///
        ~PreviewImage();
 
        ///
-       string const & snippet() const;
+       std::string const & snippet() const;
        ///
-       int ascent() const;
-       ///
-       int descent() const;
-       ///
-       int width() const;
+       Dimension dim() const;
 
        /** If the image is not yet loaded (WaitingToLoad), then this method
         *  triggers that.
         */
        Image const * image() const;
+       ///
+       support::FileName const & filename() const;
+
+       PreviewLoader & previewLoader() const;
 
 private:
        /// Use the Pimpl idiom to hide the internals.
        class Impl;
        /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       Impl * const pimpl_;
 };
 
 } // namespace graphics