Not so soon, I guess, since that FIXME was from r6305.
[lyx.git] / src / graphics / PreviewImage.h
blob2a112b76a169e1e6818eb699b0de323e4504f4bf
1 // -*- C++ -*-
2 /**
3 * \file PreviewImage.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
12 #ifndef PREVIEWIMAGE_H
13 #define PREVIEWIMAGE_H
15 #include "support/strfwd.h"
17 namespace lyx {
19 namespace support { class FileName; }
21 class Dimension;
23 namespace graphics {
25 class PreviewLoader;
26 class Image;
28 class PreviewImage {
29 public:
30 /** ascent = height * ascent_frac
31 * descent = height * (1 - ascent_frac)
33 PreviewImage(PreviewLoader & parent,
34 std::string const & latex_snippet,
35 support::FileName const & bitmap_file,
36 double ascent_frac);
37 ///
38 ~PreviewImage();
40 ///
41 std::string const & snippet() const;
42 ///
43 Dimension dim() const;
45 /** If the image is not yet loaded (WaitingToLoad), then this method
46 * triggers that.
48 Image const * image() const;
50 private:
51 /// Use the Pimpl idiom to hide the internals.
52 class Impl;
53 /// The pointer never changes although *pimpl_'s contents may.
54 Impl * const pimpl_;
57 } // namespace graphics
58 } // namespace lyx
60 #endif // PREVIEWIMAGE_H