]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/PreviewLoader.h
GuiWorkArea: coding style.
[lyx.git] / src / graphics / PreviewLoader.h
index 84c7295c91522756b774f86fda70a7d093d83753..6910984c9ed13eb77c851ac49ee3bad94403fd4d 100644 (file)
@@ -8,7 +8,7 @@
  *
  * Full author contact details are available in file CREDITS.
  *
- * lyx::graphics::PreviewLoader collects latex snippets together. Then, on a
+ * graphics::PreviewLoader collects latex snippets together. Then, on a
  * startLoading() call, these are dumped to file and processed, converting
  * each snippet to a separate bitmap image file. Once a bitmap file is ready
  * to be loaded back into LyX, the PreviewLoader emits a signal to inform
 #ifndef PREVIEWLOADER_H
 #define PREVIEWLOADER_H
 
-#include <boost/utility.hpp>
-#include <boost/scoped_ptr.hpp>
 #include <boost/signal.hpp>
 
-class Buffer;
+#include "ColorCode.h"
 
 namespace lyx {
+
+class Buffer;
+
 namespace graphics {
 
 class PreviewImage;
 
-class PreviewLoader : boost::noncopyable {
+class PreviewLoader {
 public:
        /** We need buffer because we require the preamble to the
         *  LaTeX file.
@@ -67,7 +68,7 @@ public:
        /** We have accumulated several latex snippets with status "InQueue".
         *  Initiate their transformation into bitmap images.
         */
-       void startLoading() const;
+       void startLoading(bool wait = false) const;
 
        /** Connect and you'll be informed when the bitmap image file
         *  has been created and is ready for loading through
@@ -85,12 +86,20 @@ public:
 
        /// Which buffer owns this loader.
        Buffer const & buffer() const;
+       /// The background color used
+       static ColorCode backgroundColor() { return Color_background; }
+       /// The foreground color used
+       static ColorCode foregroundColor() { return Color_preview; }
 
 private:
+       /// noncopyable
+       PreviewLoader(PreviewLoader const &);
+       void operator=(PreviewLoader const &);
+
        /// 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_;
+       Impl * const pimpl_;
 };
 
 } // namespace graphics