]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/Previews.h
Correct the mess introduced in r33250.
[lyx.git] / src / graphics / Previews.h
index 1f9430d984679bf99f42331d00c72005175e1fb4..31ba7ed95a578792cecb9c1b21b942349a274d93 100644 (file)
@@ -8,31 +8,29 @@
  *
  * Full author contact details are available in file CREDITS.
  *
- * lyx::graphics::Previews is a singleton class that stores the
- * lyx::graphics::PreviewLoader for each buffer requiring one.
+ * graphics::Previews is a singleton class that stores the
+ * graphics::PreviewLoader for each buffer requiring one.
  */
 
 #ifndef PREVIEWS_H
 #define PREVIEWS_H
 
-#include "LString.h"
-#include <boost/utility.hpp>
-#include <boost/scoped_ptr.hpp>
+namespace lyx {
 
 class Buffer;
+class LyXRC_PreviewStatus;
 
-namespace lyx {
 namespace graphics {
 
 class PreviewLoader;
 
-class Previews : boost::noncopyable {
+class Previews {
 public:
-       /// a wrapper for lyxrc.preview
-       static bool activated();
+       /// This should be a singleton class only instanciated in LyX.cpp.
+       Previews() {}
 
-       /// This is a singleton class. Get the instance.
-       static Previews & get();
+       /// a wrapper for lyxrc.preview
+       static LyXRC_PreviewStatus status();
 
        /** Returns the PreviewLoader for this buffer.
         *  Used by individual insets to update their own preview.
@@ -49,19 +47,17 @@ public:
        void generateBufferPreviews(Buffer const & buffer) const;
 
 private:
-       /** Make the c-tor, d-tor private so we can control how many objects
-        *  are instantiated.
-        */
-       Previews();
-       ~Previews();
-
-       /// Use the Pimpl idiom to hide the internals.
-       class Impl;
-       /// The pointer never changes although *pimpl_'s contents may.
-       boost::scoped_ptr<Impl> const pimpl_;
+       /// noncopyable
+       Previews(Previews const &);
+       void operator=(Previews const &);
 };
 
 } // namespace graphics
+
+/// This is a singleton class. Get the instance.
+/// Implemented in LyX.cpp.
+graphics::Previews & thePreviews();
+
 } // namespace lyx
 
 #endif // PREVIEWS_H