]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetenv.h
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetenv.h
index 9eb4db19547e17fcfc70ce978f7af74e790a7b65..c3f78f05c9d80328f07705821a63b9c5d3621215 100644 (file)
 #ifndef INSETENVIRONMENT_H
 #define INSETENVIRONMENT_H
 
-#include "insetcollapsable.h"
+#include "insettext.h"
+#include "lyxlayout_ptr_fwd.h"
 
-
-class InsetEnvironment : public InsetCollapsable {
+class InsetEnvironment : public InsetText {
 public:
        ///
        InsetEnvironment(BufferParams const &, string const & name);
        ///
-       InsetEnvironment(InsetEnvironment const &, bool same_id = false);
+       InsetEnvironment(InsetEnvironment const &);
        ///
        void write(Buffer const * buf, std::ostream & os) const;
        ///
        void read(Buffer const * buf, LyXLex & lex);
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       virtual std::auto_ptr<InsetBase> clone() const;
        ///
-       Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
+       InsetOld::Code lyxCode() const { return InsetOld::ENVIRONMENT_CODE; }
        ///
-       int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
+       int latex(Buffer const *, std::ostream &,
+                 LatexRunParams const &) const;
        ///
        string const editMessage() const;
        ///
+       InsetOld::EDITABLE editable() const { return HIGHLY_EDITABLE; }
+       ///
+       bool isTextInset() const { return true; }
+       ///
+       LyXLayout_ptr const & layout() const;
+       ///
        bool needFullRow() const { return true; }
        /** returns true if, when outputing LaTeX, font changes should
             be closed before generating this inset. This is needed for
@@ -41,10 +48,8 @@ public:
        bool noFontChange() const { return true; }
 
 private:
-       /// LaTeX footer
-       string header_;
-       /// LaTeX footer
-       string footer_;
+       /// the layout
+       LyXLayout_ptr layout_;
 };
 
 #endif