4 * Copyright 2002 the LyX Team
5 * Read the file COPYING
7 * \author Angus Leeming <leeming@lyx.org>
10 #ifndef PREVIEWIMAGE_H
11 #define PREVIEWIMAGE_H
18 #include <boost/scoped_ptr.hpp>
30 /** ascent = height * ascent_frac
31 * descent = height * (1 - ascent_frac)
33 PreviewImage(PreviewLoader & parent,
34 string const & latex_snippet,
35 string const & bitmap_file,
41 string const & snippet() const;
49 /** If the image is not yet loaded (WaitingToLoad), then this method
51 * inset and bv are passed so we can choose to load only
52 * those insets that are visible.
54 Image const * image(Inset const & inset, BufferView const & bv) const;
57 /// Use the Pimpl idiom to hide the internals.
59 /// The pointer never changes although *pimpl_'s contents may.
60 boost::scoped_ptr<Impl> const pimpl_;
65 #endif // PREVIEWIMAGE_H