]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbase.h
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetbase.h
index ef87a2f966a96d39a5da29541aca3b74fe9c1029..71560de801b6ac08736c9f31e7c2991e2f6be828 100644 (file)
 #ifndef INSETBASE_H
 #define INSETBASE_H
 
+#include "LString.h"
+
 #include <vector>
+#include <memory>
 
 class BufferView;
 class FuncRequest;
 class MetricsInfo;
 class Dimension;
 class PainterInfo;
+class LaTeXFeatures;
 
 /** Dispatch result codes
                DISPATCHED          = the inset catched the action
@@ -63,6 +67,11 @@ public:
        /// type for column numbers
        typedef size_t  col_type;
 
+       /// virtual base class destructor
+       virtual ~InsetBase() {}
+       /// replicate ourselves
+       virtual std::auto_ptr<InsetBase> clone() const = 0;
+
        // the real dispatcher
        virtual dispatch_result dispatch
                (FuncRequest const & cmd, idx_type & idx, pos_type & pos);
@@ -74,13 +83,14 @@ public:
        /// draw inset and update (xo, yo)-cache
        virtual void draw(PainterInfo & pi, int x, int y) const = 0;
 
-       ///
-       virtual ~InsetBase() {}
-
        /// 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 {}
 };
 
 #endif