X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FPreviewImage.h;h=6ec29a36badd1dbb3b84b009d59e12967f9c17a3;hb=4c3e5463752eb90fe5e69716fcbd7ea2ccc92bcd;hp=67b67ed856cb84472f32dfc53201637bfcce3e38;hpb=f68a2bfb915bf590b9dd11061750b7922e5c1deb;p=lyx.git diff --git a/src/graphics/PreviewImage.h b/src/graphics/PreviewImage.h index 67b67ed856..6ec29a36ba 100644 --- a/src/graphics/PreviewImage.h +++ b/src/graphics/PreviewImage.h @@ -1,23 +1,24 @@ // -*- C++ -*- /** - * \file PreviewImage.h - * Copyright 2002 the LyX Team - * Read the file COPYING + * \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. */ #ifndef PREVIEWIMAGE_H #define PREVIEWIMAGE_H -#ifdef __GNUG__ -#pragma interface -#endif +#include "support/strfwd.h" + +namespace lyx { -#include "LString.h" -#include +namespace support { class FileName; } -namespace grfx { +namespace graphics { class PreviewLoader; class Image; @@ -28,33 +29,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(); - /// We are explicit about when we begin the loading process. - void startLoading(); - /// - string const & snippet() const; + std::string const & snippet() const; /// int ascent() const; /// int descent() const; /// int width() const; - /// + + /** If the image is not yet loaded (WaitingToLoad), then this method + * triggers that. + */ Image const * image() 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