]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inset.h
Enable the external inset to handle unknown templates gracefully.
[lyx.git] / src / insets / inset.h
index 844d9377ab54b8d864755a6cc029bcc6d7111090..29b18c534b0a147aad3009da489eebc0300ec045 100644 (file)
@@ -23,7 +23,6 @@
 #include <vector>
 
 class LyXFont;
-class Dimension;
 class Buffer;
 class Painter;
 class LatexRunParams;
@@ -34,8 +33,7 @@ class LyXCursor;
 class FuncRequest;
 class WordLangTuple;
 class ParagraphList;
-
-struct LaTeXFeatures;
+class UpdatableInset;
 
 namespace grfx {
        class PreviewLoader;
@@ -83,8 +81,6 @@ public:
                ///
                GRAPHICS_CODE,
                ///
-               PARENT_CODE,
-               ///
                BIBITEM_CODE,
                ///
                BIBTEX_CODE,
@@ -194,8 +190,6 @@ public:
        virtual int linuxdoc(Buffer const *, std::ostream &) const = 0;
        ///
        virtual int docbook(Buffer const *, std::ostream &, bool) const = 0;
-       /// Updates needed features for this inset.
-       virtual void validate(LaTeXFeatures & features) const;
 
        /// returns LyX code associated with the inset. Used for TOC, ...)
        virtual Inset::Code lyxCode() const { return NO_CODE; }
@@ -205,7 +199,7 @@ public:
        }
 
        ///
-       virtual Inset * clone(Buffer const &) const = 0;
+       virtual Inset * clone() const = 0;
 
        /// returns true to override begin and end inset in file
        virtual bool directWrite() const;
@@ -223,9 +217,9 @@ public:
        ///
        string const & getInsetName() const { return name_; }
        ///
-       void setOwner(Inset * inset) { owner_ = inset; }
+       void setOwner(UpdatableInset * inset) { owner_ = inset; }
        ///
-       Inset * owner() const { return owner_; }
+       UpdatableInset * owner() const { return owner_; }
        ///
        void parOwner(Paragraph * par) { par_owner_ = par; }
        ///
@@ -349,7 +343,7 @@ protected:
 
 private:
        ///
-       Inset * owner_;
+       UpdatableInset * owner_;
        /// the paragraph in which this inset has been inserted
        Paragraph * par_owner_;
        ///