X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FPreviews.h;h=db666d11bef8322f35304bea04e98b6892d396c8;hb=33243f70037b067f90d1574b74b34f90a2ef2aa1;hp=72b6c0d7c6090aa88e6b4ee0e37b06e3fd93a7b4;hpb=b676c4e77dece2a0642c898e27d76a726a0855f7;p=lyx.git diff --git a/src/graphics/Previews.h b/src/graphics/Previews.h index 72b6c0d7c6..db666d11be 100644 --- a/src/graphics/Previews.h +++ b/src/graphics/Previews.h @@ -1,65 +1,58 @@ // -*- C++ -*- /** - * \file Previews.h - * Copyright 2002 the LyX Team - * Read the file COPYING + * \file Previews.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * \author Angus Leeming + * \author Angus Leeming * - * grfx::Previews is a singleton class that stores the grfx::PreviewLoader - * for each buffer requiring one. + * 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. */ #ifndef PREVIEWS_H #define PREVIEWS_H -#ifdef __GNUG__ -#pragma interface -#endif - -#include "LString.h" #include #include class Buffer; +class LyXRC_PreviewStatus; -namespace grfx { +namespace lyx { +namespace graphics { class PreviewLoader; class Previews : boost::noncopyable { public: /// a wrapper for lyxrc.preview - static bool activated(); + static LyXRC_PreviewStatus status(); /// This is a singleton class. Get the instance. static Previews & get(); /** Returns the PreviewLoader for this buffer. * Used by individual insets to update their own preview. - * We assert that (buffer != 0) but do not pass a Buffer & - * so that insets do not need to #include buffer.h */ - PreviewLoader & loader(Buffer const * buffer); + PreviewLoader & loader(Buffer const & buffer) const; - /** Called from the Buffer d-tor. - * If (buffer == 0), does nothing. - */ - void removeLoader(Buffer const * buffer); + /// Called from the Buffer d-tor. + void removeLoader(Buffer const & buffer) const; /** For a particular buffer, initiate the generation of previews - * for each and every snippetof LaTeX that's of interest with + * for each and every snippet of LaTeX that's of interest with * a single forked process. - * If (buffer == 0), does nothing. */ - void generateBufferPreviews(Buffer const & buffer); + 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. @@ -68,6 +61,7 @@ private: boost::scoped_ptr const pimpl_; }; -} // namespace grfx +} // namespace graphics +} // namespace lyx #endif // PREVIEWS_H