#define INSETERT_H
#include "InsetCollapsable.h"
-#include "MailInset.h"
namespace lyx {
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; }
///
///
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();
///
};
-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