]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetert.h
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / insetert.h
index 83c929041f6100547c56084c252b3dfb8195c3ff..57c138b3054089b144e0537604145ded4b795079 100644 (file)
 #ifndef INSETERT_H
 #define INSETERT_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "insetcollapsable.h"
 
-#include <boost/signals/signal0.hpp>
-
 /** A collapsable text inset for LaTeX insertions.
 
   To write full ert (including styles and other insets) in a given
@@ -62,7 +57,7 @@ public:
        ///
        bool insertInset(BufferView *, Inset *);
        ///
-       bool insetAllowed(Inset::Code) const { return false; }
+       bool insetAllowed(Inset::Code code) const { return code == Inset::NEWLINE_CODE; }
        ///
        void setFont(BufferView *, LyXFont const &,
                             bool toggleall = false, bool selectall = false);
@@ -73,8 +68,6 @@ public:
        ///
        EDITABLE editable() const;
        ///
-       boost::signal0<void> hideDialog;
-       ///
        int latex(Buffer const *, std::ostream &, bool fragile,
                  bool free_spc) const;
        ///
@@ -116,7 +109,7 @@ public:
        ///
        int width(BufferView *, LyXFont const &) const;
        ///
-       void draw(BufferView *, const LyXFont &, int , float &, bool) const;
+       void draw(BufferView *, const LyXFont &, int , float &) const;
        /// set the status of the inset
        void status(BufferView *, ERTStatus const st) const;
        ///
@@ -158,4 +151,28 @@ private:
        mutable ERTStatus status_;
 };
 
+
+#include "mailinset.h"
+
+class InsetERTMailer : public MailInset {
+public:
+       ///
+       InsetERTMailer(InsetERT & inset);
+       ///
+       virtual InsetBase & inset() const { return inset_; }
+       ///
+       virtual string const & name() const { return name_; }
+       ///
+       virtual string const inset2string() const;
+       ///
+       static void string2params(string const &, InsetERT::ERTStatus &);
+       ///
+       static string const params2string(InsetERT::ERTStatus);
+private:
+       ///
+       static string const name_;
+       ///
+       InsetERT & inset_;
+};
+
 #endif