Not so soon, I guess, since that FIXME was from r6305.
[lyx.git] / src / graphics / Previews.h
blob31ba7ed95a578792cecb9c1b21b942349a274d93
1 // -*- C++ -*-
2 /**
3 * \file Previews.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.
11 * graphics::Previews is a singleton class that stores the
12 * graphics::PreviewLoader for each buffer requiring one.
15 #ifndef PREVIEWS_H
16 #define PREVIEWS_H
18 namespace lyx {
20 class Buffer;
21 class LyXRC_PreviewStatus;
23 namespace graphics {
25 class PreviewLoader;
27 class Previews {
28 public:
29 /// This should be a singleton class only instanciated in LyX.cpp.
30 Previews() {}
32 /// a wrapper for lyxrc.preview
33 static LyXRC_PreviewStatus status();
35 /** Returns the PreviewLoader for this buffer.
36 * Used by individual insets to update their own preview.
38 PreviewLoader & loader(Buffer const & buffer) const;
40 /// Called from the Buffer d-tor.
41 void removeLoader(Buffer const & buffer) const;
43 /** For a particular buffer, initiate the generation of previews
44 * for each and every snippet of LaTeX that's of interest with
45 * a single forked process.
47 void generateBufferPreviews(Buffer const & buffer) const;
49 private:
50 /// noncopyable
51 Previews(Previews const &);
52 void operator=(Previews const &);
55 } // namespace graphics
57 /// This is a singleton class. Get the instance.
58 /// Implemented in LyX.cpp.
59 graphics::Previews & thePreviews();
61 } // namespace lyx
63 #endif // PREVIEWS_H