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
18 /** Used for error messages from LaTeX runs.
20 The edit-operation opens a
21 dialog with the text of the error-message. The inset is displayed as
22 "Error" in a box, and automatically deleted. */
23 class InsetError : public Inset {
27 InsetError(string const &);
31 virtual dispatch_result localDispatch(FuncRequest const & cmd);
33 void dimension(BufferView *, LyXFont const &, Dimension &) const;
35 void draw(BufferView *, LyXFont const &, int, float &) const;
37 void write(Buffer const *, std::ostream &) const {}
39 void read(Buffer const *, LyXLex &) {}
41 int latex(Buffer const *, std::ostream &,
42 LatexRunParams const &) const { return 0; }
44 int ascii(Buffer const *, std::ostream &, int) const { return 0; }
46 int linuxdoc(Buffer const *, std::ostream &) const { return 0; }
48 int docbook(Buffer const *, std::ostream &, bool) const { return 0; }
50 bool autoDelete() const { return true; }
51 /// what appears in the minibuffer when opening
52 string const editMessage() const;
54 EDITABLE editable() const { return IS_EDITABLE; }
56 Inset * clone(Buffer const &) const {
57 return new InsetError(contents);
60 Inset::Code lyxCode() const { return Inset::ERROR_CODE; }
61 /// We don't want "begin" and "end inset" in lyx-file
62 bool directWrite() const { return true; };
64 string const & getContents() const { return contents; }