]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbase.h
ws changes only
[lyx.git] / src / insets / insetbase.h
index f12a6af89e78c0d679cb45c5b2818007512a639d..f261618f9b2888024269bfd5c34ead4624e09182 100644 (file)
 #ifndef INSETBASE_H
 #define INSETBASE_H
 
-#include "support/std_string.h"
-
+#include <string>
 #include <vector>
 #include <memory>
 
+class Buffer;
 class BufferView;
 class FuncRequest;
 class MetricsInfo;
@@ -50,6 +50,18 @@ enum dispatch_result {
        DISPATCHED_POP
 };
 
+/** \c DispatchResult is a wrapper for dispatch_result.
+ *  It can be forward-declared and passed as a function argument without
+ *  having to expose insetbase.h.
+ */
+class DispatchResult {
+       dispatch_result val_;
+public:
+       DispatchResult(dispatch_result val) : val_(val) {}
+       operator dispatch_result() const{ return val_; }
+};
+
+
 
 /// Common base class to all insets
 class InsetBase {
@@ -83,14 +95,11 @@ public:
        /// draw inset and update (xo, yo)-cache
        virtual void draw(PainterInfo & pi, int x, int y) const = 0;
 
-       /// Methods to cache and retrieve a cached BufferView.
-       virtual void cache(BufferView *) const {}
-       ///
-       virtual BufferView * view() const { return 0; }
        /// request "external features"
        virtual void validate(LaTeXFeatures &) const {}
-       /// fill in all labels in the inset
-       virtual void getLabelList(std::vector<string> &) const {}
+       /// Appends \c list with all labels found within this inset.
+       virtual void getLabelList(Buffer const &,
+                                 std::vector<std::string> & /* list */) const {}
 };
 
 #endif