X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FPreviewImage.h;h=6b5ac7e66cd1d1e0495a0b84a5aa37570fa7adfd;hb=19b840ae23a888300f9a5c03971351b546cce93d;hp=6e9ae3b482fe309070db1bbf711e922eec441e97;hpb=1eb8155fa0d2253d9504a8d660cb3d666c1224f6;p=lyx.git diff --git a/src/graphics/PreviewImage.h b/src/graphics/PreviewImage.h index 6e9ae3b482..6b5ac7e66c 100644 --- a/src/graphics/PreviewImage.h +++ b/src/graphics/PreviewImage.h @@ -1,29 +1,28 @@ // -*- C++ -*- /** - * \file PreviewImage.h + * \file PreviewImage.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Angus Leeming + * \author Angus Leeming * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #ifndef PREVIEWIMAGE_H #define PREVIEWIMAGE_H -#ifdef __GNUG__ -#pragma interface -#endif +#include "support/strfwd.h" -#include "LString.h" -#include +namespace lyx { -class Inset; -class BufferView; +namespace support { class FileName; } -namespace grfx { +class Dimension; +namespace graphics { + +class Cache; class PreviewLoader; class Image; @@ -33,35 +32,34 @@ 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; - /// - int ascent() const; - /// - int descent() const; + std::string const & snippet() const; /// - int width() const; + Dimension dim() const; /** If the image is not yet loaded (WaitingToLoad), then this method * triggers that. - * inset and bv are passed so we can choose to load only - * those insets that are visible. */ - Image const * image(Inset const & inset, BufferView const & bv) const; + 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 grfx +} // namespace graphics +} // namespace lyx #endif // PREVIEWIMAGE_H