]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetert.h
The free_spacing patch and fix to the mess that Rob discovered.
[lyx.git] / src / insets / insetert.h
index a03d9877b93da56cf5afdb06922360409974cbb1..8a9d2a98a2c52adc2635bda3bebb1f0aef8af28f 100644 (file)
@@ -16,8 +16,6 @@
 
 #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
@@ -59,21 +57,15 @@ 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);
        ///
-       void edit(BufferView *, int, int, mouse_button::state);
-       ///
-       void edit(BufferView * bv, bool front = true);
-       ///
        EDITABLE editable() const;
        ///
-       boost::signal0<void> hideDialog;
-       ///
-       int latex(Buffer const *, std::ostream &, bool fragile,
-                 bool free_spc) const;
+       int latex(Buffer const *, std::ostream &,
+                 LatexRunParams const &) const;
        ///
        int ascii(Buffer const *,
                          std::ostream &, int linelen = 0) const;
@@ -107,13 +99,9 @@ public:
        WordLangTuple const
        selectNextWordToSpellcheck(BufferView *, float &) const;
        ///
-       int ascent(BufferView *, LyXFont const &) const;
-       ///
-       int descent(BufferView *, LyXFont const &) const;
+       void dimension(BufferView *, LyXFont const &, Dimension &) const;
        ///
-       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;
        ///
@@ -127,7 +115,7 @@ public:
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
-       void update(BufferView *, LyXFont const &, bool =false);
+       void update(BufferView *, bool =false);
 
 private:
        ///
@@ -155,4 +143,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