]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetERT.h
Move isMultiCell() to Cursor, and use it.
[lyx.git] / src / insets / InsetERT.h
index 176c412fd99c1eb8dc05b4aa0a20589c2f96c031..82afa62cee35af76091b0a9d5e7c3e23f59eb733 100644 (file)
@@ -14,7 +14,6 @@
 #define INSETERT_H
 
 #include "InsetCollapsable.h"
-#include "MailInset.h"
 
 
 namespace lyx {
@@ -33,14 +32,14 @@ class Language;
 class InsetERT : public InsetCollapsable {
 public:
        ///
-       InsetERT(BufferParams const &, CollapseStatus status = Open);
-#if 0
-       ///
-       InsetERT(BufferParams const &,
-                Language const *, std::string const & contents, CollapseStatus status);
-#endif
+       InsetERT(Buffer const &, CollapseStatus status = Open);
        ///
        ~InsetERT();
+       ///
+       static CollapseStatus string2params(std::string const &);
+       ///
+       static std::string params2string(CollapseStatus);
+private:
        ///
        InsetCode lyxCode() const { return ERT_CODE; }
        ///
@@ -64,20 +63,17 @@ public:
        ///
        bool showInsetDialog(BufferView *) const;
        ///
-       virtual bool forceEmptyLayout() const { return true; }
+       virtual bool forcePlainLayout(idx_type = 0) const { return true; }
        ///
-       virtual bool allowParagraphCustomization(idx_type) const { return false; }
+       virtual bool allowParagraphCustomization(idx_type = 0) const { return false; }
        /// should paragraph indendation be omitted in any case?
        bool neverIndent() const { return true; }
-protected:
-       InsetERT(InsetERT const &);
        ///
-       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
+       void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
-
-private:
-       virtual Inset * clone() const;
+       ///
+       Inset * clone() const { return new InsetERT(*this); }
        ///
        void setButtonLabel();
        ///
@@ -85,29 +81,6 @@ private:
 };
 
 
-class InsetERTMailer : public MailInset {
-public:
-       ///
-       InsetERTMailer(InsetERT & inset);
-       ///
-       virtual Inset & inset() const { return inset_; }
-       ///
-       virtual std::string const & name() const { return name_; }
-       ///
-       virtual std::string const inset2string(Buffer const &) const;
-       ///
-       static void string2params(std::string const &,
-               InsetCollapsable::CollapseStatus &);
-       ///
-       static std::string const params2string(InsetCollapsable::CollapseStatus);
-private:
-       ///
-       static std::string const name_;
-       ///
-       InsetERT & inset_;
-};
-
-
 } // namespace lyx
 
 #endif