]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetERT.h
Change string
[lyx.git] / src / insets / InsetERT.h
index 9598754853093de39b31a654f2794a620a1aa8f4..52542beb01ecdfa23964c7fab126f1d412cdeff0 100644 (file)
@@ -33,59 +33,44 @@ 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();
+private:
        ///
-       InsetBase::Code lyxCode() const { return InsetBase::ERT_CODE; }
-       ///
-       docstring getInsetName() const { return from_ascii("ERT"); }
+       InsetCode lyxCode() const { return ERT_CODE; }
        ///
-       void write(Buffer const & buf, std::ostream & os) const;
+       docstring name() const { return from_ascii("ERT"); }
        ///
-       void read(Buffer const & buf, Lexer & lex);
+       void write(std::ostream & os) const;
        ///
-       virtual docstring const editMessage() const;
+       docstring editMessage() const;
        ///
-       bool insetAllowed(InsetBase::Code code) const;
+       bool insetAllowed(InsetCode code) const;
        ///
-       int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
+       int latex(odocstream &, OutputParams const &) const;
        ///
-       int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+       int plaintext(odocstream &, OutputParams const &) const;
        ///
-       int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+       int docbook(odocstream &, OutputParams const &) const;
        ///
        void validate(LaTeXFeatures &) const {}
        ///
-       bool metrics(MetricsInfo &, Dimension &) const;
-       ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
        bool showInsetDialog(BufferView *) const;
        ///
-       void getDrawFont(LyXFont &) const;
+       virtual bool forceEmptyLayout(idx_type = 0) const { return true; }
        ///
-       bool forceDefaultParagraphs(idx_type) const { return true; }
-       /// should paragraph indendation be ommitted in any case?
-       bool neverIndent(Buffer const &) const { return true; }
-protected:
-       InsetERT(InsetERT const &);
+       virtual bool allowParagraphCustomization(idx_type = 0) const { return false; }
+       /// should paragraph indendation be omitted in any case?
+       bool neverIndent() const { return true; }
        ///
-       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
+       void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
-private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
        ///
-       void init();
+       Inset * clone() const { return new InsetERT(*this); }
        ///
        void setButtonLabel();
        ///
@@ -98,7 +83,7 @@ public:
        ///
        InsetERTMailer(InsetERT & inset);
        ///
-       virtual InsetBase & inset() const { return inset_; }
+       virtual Inset & inset() const { return inset_; }
        ///
        virtual std::string const & name() const { return name_; }
        ///