]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetERT.h
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetERT.h
index 3796d3467e391c9725cb6ffe3fea4239f9be2374..05540aad270651603ebe60099c95026f4bf9257a 100644 (file)
@@ -42,48 +42,45 @@ public:
        ///
        ~InsetERT();
        ///
-       InsetBase::Code lyxCode() const { return InsetBase::ERT_CODE; }
+       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(Buffer const & buf, std::ostream & os) const;
        ///
        virtual docstring const editMessage() const;
        ///
-       bool insetAllowed(InsetBase::Code code) const;
+       bool insetAllowed(InsetCode code) const;
        ///
        int latex(Buffer const &, odocstream &,
                  OutputParams const &) const;
        ///
        int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+                     OutputParams const &) const;
        ///
        int docbook(Buffer const &, 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() const { return true; }
        ///
-       bool forceDefaultParagraphs(idx_type) const { return true; }
-       /// should paragraph indendation be ommitted in any case?
+       virtual bool allowParagraphCustomization(idx_type) const { return false; }
+       /// should paragraph indendation be omitted in any case?
        bool neverIndent(Buffer const &) const { return true; }
 protected:
        InsetERT(InsetERT const &);
        ///
-       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
-       bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+       bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
-       ///
-       void init();
+       virtual Inset * clone() const;
        ///
        void setButtonLabel();
        ///
@@ -96,7 +93,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_; }
        ///