]> 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 a50fe672609050f20873fc3425850f79049ce45f..05540aad270651603ebe60099c95026f4bf9257a 100644 (file)
@@ -42,17 +42,15 @@ public:
        ///
        ~InsetERT();
        ///
-       Inset::Code lyxCode() const { return Inset::ERT_CODE; }
+       InsetCode lyxCode() const { return ERT_CODE; }
        ///
        docstring name() const { return from_ascii("ERT"); }
        ///
        void write(Buffer const & buf, std::ostream & os) const;
        ///
-       void read(Buffer const & buf, Lexer & lex);
-       ///
        virtual docstring const editMessage() const;
        ///
-       bool insetAllowed(Inset::Code code) const;
+       bool insetAllowed(InsetCode code) const;
        ///
        int latex(Buffer const &, odocstream &,
                  OutputParams const &) const;
@@ -65,16 +63,14 @@ public:
        ///
        void validate(LaTeXFeatures &) const {}
        ///
-       void metrics(MetricsInfo &, Dimension &) const;
-       ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
        bool showInsetDialog(BufferView *) const;
        ///
-       void getDrawFont(Font &) 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 &);
@@ -82,11 +78,10 @@ protected:
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+
 private:
        virtual Inset * clone() const;
        ///
-       void init();
-       ///
        void setButtonLabel();
        ///
        bool allowSpellCheck() const { return false; }