]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsCacheItem.h
Store an InsetBase & in MailInset.
[lyx.git] / src / graphics / GraphicsCacheItem.h
index bb25b408e1ddb35c608512d7edda24e933362f44..3e8755fcaad7b6391d3eb21dfe373283a2dd04cb 100644 (file)
@@ -1,14 +1,16 @@
 // -*- C++ -*-
-/*
+/**
  * \file GraphicsCacheItem.h
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Baruch Even <baruch.even@writeme.com>
- * \author Angus Leeming <leeming@lyx.org>
+ * \author Baruch Even
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS
  *
  * The graphics cache is a container of grfx::CacheItems.
- * Each grfx::CacheItem, definedhere represents a separate image file.
+ * Each grfx::CacheItem, defined here represents a separate image file.
  *
  * The routines here can be used to load the graphics file into memory at
  * which point (status() == grfx::Loaded).
 #ifndef GRAPHICSCACHEITEM_H
 #define GRAPHICSCACHEITEM_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
 #include "GraphicsTypes.h"
 #include "LString.h"
 
@@ -57,9 +55,22 @@ public:
        string const & filename() const;
 
        /// It's in the cache. Now start the loading process.
-       void startLoading();
+       void startLoading() const;
+
+       /** Monitor any changes to the file.
+        *  There is no point monitoring the file before startLoading() is
+        *  invoked.
+        */
+       void startMonitoring() const;
+       ///
+       bool monitoring() const;
+       /** Returns the check sum of filename() so that, for example, you can
+        *  ascertain whether to output a new PostScript version of the file
+        *  for a LaTeX run.
+        */
+       unsigned long checksum() const;
 
-       /** Get the image associated with filename_.
+       /** Get the image associated with filename().
         *  If the image is not yet loaded, returns 0.
         *  This routine returns a pointer to const; if you want to modify it,
         *  create a copy and modify that.
@@ -69,8 +80,12 @@ public:
        /// How far have we got in loading the image?
        ImageStatus status() const;
 
-       /// This signal is emitted when the image loading status changes.
-       boost::signal0<void> statusChanged;
+       /** Connect and you'll be informed when the loading status of the image
+        *  changes.
+        */
+       typedef boost::signal0<void>::slot_type slot_type;
+       ///
+       boost::signals::connection connect(slot_type const &) const;
 
 private:
        /// Use the Pimpl idiom to hide the internals.