X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FPreviewImage.h;h=bea2553eebcbc2692c0350db0c1eb3495b4f006a;hb=a900667ea1bb516ac562a6c45e4f3a1e4071b01b;hp=3e4bdcd47194d8fa697ebb0b4ad32638c2c5bc0b;hpb=eb36b71ce3b9880a9b577f3db25d16e6a86cd338;p=lyx.git diff --git a/src/graphics/PreviewImage.h b/src/graphics/PreviewImage.h index 3e4bdcd471..bea2553eeb 100644 --- a/src/graphics/PreviewImage.h +++ b/src/graphics/PreviewImage.h @@ -12,12 +12,14 @@ #ifndef PREVIEWIMAGE_H #define PREVIEWIMAGE_H -#include -#include - -class InsetOld; +#include "support/strfwd.h" namespace lyx { + +namespace support { class FileName; } + +class Dimension; + namespace graphics { class PreviewLoader; @@ -30,7 +32,7 @@ public: */ PreviewImage(PreviewLoader & parent, std::string const & latex_snippet, - std::string const & bitmap_file, + support::FileName const & bitmap_file, double ascent_frac); /// ~PreviewImage(); @@ -38,22 +40,22 @@ public: /// 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 const pimpl_; + Impl * const pimpl_; }; } // namespace graphics