]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseterror.h
Enable the external inset to handle unknown templates gracefully.
[lyx.git] / src / insets / inseterror.h
index 84581860955f03726e4d10a721f85c014e59e322..bbc787631d985bbe84c5281ef77151e57548cf43 100644 (file)
@@ -12,9 +12,9 @@
 #ifndef INSET_ERROR_H
 #define INSET_ERROR_H
 
-
 #include "inset.h"
 #include "LString.h"
+#include "dimension.h"
 
 /** Used for error messages from LaTeX runs.
 
@@ -25,25 +25,22 @@ class InsetError : public Inset {
 public:
        ///
        explicit
-       InsetError(string const &, bool same_id = false);
+       InsetError(string const &);
        ///
        ~InsetError();
        ///
        virtual dispatch_result localDispatch(FuncRequest const & cmd);
        ///
-       int ascent(BufferView *, LyXFont const &) const;
-       ///
-       int descent(BufferView *, LyXFont const &) const;
-       ///
-       int width(BufferView *, LyXFont const &) const;
+       void metrics(MetricsInfo &, Dimension &) const;
        ///
-       void draw(BufferView *, LyXFont const &, int, float &) const;
+       void draw(PainterInfo & pi, int x, int y) const;
        ///
        void write(Buffer const *, std::ostream &) const {}
        ///
        void read(Buffer const *, LyXLex &) {}
        ///
-       int latex(Buffer const *, std::ostream &, bool, bool) const { return 0; }
+       int latex(Buffer const *, std::ostream &,
+                 LatexRunParams const &) const { return 0; }
        ///
        int ascii(Buffer const *, std::ostream &, int) const { return 0; }
        ///
@@ -55,14 +52,10 @@ public:
        /// what appears in the minibuffer when opening
        string const editMessage() const;
        ///
-       void edit(BufferView *, int, int, mouse_button::state);
-       ///
-       void edit(BufferView * bv, bool front = true);
-       ///
        EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const {
-               return new InsetError(contents, same_id);
+       Inset * clone() const {
+               return new InsetError(contents);
        }
        ///
        Inset::Code lyxCode() const { return Inset::ERROR_CODE; }
@@ -73,5 +66,7 @@ public:
 private:
        ///
        string contents;
+       ///
+       mutable Dimension dim_;
 };
 #endif