4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS
19 /** Used for error messages from LaTeX runs.
21 The edit-operation opens a
22 dialog with the text of the error-message. The inset is displayed as
23 "Error" in a box, and automatically deleted. */
24 class InsetError : public Inset {
28 InsetError(string const &, bool same_id = false);
32 int ascent(BufferView *, LyXFont const &) const;
34 int descent(BufferView *, LyXFont const &) const;
36 int width(BufferView *, LyXFont const &) const;
38 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
40 void write(Buffer const *, std::ostream &) const {}
42 void read(Buffer const *, LyXLex &) {}
44 int latex(Buffer const *, std::ostream &, bool, bool) const { return 0; }
46 int ascii(Buffer const *, std::ostream &, int) const { return 0; }
48 int linuxdoc(Buffer const *, std::ostream &) const { return 0; }
50 int docbook(Buffer const *, std::ostream &, bool) const { return 0; }
52 bool autoDelete() const { return true; }
53 /// what appears in the minibuffer when opening
54 string const editMessage() const;
56 void edit(BufferView *, int, int, mouse_button::state);
58 void edit(BufferView * bv, bool front = true);
60 EDITABLE editable() const { return IS_EDITABLE; }
62 Inset * clone(Buffer const &, bool same_id = false) const {
63 return new InsetError(contents, same_id);
66 Inset::Code lyxCode() const { return Inset::ERROR_CODE; }
67 /// We don't want "begin" and "end inset" in lyx-file
68 bool directWrite() const { return true; };
70 string const & getContents() const { return contents; }